HockeyFan Posted June 6, 2007 Share 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 Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 6, 2007 Share 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 Link to comment Share on other sites More sharing options...
HockeyFan Posted June 6, 2007 Author Share 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") Link to comment Share on other sites More sharing options...
HockeyFan Posted June 6, 2007 Author Share 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!!! Link to comment Share on other sites More sharing options...
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