HockeyFan Posted June 6, 2007 Posted June 6, 2007 I'm sure I've totally screwed up the syntax, but can someone please help me! I'm trying to write a scrtipt that creates a Local group on a Windows XP Pro system and then adds a user to that group. FYI...At the time this script runs, the PC is logged in as the administrator. This is what I've got so far and it's not working: Func AddLocalGroup() $groupname = "Temp Group" $user = "User1" Run(@ComSpec & " /c " & 'Net Localgroup "' & $groupname & '"' & " /ADD", "", @SW_HIDE) Run(@ComSpec & " /c " & 'Net localgroup "' & $groupname & '"' & " " & $user & " /ADD", "", @SW_HIDE) EndFunc
PsaltyDS Posted June 6, 2007 Posted June 6, 2007 Works fine for me -- once I call the function. You ARE calling the function, aren't you... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
HockeyFan Posted June 6, 2007 Author Posted June 6, 2007 Works fine for me -- once I call the function. You ARE calling the function, aren't you... Why yes... Call("AddLocalGroup")
HockeyFan Posted June 6, 2007 Author Posted June 6, 2007 Why yes... Call("AddLocalGroup") OK...nevermind! I tried it on a couple of other PC's and it worked fine. There must be something terrible wrong with my test PC. I'm wiping it clean!!!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now