Dim WshShell, WshArgs, CmdLine, i Set WshShell = CreateObject("WScript.Shell") Set WshArgs = WScript.Arguments for i=0 to WshArgs.Count - 1 CmdLine = CmdLine & WshArgs.Item(i) & " " Next CmdLine = Left(CmdLine, Len(CmdLine)-1) ' remove the last space CmdLine = chr(&H22) & CmdLine & chr(&H22) ' as temporary html source file contains spaces in its path CmdLine = "gnuclientw " & CmdLine ' create gnuclientw command line 'WScript.Echo CmdLine WshShell.Run Cmdline, SW_HIDE, true ' invoke gnuclinetw and wait for its completion WshShell.Run "gnudoitw -f " & chr(&H22) & "(html-mode)" & chr(&H22), SW_HIDE, false ' invoke gnudoitw to activate html-mode