AutoHotkey Community

It is currently May 27th, 2012, 1:40 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Portable ChromeLoader
PostPosted: October 11th, 2009, 3:35 am 
Offline

Joined: March 27th, 2009, 12:46 pm
Posts: 76
Location: Dublin, IE
These scripts are based off of the ChromeLoader.exe that is packaged with ChromePortable from Carsten Knobloch at Caschy's Blog. My version of the script is more flexible by providing an INI file with certains switches enabled by default (such as --bookmark-menu). The INI file can be changed to customized any setup. Also, switches can be passed through ChromeLoader.exe (e.g. ChromeLoader.exe --no-sandbox)

Code:
;==============================================================================
;
; TITLE:        ChromeLoader
; VERSION:      v0.1.0
; LINK:         http://www.autohotkey.com/forum/
;
; AUTHOR:       Voltron43
; DATE:         10/10/09
; HOMEPAGE:     http://www.autohotkey.net/~Voltron43/#ChromeLoader
;
;==============================================================================
;
; DESCRIPTION:  This script if based off of the ChromeLoader.exe that is
;               packaged with ChromePortable from Carsten Knobloch at
;               Caschy's Blog <http://stadt-bremerhaven.de/>.  My version of
;               the script is more flexible by providing an INI file with
;               certains switches enabled by default (such as --bookmark-menu).
;               The INI file can be changed to customized any setup.  Also,
;               switches can be passed through ChromeLoader.exe
;               (e.g. ChromeLoader.exe --no-sandbox)
;
;==============================================================================
; http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/chrome_switches.cc?view=markup
;==============================================================================

#NoEnv
#NoTrayIcon
SendMode Input
SetWorkingDir %A_ScriptDir%
#SingleInstance, Force

sSettingsName := "ChromeLoader.ini"

IniRead, sChromePath,       %sSettingsName%, Settings, sChromePath,     chrome\chrome.exe
IniRead, sProfilePath,      %sSettingsName%, Settings, user-data-dir,   profil
IniRead, bBookmarksButton,  %sSettingsName%, Settings, bookmark-menu,   1
IniRead, bEnableSync ,      %sSettingsName%, Settings, enable-sync ,    0
IniRead, bStartMaximized,   %sSettingsName%, Settings, start-maximized, 0

