Jump to content

Recommended Posts

Posted

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
Posted

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!!! :)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...