XP deployment issue
I am running a scrited install of Win XP SP3 and need to change the local "Administrator" acct to a diff name let's say "Helpdesk". Does anyone know how I can perform this task automatically using the K2000? Any help is appreciated....
0 Comments
[ + ] Show comments
Answers (5)
Please log in to answer
Posted by:
cblake
13 years ago
Renaming the account is a likely less-than-optimal plan, but you can certainly add a new user with NET USER commands and then disable the local admin if you're really really sure...
Doc on net user:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/net_user.mspx?mfr=true
Doc on net user:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/net_user.mspx?mfr=true
Posted by:
airwolf
13 years ago
Posted by:
ADC321
13 years ago
Posted by:
jverbosk
12 years ago
A little late to the party on this since I'm just starting to play with my K2000, but since I have the same problem in my XP environment I thought I'd figure this out....
If you already have this change in your environment (and are aware of the caveats mentioned here) - you can run this script as a post-install task to rename the local admin account. This example renames it to NotAdministrator.
John
_____________________________
1) Save the script below to a vbs file (i.e. "renladmin.vbs").
2) Zip the vbs file (i.e. "renladmin.zip").
3) On the K2000, create a new Postinstallation Task - Add New Application...
4) Fill out the details
Name ----------------> Rename Local Admin Account (XP)
Runtime Env. ---------> Windows
File ------------------> * browse & upload your "renladmin.zip" file here
Command Line --------> cscript renladmin.vbs
5) Save and add to your scripted install as a postinstall task.
Note - I tried an Add New BAT Script post-install task and pasted the vbs code there, but it didn't do anything. Possible I did something wrong there, but this approach does work (I just tested it).
_____________________________
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colAccounts = objWMIService.ExecQuery _
("Select * From Win32_UserAccount Where LocalAccount = True And Name = 'Administrator'")
For Each objAccount in colAccounts
objAccount.Rename "NotAdministrator"
Next
_____________________________
* "borrowed" from the Hey, Scripting Guy! Blog
http://blogs.technet.com/b/heyscriptingguy/archive/2006/05/17/how-can-i-rename-a-local-user-account-on-a-windows-xp-computer.aspx
If you already have this change in your environment (and are aware of the caveats mentioned here) - you can run this script as a post-install task to rename the local admin account. This example renames it to NotAdministrator.
John
_____________________________
1) Save the script below to a vbs file (i.e. "renladmin.vbs").
2) Zip the vbs file (i.e. "renladmin.zip").
3) On the K2000, create a new Postinstallation Task - Add New Application...
4) Fill out the details
Name ----------------> Rename Local Admin Account (XP)
Runtime Env. ---------> Windows
File ------------------> * browse & upload your "renladmin.zip" file here
Command Line --------> cscript renladmin.vbs
5) Save and add to your scripted install as a postinstall task.
Note - I tried an Add New BAT Script post-install task and pasted the vbs code there, but it didn't do anything. Possible I did something wrong there, but this approach does work (I just tested it).
_____________________________
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colAccounts = objWMIService.ExecQuery _
("Select * From Win32_UserAccount Where LocalAccount = True And Name = 'Administrator'")
For Each objAccount in colAccounts
objAccount.Rename "NotAdministrator"
Next
_____________________________
* "borrowed" from the Hey, Scripting Guy! Blog
http://blogs.technet.com/b/heyscriptingguy/archive/2006/05/17/how-can-i-rename-a-local-user-account-on-a-windows-xp-computer.aspx
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.