Link to home
Start Free TrialLog in
Avatar of David Sankovsky
David SankovskyFlag for Israel

asked on

Sending Echo Off through VBS Script

Hi Experts.

I'm using a VBS Script to invoke a runas command through CMD.
I got it working perfectly except for one little thing. I need the CMD Screen to be completely blank while working or better yet, not to be visible at all.
The VBS Script looks like this:
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run("runas /user:mydomain\domain admin user ""Path With Spaces"""), 1, False
WScript.Sleep 100
objShell.Sendkeys "domain admin password~"

Open in new window


Is there a way to invoke it with @echo off or somehow make the cmd windows not to jump up.
Please keep in mind that creating a batch and invoking it using the VBS Script is NOT an option.
SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of David Sankovsky

ASKER

I used a combination of Both!
Piping the output into a non-existent output was great.
Starting it minimized made it look even sleeker

Thank you both!