engineer_z Posted August 31, 2013 Posted August 31, 2013 Hi there How can I use psexec to run batch file as admin Regards
free780 Posted August 31, 2013 Posted August 31, 2013 Yes I cant remember the switch. You can also run as system which bypasses uac.
Ephelyon Posted August 31, 2013 Posted August 31, 2013 I'm assuming this has to be on a remote computer as you could just use runas if it's on the local machine. The syntax is: psexec \\computername command Switches (that I've used anyway): -accepteula (I always sling this in just in case, so you don't get any annoying prompts) -d (don't wait for the remote process to terminate) -i (run the process interactively such that it appears on the screen) -s (run the process as LocalSystem) -x (run the process on the WinLogon desktop - requires additional customisation to work properly) You can combine switches like this: psexec \\computername -accepteula -dis command So this will run the command as LocalSystem, it can interact with the desktop and PsExec on your end won't wait for it to complete before terminating (useful if iterating through a list of computers, where the command is guaranteed to succeed, in e.g. a batch script).
Arthur Posted August 31, 2013 Posted August 31, 2013 @engineer_z. Are you still trying to install Office?
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