Start Chrome in incognito mode
Maybe you don't want a bunch of cached data hanging around after your browser session exits. Maybe you travel a lot with your laptop and don't want a bunch of private information on a machine that might be stolen. Maybe you do a lot of "birthday shopping."
Whatever the reason, if you prefer to use Chrome in incognito mode for most of your day to day browsing, Michael T. Bee sent us a convenient script that starts up Chrome in incognito mode automatically. Here it is in all it's glory:
//Chrome_Incognito.js - start new chrome incognito(sort of)
var liWait=175; //wait ms (double on older pc)var oSh=new ActiveXObject("WScript.Shell");
oSh.Run("chrome.exe"); //start chrome
WScript.Sleep(liWait);
oSh.Sendkeys("^+N"); //start new incognito window
WScript.Sleep(liWait);
oSh.Sendkeys("%{Tab}"); //go previous(first) browser window
WScript.Sleep(liWait);
oSh.Sendkeys("%{F4}"); //close first browser window
Just drop this in notepad and save it as chrome_incognito.js on your desktop. When you double click it, it will launch Chrome, make an incognito window, and then close the first window. It does all this by sending artificial keypress events to the application through the Shell ActiveX object, a technique which might come in handy for scripting other standard Windows applications.
If you have an older or slower machine, you might need to adjust the liWait variable to give your machine time to launch Chrome before the application starts sending fake keypresses to it.
Posted by Jason Striegel |
Oct 26, 2008 07:51 PM
Google, Life, Web |
Permalink
| Comments (7)
Recent Entries
- Minty soldering jig
- Selecting row number in MySQL
- iPhone 3G software unlock
- Python on Android
- Controlling Sony camcorders with the Arduino
- Gradient text effect in CSS
- Retro gaming emulators that include (legal) ROMs?
- Das DereLicht - ham radio transmitter from a CFL bulb
- Using Google App Engine as a personal CDN
- Route-me - Open Source mapping library for iPhone
Comments
Newest comments listed first.
| Posted by: rio on October 27, 2008 at 5:10 PM |
Thanks! I was searching for this trick for a while! Anyway, if you want the incognito window to be maximized, replace the line:
oSh.Run("chrome.exe"); //start chrome
with:
oSh.Run("chrome.exe -start-maximized"); //start chrome
nJoy!
| Posted by: Dylan on November 2, 2008 at 8:57 PM |
simply append --incognito to the file path, and Chrome will start in incognito mode. you can make this adjustment in the file properties very easily.
| Posted by: howiem on November 3, 2008 at 6:45 AM |
SXaving the script to the desktop got me a script error (WSH error). However, when I moved the script file to the Chrome application folder, created a shortcut and put the shortcut on the desktop, it worked.
Agree that the command line entry in properties is easier, but some people don't always want to run incognito.
Does anyone know how to tell from within Chrome that it is in fact running incognito?
| Posted by: howiem on November 3, 2008 at 6:46 AM |
SXaving the script to the desktop got me a script error (WSH error). However, when I moved the script file to the Chrome application folder, created a shortcut and put the shortcut on the desktop, it worked.
Agree that the command line entry in properties is easier, but some people don't always want to run incognito.
Does anyone know how to tell from within Chrome that it is in fact running incognito?
| Posted by: howiem on November 3, 2008 at 6:47 AM |
SXaving the script to the desktop got me a script error (WSH error). However, when I moved the script file to the Chrome application folder, created a shortcut and put the shortcut on the desktop, it worked.
Agree that the command line entry in properties is easier, but some people don't always want to run incognito.
Does anyone know how to tell from within Chrome that it is in fact running incognito?
| Posted by: magicm00 on November 6, 2008 at 7:39 PM |
howiem, wouldn't it be easier to just put a shortcut on the desktop with the "--incognito" switch enabled, instead of linking to the script which just does the same thing?
You can tell that a Chrome window is in incognito mode from the incognito symbol in the upper left corner. You know, the one with the hat and the trenchcoat.
Leave a comment
Bloggers
Welcome to the Hacks Blog!
Categories
- Ajax
- Amazon
- Android
- AppleTV
- arduino
- Astronomy
- Baseball
- BlackBerry
- Blogging
- Body
- Cars
- Cryptography
- Data
- Design
- Education
- Electronics
- Energy
- Events
- Excel
- Excerpts
- Firefox
- Flash
- Flickr
- Flying Things
- Food
- Gaming
- Gmail
- Google Earth
- Google Maps
- Government
- Greasemonkey
- Hacks Series
- Hackszine Podcast
- Halo
- Hardware
- Home
- Home Theater
- iPhone
- iPod
- IRC
- iTunes
- Java
- Kindle
- Knoppix
- Language
- LEGO
- Life
- Lifehacker
- Linux
- Linux Desktop
- Linux Multimedia
- Linux Server
- Mac
- Mapping
- Math
- Microsoft Office
- Mind
- Mind Performance
- Mobile Phones
- Music
- MySpace
- MySQL
- NetFlix
- Network Security
- olpc
- Online Investing
- OpenOffice
- Outdoor
- Parenting
- PCs
- PDAs
- Perl
- Philosophy
- Photography
- PHP
- Pleo
- Podcast
- Podcasting
- Productivity
- PSP
- Retro Computing
- Retro Gaming
- Science
- Screencasts
- Security
- Shopping
- Skype
- Smart Home
- Software Engineering
- Sports
- SQL
- Statistics
- Survival
- TiVo
- Transportation
- Travel
- Ubuntu
- User Interface
- Video
- Virtualization
- Visual Studio
- VoIP
- Web
- Web Site Measurement
- Windows
- Windows Server
- Wireless
- Word
- World
- Xbox
- Yahoo!
- YouTube
Archives
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
Recent Posts
- Minty soldering jig
- Selecting row number in MySQL
- iPhone 3G software unlock
- Python on Android
- Controlling Sony camcorders with the Arduino
- Gradient text effect in CSS
- Retro gaming emulators that include (legal) ROMs?
- Das DereLicht - ham radio transmitter from a CFL bulb
- Using Google App Engine as a personal CDN
- Route-me - Open Source mapping library for iPhone
www.flickr.com
|





