Creating a User in a Batch or VB file

G

Guest

Hi

What I am looking at doing is creating a batch or vb file to create a user
"backburner" as a power user, then installing a service which I already have
sorted and then telling that service that it should login as "backburner"
rather then local user. Then of cause start the service.

The reason I need/want this is I am setting up around 40-60 PC's with
Backburner which is the network renderer for Autodesk 3dsmax and it requires
its own user for some reason when run as a service so I would like to try and
automate some of it since there is possibly up to 60 computers to make it
work on. Unfortunately Norton Ghost is out of the question because there is a
large amount of data on the computers and a lot of the users don't want to
loose that and their settings.

So any tips or help would be a great help

Regards

Andrew
 
M

marcus.tettmar

Andrew said:
What I am looking at doing is creating a batch or vb file to create a user
"backburner" as a power user, then installing a service which I already have
sorted and then telling that service that it should login as "backburner"
rather then local user. Then of cause start the service.

Like this:

Net User backburner password /ADD
Net Localgroup "Administrators" backburner /ADD

Your service exe can probably then be installed with:
service.exe /install

Then start it with
net start servicename

Marcus
http://www.mjtnet.com
Macro Scheduler for Windows and Software Process Automation
 
G

Guest

Thanks marcus, your solution was almost perfect the only issue i am having
now is getting the service to logon as the user "backburner" as apposed to
the local system account. I have managed to get the bat file to change the
user name by making a line to edit the registry, however i am not sure how
to get it to change/add the password, does anyone have any ideas

So far i have this

Net User Backburner password /ADD
Net Localgroup "Administrators" backburner /ADD
Net Localgroup "Power Users" backburner /ADD
REG ADD HKLM\SYSTEM\ControlSet001\Services\BACKBURNER_SRV_200 /v ObjectName
/t REG_SZ /d .\Backburner
"C:\Program Files\Autodesk\Backburner\Serversvc.exe" -i
net start BACKBURNER_SRV_200

Regrads


Andrew
 
G

Guest

Thanks William that worked a treat its now working exactly like i want it

the final bat ended up been

Net User Backburner password /ADD /expires:never /passwordchg:no
Net Localgroup "Administrators" backburner /ADD
Net Localgroup "Power Users" backburner /ADD
sc config BACKBURNER_SRV_200 obj= .\Backburner password= password
REG ADD "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon\SpecialAccounts\UserList" /v [Backburner] /t
REG_DWORD /d 0 /f
"C:\Program Files\Autodesk\Backburner\Serversvc.exe" -i
Net Start BACKBURNER_SRV_200

so thanks to both of you

regards

Andrew
 
W

WTC

You're welcome Andrew.

--
William Crawford
MS-MVP Windows Shell/User

Andrew said:
Thanks William that worked a treat its now working exactly like i want it

the final bat ended up been

Net User Backburner password /ADD /expires:never /passwordchg:no
Net Localgroup "Administrators" backburner /ADD
Net Localgroup "Power Users" backburner /ADD
sc config BACKBURNER_SRV_200 obj= .\Backburner password= password
REG ADD "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon\SpecialAccounts\UserList" /v [Backburner] /t
REG_DWORD /d 0 /f
"C:\Program Files\Autodesk\Backburner\Serversvc.exe" -i
Net Start BACKBURNER_SRV_200

so thanks to both of you

regards

Andrew
WTC said:
See if this help,

sc config servicename obj= useraccount password= password

SC Command
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sc.mspx?mfr=true
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top