vb shell will not launch unless its under and admin acct

By l.mark.hart ·
I have a vbshell that I wrote and it will not launch unless its under an admin acct on windows xp. I can not figure out why

Here is the code for the script

Set shell = CreateObject("WScript.Shell")
shell.Run "PsExec.exe -a 1 C:\Pathways\WFMGR\wfmgr.exe"


This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

Windows policy, either local or group, forbids that....

by robo_dev In reply to vb shell will not launch ...

it's also a big security risk, because scripts are the legs that viruses walk on.

The issue is that the wscript or cscript itself needs elevated priviledges to run the that you can run your utility with elevated priviledges....:)

If you invoke your vbs with psexec or RunAs, will it work?

Collapse -

Aw The Beauty

by 45GEEK In reply to vb shell will not launch ...

VBScript will only run with the permisssions assigned to it when created. If you created it without admin permissions than you will not be able to run it. Since Windows NT SP 3 scripts have been disabled to all users unless they have admin or domain admin privledges. If you have domain admin you can take ownership of the script and then run it. But the problem with the above script is that you are trying to invoke a cscript action with the WSH (Windows Shell Host) So it will not work anyway. Change your WSShell to Cshell. and WScript.quit to Cscript.quit But the same permissions apply.

Related Discussions

Related Forums