0
votes

I am using below vbs to launch one executable file to run as differenct user.. end user not technical person so he just double click vbs to launch tool..

Here, the issue is when user double click the vbs script, it opens two cmd window instead of one.

Any clue whats the cause?

  Option explicit
  Dim oShell
  set oShell= Wscript.CreateObject("WScript.Shell")
  oShell.Run "RunAs /user:NETMON\mikep ""\\Shared\executeME.exe"
  WScript.Sleep 100
  oShell.Sendkeys "password~"
  Wscript.Quit
1

1 Answers

0
votes

Probably should be

oShell.Run "RunAs /user:NETMON\mikep ""\\Shared\executeME.exe"""

your quotes aren't matched or closed properly.