Login | |
|
 |
"Run as ..." - 10/31/2005 1:01:06 AM
|
|
 |
|
| |
CondorMan
Posts: 11
Score: 0
Joined: 10/5/2005
Status: offline
|
Hi everyone I have XP Pro SP2 and have a few scripts which work fine. If I try to use them when logged on with Limited Rights (I do this out of habit, rather than using the computer on a day-to-day basis with Admin Rights), they often generate an error. I think the errors are generated by the fact that the scripts are being used as a non-Administrator and the script may be doing something which a non-Administrator shouldn't be doing. I know there's a "Run as ..." facility which I've tried to activate, but does this only work with programs such as MS Word, Excel etc., or can this principal be used with a .vbs file? I suspect that I'd have to give "permission" for the .vbs to be run as an Administrator (presumably with the appropriate password) but I'm not sure how I'd do that. I know I could simply run the .vbs whilst logged in as an Administrator, but I'd prefer to avoid this, if possible. I know that this isn't specifically a VBS programming matter so, if necessary, I could post this problem in a more appropriate forum. I feel that if this can be resolved here, other readers may benefit from the technique if they run into the same problem. Thanks for your time and patience.
|
|
| |
|
|
|
 |
RE: "Run as ..." - 10/31/2005 4:48:20 AM
|
|
 |
|
| |
mbouchard
Posts: 1906
Score: 14
Joined: 5/15/2003
From: USA
Status: offline
|
Do a search in the VBscript discussion forum for RunAs and you will find a couple scripts for using RunAs. Alternativly, look at PSexec by www.Sysinternal.com, which allows you to call a exe,bat,cmd with elevated rights. Also, take a look at AutoIT www.hiddensoft.com, specifically RunAsSet which will elevate the rights of anything called to a specified level.
_____________________________
Mike For useful Scripting links see the Read Me First stickey! Always remember Search is your friend.
|
|
| |
|
|
|
 |
RE: "Run as ..." - 12/23/2005 1:47:22 AM
|
|
 |
|
| |
ebgreen
Posts: 4613
Score: 31
Joined: 7/12/2005
Status: offline
|
YOu could easily test it by making a bat that does something only an admin could do the run it with psexec and elevated rights. I am 99% sure that it will run just fine but I cannot remember an express instance where I have done this.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
|
|