Jump to content
Sign in to follow this  
sumitd

Run .exe from sahred location as administrator

Recommended Posts

sumitd

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?

Share this post


Link to post
Share on other sites
sumitd

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

Share this post


Link to post
Share on other sites
JLogan3o13

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.


√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
sumitd

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?

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×