Jump to content

Recommended Posts

Posted

I have declared a Global variable $username

I then prompt from an input for a username:

$username = Inputbox("Username", "Please enter in the assigned user name", "", "", -1, 100)

The OS is Windows XP.

I want to use the net user /add $username. I did see a prior posting on the use of the 'net use' command. I have attempted to simulate the command line but have had no success. Any help would be great!

Posted

Thanks Larry.

I get error code = 1. Yikes.

I'm just not seeing the error in the syntax. I used the %COMSPEC% /c in Autoitv2 with no errors. I have tried using the @COMSPEC in v3 but still have issues. I have been successful hard coding the username in rather then using the defined variable $username, but that of course defeats my purpose.

Any Ideas? Much appreciated Larry.

Posted

This is seriously the best forum I have ben on yet. Answers in seconds!

Well, it was my syntax. I was unaware that my actual spacing in the code would come into play.

JdeB - I followed your syntax exactly and got it to work. I had tried this exact syntax before with little regard for spacing between " and &.

JdeB & Larry ------- thanks again

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...