Download Google Chrome Without a Web Browser using Windows Command Line

Due to the popularity of my old post on how to download firefox without a web browser, I decided to figure out a way to do the same thing with Chrome.  Chrome doesn’t seem easily accessible on FTP, so this method allows you to still download Chrome from a safe web source, via the HTTP link that Google provides.

1.  Open NotePad and paste the below VBScript code into it.

Note: The strFileURL variable is currently set to the URL that Chrome is at as of today.  That might change later.  Find latest Chrome EXE by going here. Click accept and install, then right-click copy the URL titled “Click here to retry.”

' This is the URL of the chrome EXE.
strFileURL="https://dl.google.com/tag/s/appguid%3D%7B8A69D345-D564-463C-AFF1-A69D9E530F96%7D%26iid%3D%7BA024641A-81C0-533A-53CB-AE9534821219%7D%26lang%3Den%26browser%3D4%26usagestats3D0%26appname%3DGoogle%2520Chrome%26needsadmin%3Dfalse%26installdataindex%3Ddefaultbrowser/update2/installers/ChromeStandaloneSetup.exe"
' This is where the file will download to.
strHDLocation = "c:ChromeStandaloneSetup.exe"
' Fetch the file
Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP")
objXMLHTTP.open "GET", strFileURL, false
objXMLHTTP.send()
If objXMLHTTP.Status = 200 Then
Set objADOStream = CreateObject("ADODB.Stream")
objADOStream.Open
objADOStream.Type = 1 'adTypeBinary
objADOStream.Write objXMLHTTP.ResponseBody
objADOStream.Position = 0 'Set the stream position to the start
Set objFSO = Createobject("Scripting.FileSystemObject")
If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile
strHDLocation
Set objFSO = Nothing
objADOStream.SaveToFile strHDLocation
objADOStream.Close
Set objADOStream = Nothing
End if
Set objXMLHTTP = Nothing

2. Save your notepad file to your desktop, and use quotes in the filename to overwrite saving as a .txt file:
“chrome.vbs”

3. Go to your Windows command prompt (Start > CMD)
4. Navigate to your desktop in the command prompt (cd desktop)
5. Run the command: cscript.exe downloadfile.vbs

6. Open Windows explorer, and right on your C drive you should see the chrome installer at c:ChromeStandaloneSetup.exe


Attribution: This vbscript was adopted by Gareth’s method on SuperUser.com.

How to Remove pagefile.sys and hiberfil.sys from Windows 7

Notice that pagefile.sys and hiberfil.sys take up 7GB total!

To delete these files safely in Windows 7, you must disable “Hibernate Support” in your power options in the control panel.

1.  Go to Start > Search, type in “powercfg.cpl” go to advanced power options, find the “Sleep” section and make sure sleep is set to “never”

2.  We also need to make sure virtual memory is not enabled.   (coming soon)

How to Restore the Recently Changed files shortcut in Windows 7

Looking to restore the shortcut in your explorer window that says “Recently Changed”? I was too. In a nutshell, you must save this code snippet, which creates the Recently Changed file search, and then drag that shortcut to your favorites bar. Here are the instructions:

1. Download the raw version of this code below.

http://pastebin.com/embed_js.php?i=NSfwr6eF

2. Paste the file contents to NotePad

3. Save the file as “Recently Changed.search-ms” (keep the quotes so it makes that the correct file type)

4. Save the file to C:Users{YOUR NAME}Searches

5. Drag the shortcut to your favorites bar (same place “Recent Places” appears)

How To Download Firefox Without a Web Browser

UPDATE 2/7/2013: Download Chrome Without a Web Browser.

