Skip to content

Instantly share code, notes, and snippets.

@vinhjaxt
Created May 3, 2023 12:57
Show Gist options
  • Save vinhjaxt/32b59efdd9aeb337457029db5d617ea0 to your computer and use it in GitHub Desktop.
Save vinhjaxt/32b59efdd9aeb337457029db5d617ea0 to your computer and use it in GitHub Desktop.
RunChromePortable.cmd
@if (1==1) @if(1==0) @ELSE
@echo off&setlocal DisableDelayedExpansion
cscript //E:JScript //nologo "%~f0"
@goto :EOF
@end @ELSE
var scriptDir = WScript.ScriptFullName.substring(0,WScript.ScriptFullName.lastIndexOf(WScript.ScriptName)-1)
var cmd = 'cmd /c "'+scriptDir+'\\GoogleChromePortable.exe" --remote-debugging-port=9222'
// var wshShell = WScript.CreateObject("WScript.Shell"), intDoIt = wshShell.Popup(cmd, 0, /* if > 0, seconds to show popup. With 0 it is without timeout */ "WScript Alert Popup", 1 /* mbOKCancel */ + 64 /* mbInformation */ /* + 0 mbOK */ /* + 2 mbCancel */)
var ShA = new ActiveXObject("Wscript.Shell")
ShA.Run(cmd, 0, false)
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment