Jump to content

Recommended Posts

Posted

Here is a sample of what I am trying to do (including the quotes):

psexec \\computername net localgroup "whatever goes here" /add

and here is a sample of my code (which doesn't work):

RUN(@ComSpec & ' /c psexec \\' & $Computer & "netlocalgroup" '"test"' & "/add")

Any ideas?

  • Moderators
Posted

Any ideas?

Try a search in the forum, there's been a few topics on this in just the last couple of days.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted

I was just wondering why it errors out. I know it is a problem with my code, but I am trying to learn how to troubleshoot code. Thanks for the reply though!

  • Moderators
Posted

I was just wondering why it errors out. I know it is a problem with my code, but I am trying to learn how to troubleshoot code. Thanks for the reply though!

Well for one... your missing an '&'
RUN(@ComSpec & ' /c psexec \\' & $Computer & "netlocalgroup" & '"test"' & "/add")
Other than that, I'm not knowledgable enough to give you the correct syntax in this area.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted

thi isn't my area either...

but do you need to use

psexec.exe

???

and check you spacing like this

msgbox(0,"Test", $Computer & "netlocalgroup" '"test"' & "/add")

it doesn't look right to me

8)

NEWHeader1.png

Posted

Got it! Woo Hooo!!! Thanks guys! It works with this:

RUN(@ComSpec & ' /c psexec \\' & $Computer & ' net localgroup "Remote Desktop Users" /add' & ' "domain\ usergroup"')

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...