byteme Posted May 12, 2004 Posted May 12, 2004 Hi everyone. I have a little problem. Could anybody tell me how I can get this to work? I have a script that at one point needs to open a command prompt and type the following: net localgroup administrators "whatever\domain admins" /add. my problem is getting the " marks around the whatever\domain admins... how can I do this using the send command, or is there a much better way of doing this without even opening the dos prompt and have the user see the typing? I appreciate any help anyone can give me. Thanks all!
sugi Posted May 12, 2004 Posted May 12, 2004 (edited) Use "" instead of a single " Or try the following: 'net blablabla "' & $group & '" /add' 'net blablabla "domain\user name" /add' Edit Should have read your full post first... Try this: RunWait('net blablabla "' & $user & '" /add', "", @SW_HIDE) Edited May 12, 2004 by sugi
SlimShady Posted May 12, 2004 Posted May 12, 2004 Better: RunWait(@ComSpec & ' /c ' & 'net localgroup administrators "whatever\domain admins" /add', '', @SW_HIDE)
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