sumitd Posted August 14, 2013 Posted August 14, 2013 How do i run an exe file from a shared location (no password required) with administrator rights Location : <ip>softwaressetup.exe I want to execute it as "Run as administrator" Any suggestions?
sumitd Posted August 14, 2013 Author Posted August 14, 2013 I have tried the RunAs() function. But in my case i don't need the username and password. Just access the shared location and run the file as administrator
Moderators JLogan3o13 Posted August 14, 2013 Moderators Posted August 14, 2013 If you just want to run it with admin rights, and you're not having to provide the credentials of a different user, try adding #RequireAdmin at the top of your script. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
sumitd Posted August 16, 2013 Author Posted August 16, 2013 Thanks JLogan3o13 for the suggestion, I had already tried that in my script but no effect and I still have to manually do a "Run as Administrator" Any other suggestions?
Moderators JLogan3o13 Posted August 16, 2013 Moderators Posted August 16, 2013 Yes, post your script so we can see exactly what you're doing "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
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