AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Portable ChromeLoader

 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Voltron43



Joined: 27 Mar 2009
Posts: 76
Location: Dublin, IE

PostPosted: Sun Oct 11, 2009 2:35 am    Post subject: Portable ChromeLoader Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
paxophobe



Joined: 10 Nov 2007
Posts: 93
Location: Second star to the right.... watching you.

PostPosted: Sun Oct 11, 2009 8:28 am    Post subject: Reply with quote

Cool, thanks for sharing

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

They also have a Iron and Chrome versions available
Back to top
View user's profile Send private message
Voltron43



Joined: 27 Mar 2009
Posts: 76
Location: Dublin, IE

PostPosted: Sun Oct 11, 2009 10:44 am    Post subject: Reply with quote

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

Thanks for the info.
_________________
My Scripts
Back to top
View user's profile Send private message Visit poster's website
pomj



Joined: 22 Feb 2007
Posts: 7

PostPosted: Thu Jan 14, 2010 11:10 pm    Post subject: data dir Reply with quote

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

Smile 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
Back to top
View user's profile Send private message
David.P



Joined: 18 Nov 2006
Posts: 304

PostPosted: Wed Jan 27, 2010 5:46 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group