VB Script not Working RRS feed

  • Question

  • HI All,

    Below VBs not running and error on Line 5.. What did i do wrong?

    dim commandLine, WshShell
    set wshshell = wscript.createobject("wscript.shell")
    wshshell.currentdirectory = "C:\Program Files\uvnc bvba\UltraVnc"
    commandLine = "%ProgramFiles%\uvnc bvba\UltraVnc\MSLogonACL.exe" /i /a "\\domain.com\VNC\vnc.txt"
    Set WshShell = CreateObject("WScript.Shell")
    Call WshShell.Run (commandLine,8,false)
    set WshShell=Nothing


    can this run as below?

    Execute-Process -Path "%ProgramFiles%\\uvnc bvba\UltraVnc\MSLogonACL.exe" -Parameters /i /o "\\domain.com\VNC\vnc.txt"


    Invoke-Expression  "& " "C:\Program Files\uvnc bvba\UltraVnc\MSLogonACL.exe'"  -Parameters "/i /o  \\domain.com\VNC\vnc.txt"


    Thursday, August 17, 2017 4:02 AM

All replies

  • What are you trying to achieve? Guessing you're wanting to "Start" VNC?
    Thursday, August 17, 2017 11:24 AM
  • This is not a VBScript forum.

    To run a program in PowerShell you can do the following:

    & "$env:programfiles\uvnc bvba\UltraVnc\MSLogonACL.exe /i /a \\domain.com\VNC\vnc.txt"


    • Proposed as answer by I.T Delinquent Monday, August 21, 2017 9:05 AM
    Thursday, August 17, 2017 11:33 AM