• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Need script for "run as" in xp

paf077

Golden Member
I need a scrip to run a program for the limited users on win Xp Pro. I have to install it as admin and let the users
work on it as limited users. BUT the way the program is wriiten only admins can use it. or it works if it is "run as"
an admin in the limited users group. Is there a way to have a script run it as an admin without the limited users
seeing the script?


Any help would be greatly appreciated.


Paf
 
here is a vbscript that I wrote:

set wshshell = CreateObject("WScript.Shell")
set wshnet = CreateObject("WScript.Network")
computer = wshnet.ComputerName
windir = wshshell.ExpandEnvironmentStrings("%windir%")
wshshell.run("%comspec%")
wscript.sleep 1000
wshshell.sendkeys "runas /user:" & computer & "\<admin account> """ & windir & "\program directory and name"""
wshshell.sendkeys "~"
wscript.sleep 150
wshshell.sendkeys "<admin password>"
wshshell.sendkeys "~"
wscript.sleep 200
wscript.pause
wshshell.sendkeys "exit"
wshshell.sendkeys "~"
wshshell.sendkeys "~"
set wshShell = Nothing
set wshNet = Nothing
WScript.Quit

then I used a program called screnc, download it here and learn how to use it here. This will create an encoded vbscript file so that users will not be able to see the admin username or password.

Hope this helps, and good luck.
 
Back
Top