cottage Posted March 29, 2005 Share Posted March 29, 2005 Can someone please give me a little help with the following? RunWait(@Comspec & " /c " & 'net user $username urp@ss /add') How can I use a string (such as $username) with the above command? I've tried various ways of quoting it, but can't seem to find the right method. Regards, Bill Link to comment Share on other sites More sharing options...
PerryRaptor Posted March 29, 2005 Share Posted March 29, 2005 Try this... RunWait(@Comspec & " /c " & "net user " & $username & " urp@ss /add") - $username cannot be inside quotes - note the spaces after "...user " and before " urp@ss..." Think of it as stringing all together "one" + "two" + 3 + "four" Link to comment Share on other sites More sharing options...
cottage Posted March 29, 2005 Author Share Posted March 29, 2005 Try this...RunWait(@Comspec & " /c " & "net user " & $username & " urp@ss /add")- $username cannot be inside quotes- note the spaces after "...user " and before " urp@ss..."Think of it as stringing all together "one" + "two" + 3 + "four"<{POST_SNAPBACK}>Exactly what I needed. Thank you !!! 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