Portable Launcher via Chrome arguments on command line VBS

Iron Forum for english speaking people

Post Reply
robertcollier4
Posts: 19
Joined: Thu Nov 29, 2012 12:45 pm

Portable Launcher via Chrome arguments on command line VBS

Post by robertcollier4 »

With this technique can specify arguments to launch Iron with every time.

STEP 1 - Create a blank text file called "IronPortable.vbs"

Code: Select all

Set WshShell = CreateObject("WScript.Shell")
Set objFS = CreateObject("Scripting.FileSystemObject")

myParentPath = objFS.GetParentFolderName(WScript.ScriptFullName)
' MsgBox(myParentPath)

myContainingFolderName = objFS.GetFolder(myParentPath).Name
' MsgBox(myContainingFolderName)

myExePath = """" & myParentPath & "\Iron\chrome.exe"""
' MsgBox(myExePath)

myTempDir = """C:\Temp\" & myContainingFolderName & "Cache"""
' MsgBox(myTempDir)

myProfilePath = """" & myParentPath & "\Profile"""
' MsgBox(myProfilePath)

myExeArguments = "--disk-cache-dir=" & myTempDir & " --disk-cache-size=80000000 --media-cache-size=0 --user-data-dir=" & myProfilePath & " --disable-new-menu-style --process-per-site --disable-gpu --disable-software-rasterizer --disable-accelerated-2d-canvas --disable-accelerated-video-decode --disable-webgl --disable-account-consistency --disable-breakpad --enable-http-pipelining --disable-asynchronous-spellchecking --disable-client-side-phishing-detection --disable-component-update --disable-domain-reliability --disable-hang-monitor --disable-gpu-watchdog --disable-logging --disable-login-animations --disable-new-avatar-menu --disable-new-bookmark-apps --disable-new-profile-management --disable-new-task-manager --disable-offline-pages --disable-permissions-bubbles --disable-physical-keyboard-autocorrect --disable-popup-blocking --disable-preconnect --disable-smooth-scrolling --disable-speech-api --disable-suggestions-service --disable-sync --disable-timezone-tracking-option --disable-touch-adjustment --disable-touch-drag-drop --disable-touch-editing --disable-touch-feedback --dns-prefetch-disable --allow-outdated-plugins --disable-restore-session-state --disable-session-crashed-bubble --no-first-run --new-window"
' MsgBox(myExeArguments)

If WScript.Arguments.Count = 0 Then
	WshShell.Run myExePath & " " & myExeArguments
Else
	WshShell.Run myExePath & " " & myExeArguments & " """ & WScript.Arguments(0) & """"
End If

Set WshShell = Nothing
Set objFS = Nothing
Step 2 - edit following registry to send all URLs to your VBS file

Code: Select all

[HKEY_CLASSES_ROOT\MyHTMLFile\Shell\Open\Command]
@="C:\\PortableApps\\IronPortable\\IronPortableFlags.vbs \"%1\""
Post Reply