Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 688

Calling exe from VBS with stored credentials

$
0
0
For the life of me i cant figure this out, if someone could shed some light on this i would be grateful. i planned on using the code below to call a exe from the vbs with diff user credentials.

Code:

Option explicit
Dim oShell
set oShell= Wscript.CreateObject("WScript.Shell")
oShell.Run "RunAs /user:domain\user ""Nuix Collector\Modules\Nuix Portable.exe"
WScript.Sleep 100
oShell.Sendkeys "passwd~"
Wscript.Quit

my plan was to send a drive out with nuix collector and have it so any user could run the VBS using the encoded credentials in the script. i will encode later once i am able to get this thing to work.

i can get it to work in batch, but i would rather not do so.

Viewing all articles
Browse latest Browse all 688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>