How to run a .vbs file in administrator mode by default

  • Thread starter Thread starter Rakesh
  • Start date Start date
R

Rakesh

Hi,

I have a vb script file which does some thing like putting some files in
program files folder and tweaking registry entries etc. How can I run this
script as Administrator by default with out right clicking the cmd and then
selecting the "Run As Administrator"
Please help...
Thanks in Advance
 
Thanks for the response.

The below tip does not solve my purpose, my case is like this:
When I run my .vbs file directly it is not working and says "Permission
Denied".
But When I run the same .vbs file from command prompt which has been opened
as Administrator (right click and run as administrator) it is working
properly.
But running the script this way is not a feasible solution for users of my
script.
I need some code snippet which runs my .vbs file using administrator
privileges.

Thanks,
 
have you tried compatibility mode?


Rocky said:
Thanks for the response.

The below tip does not solve my purpose, my case is like this:
When I run my .vbs file directly it is not working and says "Permission
Denied".
But When I run the same .vbs file from command prompt which has been
opened
as Administrator (right click and run as administrator) it is working
properly.
But running the script this way is not a feasible solution for users of my
script.
I need some code snippet which runs my .vbs file using administrator
privileges.

Thanks,
 
Back
Top