How to make VBscript "Run As Administrator" automatically.

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

pure_evil020

Thread Starter
Joined
Jul 31, 2008
Messages
92
Hi there,
I have a program that executes a vbscript to perform certain tasks, but it does not work properly without being "Run As Administrator" on a windows 7 OS.
Its fine with windows XP OS, but windows 7 insists on being run as administrator, otherwise it denies access to the TEMP folder, when the program attempts to write and execute a script.

My solution (if such a script is possible) would be to make another pre-packed VBscript, or Reg file, included with the program executable, then have the program recognize when the user launches the program for the first time, check if the user is running windows 7, then if this returns true, pop up a message to tell the user that windows 7 requires the program to be "Run As Administrator", and ask the user if they would like the program to automatically "Run As Administrator" in the future.

If the user agrees, the program would run this pre-packed VBscript (Or Reg file) to make the exe always run as administrator (If this is possible)...


I'm hoping there is some kind of registry entry that can be modified, to allow an EXE to always be launched with administrative privileges.



If you're asking "Why don't you just pre-pack all of the scripts then?", this is because the scripts are "User Defined", meaning the user defines certain parameters for the script, then the program writes the script, based on what the user wanted done, and launches that script.
Therefore, even if I Pre-packed the scripts, the program would still need to access and edit the script files, to make the script do whatever the user wants (which windows 7 will not allow without the program being run as administrator).


So is there such a script (VB, or Reg) that could permanently give a program exe Administrative privileges? :confused:
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top