I have a simple startup.cmd script which runs some net commands to create a new user and add the user to the administrator group.
I got the script from this blog. I have run the net commands in a elevated CMD session and they work correctly. but running this on my developer machine just sees the role hanging.
Is there some trick i'm missing?
startup.cmd file contents: net user dataAdmin thepassword /add net localgroup Administrators dataAdmin /add
the relevant snippet from the servicedefinition file:
the startup.cmd is set to build action = Content and Copy Always for the copy to output directory
I haven't tried this in azure production yet. I will attempt to push it into staging later today.
UPDATE At BStateham's suggestion I checked the event logs on my machine: Under 'Windows Azure' there is a error logged:
User program "..\SLC.DataRole\approot\bin\startup.cmd" exited with non-zero exit code 1
Any idea what that is supposed to mean?