Bcolvin
Technical User
- Sep 23, 2003
- 10
Noobie alert!
Okay, we're running in a mix environment of NT4.0 and W2k Pro. Users have very limited permissions locally. My vbscript attempts to make edits to the registry at login (map drives, printers, wallpaper, etc.).
It works fine for the W2K systems (non-admin users) but the same script (on the NT 4.0 Workstations) will not allow the changes to the registry (for non-admin users).
I've added the following lines to the script hoping that it will add Domain Accounts to the local administrators group:
UserString = WshNetwork.UserName
Set oShell = CreateObject("WScript.Shell")
oShell.Run "CMD.EXE /C net localgroup administrators /add DOMAIN_NAME\"+ UserString
but that doesn't work either.
How can I either
1. Run the script as admin in order to write to the registry?
2. Add Domain users to local administrators group and then execute script? (NOTE: I've seen other postings about this but that would only add a local account and not the domain account)
Any help would be appreciated.
Okay, we're running in a mix environment of NT4.0 and W2k Pro. Users have very limited permissions locally. My vbscript attempts to make edits to the registry at login (map drives, printers, wallpaper, etc.).
It works fine for the W2K systems (non-admin users) but the same script (on the NT 4.0 Workstations) will not allow the changes to the registry (for non-admin users).
I've added the following lines to the script hoping that it will add Domain Accounts to the local administrators group:
UserString = WshNetwork.UserName
Set oShell = CreateObject("WScript.Shell")
oShell.Run "CMD.EXE /C net localgroup administrators /add DOMAIN_NAME\"+ UserString
but that doesn't work either.
How can I either
1. Run the script as admin in order to write to the registry?
2. Add Domain users to local administrators group and then execute script? (NOTE: I've seen other postings about this but that would only add a local account and not the domain account)
Any help would be appreciated.