Sign in to follow this  
Followers 0
Skizz

A little help for a noob

6 posts in this topic

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?

Share this post


Link to post
Share on other sites



Any ideas?

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

[center]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.[/center]

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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.

[center]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.[/center]

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

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

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0