I recently came across an interesting tutorial on how to download FireFox using only the command prompt on Windows XP or Windows Vista, and I have made it a little more user friendly.  This may come in handy in a variety of different situations, or it may just be used in an attempt to convince your friends that you are a hacker. In the quick tutorial below, please note that when I use quotes, it indicates exactly what you should type in, but do not type in the quotes themselves unless explicitly noted.

  1. Go to Start > Run > “cmd” and hit OK. This will load the command prompt.
  2. type “ftp” and hit enter.
  3. type “open releases.mozilla.org” and hit enter.
  4. It will ask for a username, type “anonymous” and hit enter.
  5. It will then ask for a password, type “anonymous” and hit enter.
  6. Open the folder with the latest Windows release of Firefox by typing in:
    “cd pub/mozilla.org/firefox/releases/latest/win32/en-US/” and then enter.
  7. View the contents of the current directory by typing in “ls” and then enter.
  8. Switch to binary file mode by typing in “type image” and then hit enter.
  9. Choose the directory to download firefox to by typing “lcd C:” (Typing this will save it right to the root directory of the C: Drive.
  10. When you typed in “ls” from step 7, it should have listed a .exe file for you.  As of writing the latest version is Firefox Setup 3.0.11.exe.  In this case, we will type in: get “Firefox Setup 3.0.11.exe” (type in the quotes)
  11. Now go check in your c:/ drive, and you should see the .exe file downloaded.
  12. Type “bye” to exit the FTP mode, and then type “exit” to close out of the Command Prompt.

UPDATE 2/7/2013: Download Chrome Without a Web Browser.

Update 7/29/2013: Updated URL structure per comment to ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/win32/en-US/

Install PHP on Windows Vista

Update 8/23/09 Despite all of the hard work getting PHP installed on Windows Vista, I found a pre-configured WAMP stack that works great inVista  Check out Server2Go!  You can even install it right to a thumb drive.

Update 8/14/09 – After finding many limitations in ultimately successful set-up of LAMP on Windows Vista, I caved in and set up a Linux server for under $200.  After all is said and done, this proved to be a much better, and seamless solution to having a local production environment.

These instructions were adapted from a nice tutorial found at iis.net.

Before you begin:

  • I recommend the text editor Notepad++ for editing config files.
  • If you are like me, you may have remnants of unsuccessful PHP/MySQL attempts installed on your Vista machine.  In order to be successful in this installation, you must uninstall any previous installations of PHP, MySQL, XAMPP, WAMP, etc.

Download the latest PHP .zip package for Windows.

Create a folder named php on your c:drive, and extract the zip file there.  The path will be c:/php.

After the files have unzipped, open the c:phpphp.ini-dist file in Notepad++, then hit file, save as, and save a copy of the file to the c:windows folder, naming it php.ini.

Next, you need to install IIS 7 by going to My Computer, “Uninstall or Change a Program,” and then “Turn Windows Features on or off”

Navigate to “Internet Information Services” and enable the Web Management Tool and WWW Services selected below:

After clicking OK, it will take around 5 minutes for all of the components to install.  Then open the IIS Manager by going to Start > Run > C:windowssystem32inetsrvinetmgr.exe

Double click on “Handler Mappings”:

Click “Add Script Map”

Now, map *.php to your php5asapi.dll file which you most likely extracted to c:/php.

Click yes to Allow ISAPI extension:

Open up Notepad++ (start > run > notepad++ ).  Create a new blank page and write it it:
<?php
phpinfo();
?>

Then save the file into the c:inetpubwwwroot with the name test.php.  Navigate your browser to http://localhost/test.php

If you see the standard PHP info page, then you can take a sign of relief, as PHP is now successfully installed on your Windows Vista machine.  Now it’s time to make a few more tweaks.

Let’s set it so windows knows to default to index.php when visiting a directory via HTTP.  Go back to the IIS Manager: C:windowssystem32inetsrvinetmgr.exe

Double click on “Default Document”:

Click “Add.”

Type “index.php” and hit OK.

Now, let’s make a few quick edits to the php.ini file in your C:/Windows directory.  Open up Notepad++ and then open php.in C:/Windows/php.ini .  We need to set the correct extension directory if you ever plan to use an extension like MySQL.  To do that, simply edit the following line (line number may change on future released of php).  Note that when we originally unzipped the PHP files, we saved it to a folder like C:/php.  We have to tell the php.ini file where this folder is in order for the extensions to run properly:

Since we’re in php.ini, we might as well make a few more changes that will help our future installation of MySQL and other applications.  Create a folder in C:/Temp called phpsessions.  Then edit the following line of php.ini so PHP knows where to save your temporary session files:

Finally, we need to enable some necessary extensions in the php.ini file.  To do this, we simply delete the semicolon from the beginning of the following lines:


Ok, final final step.  Go to the folder you originally unzipped PHP to, copy the libmcrypt.dll and libmysql.dll and paste them to your c:/windows directory.  This will be necessary later when we install MySQL.

Your all set for PHP.  Stay tuned.. I will update this page with a link to the Installing MySQL on Windows Vista next.

Update 8/14/09 – After finding many limitations in ultimately successful set-up of LAMP on Windows Vista, I caved in and set up a Linux server for under $200.  After all is said and done, this proved to be a much better, and seamless solution to having a local production environment.

Update 8/23/09 Despite all of the hard work getting PHP installed on Windows Vista, I found a pre-configured WAMP stack that works great inVista  Check out Server2Go!  You can even install it right to a thumb drive.

Open Microsoft Excel in Two Separate Windows

If you try to open a new spreadsheet from the file menu in excel, it just overlaps your current view.  The side by side view is not much help either, even with two displays.  To open up a completely separate Microsoft Excel Window, simply have one excel sheet open, then go to the Start Menu and open up Microsoft Excel again.  This will run another completely independent instance of the program.

Stop and Delete Print Jobs Windows Vista/XP/Windows 7

One of the biggest headaches with printers, especially USB printers, is getting a print job to stop once it has already started. Sometimes you can click cancel on the print job, but other times the job will go until completion. Even turning off the printer does not always solve the problem. I finally came across a solution that fixes all printing problems for me.

Step 1. If you need to immediately stop the printer from wasting paper/ink, turn off your printer. This may involve unplugging the power cord from the surge protector if the regular power buttons fail.

Step 2. Go to Start button > Run > net stop spooler

Step 3. Click OK

Step 4. Start > Run > C:WindowsSystem32SpoolPrinters


Step 5.
Hit OK, and delete all files within the “Printers” folder you just opened. This will delete any print jobs you had remaining.

Step 6.
Start > Run > net start spooler


Step 7.
Hit OK, and turn your printer back on.

All of your printing problems should now be solved. Please post comments if this did or did not work for you.

Disable Automatic Updates in Adobe CS3

I recently realized that Adobe Photoshop CS3 and Adobe Premiere CS3 were updating themselves without permission to do so. I looked for an option within each respective application to disallow automatic updates, but could not find one. After doing some searching, I found this workaround.

To disable automatic updates in Adobe CS3 for Windows Vista (Should work for Windows XP too):

1. Start > Run > C:Program FilesCommon FilesAdobeUpdater5AdobeUpdater.exe (if this does not work, navigate to to the common files folder and follow the same directory structure to get to AdobeUpdater.exe.
2. Adobe Updater will open, and select continue as it searches for updates.
3. On the screen where you tell it to download the updates, it will have a preferences link. Click the preferences link.
4. Un-check the box that says “Automatically check for updates.” and hit okay, then close out of the updater.
5. Enjoy.