diff --git a/README.md b/README.md index a3d28c5..d888dfb 100644 --- a/README.md +++ b/README.md @@ -32,15 +32,15 @@ Description: - Update-MozillaFirefox downloads a list of the most recent Firefox version numbers against which it compares the Firefox version numbers found on the system and displays, whether a Firefox update is needed or not. The actual update process naturally needs elevated rights, and if a working Internet connection is not found, Update-MozillaFirefox will exit at Step 6. Update-MozillaFirefox detects the installed Firefox(es) by querying the Windows registry for installed programs. The keys from HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\ and HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\ are read on 64-bit computers and on the 32-bit computers only the latter path is accessed. If all the detected Firefox versions seem to be up-to-date, Update-MozillaFirefox will, however, exit before checking, whether it is run elevated or not. Thus, if Update-MozillaFirefox is run in a up-to-date machine in a 'normal' PowerShell window, Update-MozillaFirefox will just check that everything is OK and leave without further ceremony. + Update-MozillaFirefox downloads a list of the most recent Firefox version numbers against which it compares the Firefox version numbers found on the system and displays, whether a Firefox update is needed or not. The actual update process naturally requires elevated rights, and if a working Internet connection is not found, Update-MozillaFirefox will exit at Step 6. Update-MozillaFirefox detects the installed Firefox(es) by querying the Windows registry for installed programs. The keys from HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\ and HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\ are read on 64-bit computers and on the 32-bit computers only the latter path is accessed. When run in a 'normal' PowerShell window, and all the detected Firefox versions are up-to-date, Update-MozillaFirefox will just check that everything is OK and leave without further ceremony at Step 11 (before trying to determine, whether it is run elevated or not).
-
Update-MozillaFirefox tries to write several Firefox-related files, namely "firefox_current_versions.json", "firefox_release_history.json", "firefox_languages.json" and "firefox_regions.json" in Step 7. If the script has advanced to the updating phase, in Step 14 an Install Configuration File (firefox_configuration.ini) is also written to $path. +
Update-MozillaFirefox tries to write several Firefox-related files, namely "firefox_current_versions.json", "firefox_release_history.json", "firefox_languages.json" and "firefox_regions.json" at Step 7. If the script has advanced to the updating phase, at Step 14 an Install Configuration File (firefox_configuration.ini) is also written to $path, where, for instance, the automatic Mozilla Maintenance service is disabled and the default shortcuts are enabled.
-
If Update-MozillaFirefox is run without elevated rights (but with a working Internet connection) in a machine with an old Firefox version, it will be shown that a Firefox update is needed, but Update-MozillaFirefox will exit at Step 12 before actually downloading any files. To perform an update with Update-MozillaFirefox, PowerShell has to be run in an elevated window (run as an administrator). +
If Update-MozillaFirefox is run without elevated rights (but with a working Internet connection) in a machine with an old Firefox version, it will be shown that a Firefox update is needed, but Update-MozillaFirefox will exit at Step 12 before downloading any files. To perform an update with Update-MozillaFirefox, PowerShell has to be run in an elevated window (run as an administrator).
-
If Update-MozillaFirefox is run in an elevated PowerShell window and no Firefox is detected, the script offers the option to install Firefox in the "Admin Corner", where, in contrary to the main autonomous nature of Update-MozillaFirefox, an end-user input is required for selecting the bit-version and the language. In the "Admin Corner", one instance of either 32-bit or 64-bit version in the selected language is installable with Update-MozillaFirefox – the provided language selection covers over 30 languages. +
If Update-MozillaFirefox is run in an elevated PowerShell window and no Firefox is detected, the script offers the option to install Firefox in the "Admin Corner", where, in contrary to the main autonomous nature of Update-MozillaFirefox, an end-user input is required for selecting the bit-version and the language. In the "Admin Corner", one instance of either 32-bit or 64-bit version in the selected language is installable with Update-MozillaFirefox – the language selection covers over 30 languages.
-
In the update procedure itself (if an old Firefox version has been found and Update-MozillaFirefox is run with administrative rights) Update-MozillaFirefox downloads a full Firefox installer from Mozilla, which is of the same type that is already installed on the system (same bit version and language). After writing the Install Configuration File (firefox_configuration.ini in Step 14) and stopping several Firefox-related processes Update-MozillaFirefox installs the downloaded Firefox on top of the existing Firefox installation, which should trigger the in-built update procedure. +
In the update procedure itself Update-MozillaFirefox downloads a full Firefox installer from Mozilla, which is equal to the type that is already installed on the system (same bit version and language). After writing the Install Configuration File (firefox_configuration.ini at Step 14) and stopping several Firefox-related processes Update-MozillaFirefox installs the downloaded Firefox on top of the existing Firefox installation, which triggers the in-built update procedure. Homepage: @@ -49,7 +49,7 @@ Version: - 1.1 + 1.2 Sources: @@ -131,7 +131,7 @@
  • The Firefox Install Configuration File (firefox_configuration.ini) is created with one active parameter (other parameters inside the file are commented out):
    1. -

      Install Configuration File (in Step 14):

      +

      Install Configuration File (at Step 14):

      @@ -145,10 +145,10 @@

      The %TEMP% location represents the current Windows temporary file folder. Please see the Notes-section below, how to determine where the current Windows - temporary file folder is located. In PowerShell the command $env:temp displays the temp-folder path. + temporary file folder is located. In PowerShell the command $env:temp displays the temp-folder path.

    -

  • To see the actual values that are being written, please see Step 14 in the script itself, where the following value is written:
  • +
  • To see the actual values that are being written to the Install Configuration File (firefox_configuration.ini), please see the Step 14 in the script itself, where the following value is written:
    1. @@ -169,7 +169,7 @@

    2. At Step 7 the baseline Firefox version numbers are written to a file (firefox_current_versions.json) and also three additional auxillary JSON files are created, namely:
      1. -

        Firefox JSON Files (in Step 7):

        +

        Firefox JSON Files (at Step 7):

        @@ -201,7 +201,7 @@

        Invoke-Item $env:temp
        -
        may be used at the PowerShell prompt window [PS>]. +
        may be used at the PowerShell prompt window [PS>].

        @@ -228,29 +228,26 @@ @@ -368,7 +368,7 @@ - + @@ -394,7 +394,7 @@ - + @@ -406,7 +406,7 @@ - + @@ -441,10 +441,13 @@

          -

        • Requires a working Internet connection for downloading a list of the most recent Firefox version numbers.
        • -

          -

          -

        • Also requires a working Internet connection for downloading a complete Firefox installer from Mozilla (but this procedure is not initiated, if the system is deemed up-to-date).
        • +
        • Requires a working Internet connection for downloading a list of the most recent Firefox version numbers and for downloading a complete Firefox installer from Mozilla (but the latter procedure is not initiated, if the system is deemed up-to-date).
        • For performing any actual updates with Update-MozillaFirefox, it's mandatory to run this script in an elevated PowerShell window (where PowerShell has been started with the 'run as an administrator' option). The elevated rights are needed for installing Firefox on top of the exising Firefox installation.
        • -

        • Update-MozillaFirefox is designed to update only one instance of Firefox. If more than one instances of Firefox are detected, the script will notify the user in Step 5, and furthermore, if old Firefox(es) are detected, the script will exit before downloading the installation file at Step 15.
        • +
        • Update-MozillaFirefox is designed to update only one instance of Firefox. If more than one instances of Firefox are detected, the script will notify the user at Step 5, and furthermore, if old Firefox(es) are detected, the script will exit before downloading the installation file at Step 15.
        • -

        • Please also notice that during the actual update phase Update-MozillaFirefox closes a bunch of processes without any further notice in Step 17 and in Step 14 the Firefox installation configuration file is written, so that the Mozilla Maintenance service will not be installed during the Firefox update.
        • +
        • Please note that the Firefox installation configuration file written at Step 14 disables the Mozilla Maintenance service so that the Mozilla Maintenance service will not be installed during the Firefox update. The values set with the Install Configuration File (firefox_configuration.ini) are altering the system files and seemingly are written somewhere deeper to the innards of Firefox semi-permanently.
        • -

        • Please note that when run in an elevated PowerShell window and an old Firefox version is detected, Update-MozillaFirefox will automatically try to download files from the Internet without prompting the end-user beforehand or without asking any confirmations (in Step 16 and onwards).
        • +
        • Please also notice that when run in an elevated PowerShell window and an old Firefox version is detected, Update-MozillaFirefox will automatically try to download files from the Internet without prompting the end-user beforehand or without asking any confirmations (at Step 16 and onwards) and at Step 17 closes a bunch of processes without any further notice.
        • Please note that the downloaded files are placed in a directory, which is specified with the $path variable (at line 42). The $env:temp variable points to the current temp folder. The default value of the $env:temp variable is C:\Users\<username>\AppData\Local\Temp (i.e. each user account has their own separate temp folder at path %USERPROFILE%\AppData\Local\Temp). To see the current temp path, for instance a command

          [System.IO.Path]::GetTempPath()
          -
          may be used at the PowerShell prompt window [PS>]. To change the temp folder for instance to C:\Temp, please, for example, follow the instructions at Temporary Files Folder - Change Location in Windows, which in essence are something along the lines: +
          may be used at the PowerShell prompt window [PS>]. To change the temp folder for instance to C:\Temp, please, for example, follow the instructions at Temporary Files Folder - Change Location in Windows, which in essence are something along the lines:
          1. Right click on Computer and click on Properties (or select Start → Control Panel → System). In the resulting window with the basic information about the computer...
          2. Click on Advanced system settings on the left panel and select Advanced tab on the resulting pop-up window.
          3. @@ -289,7 +286,7 @@

          4. Set-ExecutionPolicy remotesigned
            - This command is altering the Windows PowerShell rights to enable script execution. Windows PowerShell has to be run with elevated rights (run as an administrator) to actually be able to change the script execution properties. The default value is "Set-ExecutionPolicy restricted".

            + This command is altering the Windows PowerShell rights to enable script execution for the default (LocalMachine) scope. Windows PowerShell has to be run with elevated rights (run as an administrator) to actually be able to change the script execution properties. The default value of the default (LocalMachine) scope is "Set-ExecutionPolicy restricted".

            Parameters:

              @@ -320,13 +317,16 @@

            -

            For more information, please type "Get-ExecutionPolicy -List" or "help Set-ExecutionPolicy -Full" or visit Set-ExecutionPolicy.

            +

            For more information, please type "Get-ExecutionPolicy -List", "help Set-ExecutionPolicy -Full", "help about_Execution_Policies" or visit Set-ExecutionPolicy or about_Execution_Policies.

          5. New-Item -ItemType File -Path C:\Temp\Update-MozillaFirefox.ps1
            - Creates an empty ps1-file to the C:\Temp directory. The New-Item cmdlet has an inherent -NoClobber mode built into it, so that the procedure will halt, if overwriting (replacing the contents) of an existing file is about to happen. Overwriting a file with the New-Item cmdlet requires using the Force.
            - For more information, please type "help New-Item -Full".
          6. + Creates an empty ps1-file to the C:\Temp directory. The New-Item cmdlet has an inherent -NoClobber mode built into it, so that the procedure will halt, if overwriting (replacing the contents) of an existing file is about to happen. Overwriting a file with the New-Item cmdlet requires using the Force. If the path name and/or the filename includes space characters, please enclose the whole -Path parameter value in quotation marks (single or double): +
              +
              New-Item -ItemType File -Path "C:\Folder Name\Update-MozillaFirefox.ps1" +
            +
            For more information, please type "help New-Item -Full".

        Script Homepage
        Tobias Weltner: PowerTips Monthly vol 8 January 2014 (or one of the archive.org versions)
        Microsoft TechNet: Working with Hash Tables
        Determine installed PowerShell version
        PowerShell v2 Converts Dictionary to Array when returned from a function
        Working with JSON and PowerShell
        + + + + - @@ -453,15 +456,27 @@ + + + + + + + + + + + + @@ -480,12 +495,27 @@ + + + + + + + + + + + + + + +
        wwwDisable-Defrag
        Firefox Customization Files
        Get-AsciiTable
        Get-ComputerInfo
        Get-CultureTables
        Get-DirectorySize
        Get-HashValue
        Get-InstalledPrograms
        Get-InstalledWindowsUpdates
        Get-PowerShellAliasesTable
        Get-PowerShellSpecialFolders
        Get-RAMInfo
        Java-Update
        Remove-DuplicateFiles
        Remove-EmptyFolders
        Remove-EmptyFoldersLite
        Rename-Files
        Rock-Paper-Scissors
        Toss-a-Coin
        Unzip-Silently
        Update-AdobeFlashPlayer