IfNotExist, %sSettingsName%
{
    IniWrite, %sChromePath%,      %sSettingsName%, Settings, sChromePath
    IniWrite, %sProfilePath%,     %sSettingsName%, Settings, user-data-dir
    IniWrite, %bBookmarksButton%, %sSettingsName%, Settings, bookmark-menu
    IniWrite, %bEnableSync%,      %sSettingsName%, Settings, enable-sync
    IniWrite, %bStartMaximized%,  %sSettingsName%, Settings, start-maximized
}

 sPath = %sChromePath%
    sPath .= ((sProfilePath)     ? " --user-data-dir=""" . sProfilePath . """" : "")
          .  ((bBookmarksButton) ? " --bookmark-menu" : "")
          .  ((bEnableSync)      ? " --enable-sync" : "")
          .  ((bStartMaximized)  ? " --start-maximized" : "")
    If (%0% != 0)
        Loop, %0%
            sPath .= A_Space . %A_Index%
Run, % sPath
ExitApp

Code:
;==============================================================================
;
; TITLE:        IncognitoChromeLoader
; VERSION:      v0.1.0
; LINK:         http://www.autohotkey.com/forum/
;
; AUTHOR:       Voltron43
; DATE:         10/10/09
; HOMEPAGE:     http://www.autohotkey.net/~Voltron43/#ChromeLoader
; LICENSE:      GNU General Public License <http://www.gnu.org/licenses/gpl.txt>
;
;==============================================================================
;
; DESCRIPTION:  This script if based off of the ChromeLoader.exe that is
;               packaged with ChromePortable from Carsten Knobloch at
;               Caschy's Blog <http://stadt-bremerhaven.de/>.  My version of
;               the script is more flexible by providing an INI file with
;               certains switches enabled by default (such as --bookmark-menu).
;               The INI file can be changed to customized any setup.  Also,
;               switches can be passed through ChromeLoader.exe
;               (e.g. ChromeLoader.exe --no-sandbox)
;
;==============================================================================
; http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/chrome_switches.cc?view=markup
;==============================================================================

#NoEnv
#NoTrayIcon
SendMode Input
SetWorkingDir %A_ScriptDir%
#SingleInstance, Force

sSettingsName := "ChromeLoader.ini"

IniRead, sChromePath,       %sSettingsName%, Settings, sChromePath,     chrome\chrome.exe
IniRead, sProfilePath,      %sSettingsName%, Settings, user-data-dir,   profil
IniRead, bBookmarksButton,  %sSettingsName%, Settings, bookmark-menu,   1
IniRead, bEnableSync ,      %sSettingsName%, Settings, enable-sync ,    0
IniRead, bStartMaximized,   %sSettingsName%, Settings, start-maximized, 0

IfNotExist, %sSettingsName%
{
    IniWrite, %sChromePath%,      %sSettingsName%, Settings, sChromePath
    IniWrite, %sProfilePath%,     %sSettingsName%, Settings, user-data-dir
    IniWrite, %bBookmarksButton%, %sSettingsName%, Settings, bookmark-menu
    IniWrite, %bEnableSync%,      %sSettingsName%, Settings, enable-sync
    IniWrite, %bStartMaximized%,  %sSettingsName%, Settings, start-maximized
}

 sPath = %sChromePath% --incognito
    sPath .= ((sProfilePath)     ? " --user-data-dir=""" . sProfilePath . """" : "")
          .  ((bBookmarksButton) ? " --bookmark-menu" : "")
          .  ((bEnableSync)      ? " --enable-sync" : "")
          .  ((bStartMaximized)  ? " --start-maximized" : "")
    If (%0% != 0)
        Loop, %0%
            sPath .= A_Space . %A_Index%
Run, % sPath
ExitApp

_________________
My Scripts


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 11th, 2009, 9:28 am 
Offline

Joined: November 10th, 2007, 3:30 am
Posts: 93
Location: Second star to the right.... watching you.
Cool, thanks for sharing

You might be interested in X-Launcher, based on AutoIt3, from http://www.winpenpack.com (click the UK flag in upper right corner to set to English)...

They also have a Iron and Chrome versions available


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 11th, 2009, 11:44 am 
Offline

Joined: March 27th, 2009, 12:46 pm
Posts: 76
Location: Dublin, IE
paxophobe wrote:
You might be interested in X-Launcher, based on AutoIt3, from http://www.winpenpack.com (click the UK flag in upper right corner to set to English)...

Thanks for the info.

_________________
My Scripts


Report this post
Top
 Profile  
Reply with quote  
 Post subject: data dir
PostPosted: January 15th, 2010, 12:10 am 
Offline

Joined: February 22nd, 2007, 11:32 am
Posts: 7
According to your install instructions the folder structure should be:

Chrome
-->chrome (app)
--> Profile

but when I run the loader it gets like:
Chrome
-->chrome (app)
\--> Profile

:) my crappy drawing should indicate that the profile directory ends up in the app dir instead of at the same level as the app dir.

I'm running W7.

cheers /mmichael


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 27th, 2010, 6:46 am 
Offline

Joined: November 18th, 2006, 7:56 pm
Posts: 305
Hi Voltron43,

just tried your ChromeLoader -- thanks for sharing. However, I can't get it to run since Chrome always simply crashes instantly when loaded using your Loader.

I'm using Portable Chrome Beta 4.0.249.43 on WinXP SP3.

Thanks for any help you might have about this,

David.P


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 13 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group