Skip to main content

Snow Inventory Agent Script - Snow Inventory Java Scanner Launcher 2

Here you can find the release notes for Snow Inventory Agent Script - Snow Inventory Java Scanner Launcher 2.


2.1.0 latest

Release date: 2024-05-08

Compatible Versions

Snow Inventory Agent for WindowsMicrosoft PowerShellSnow Inventory Java Scanner
Version 5 or laterVersion 3 and laterVersion 1 or later

Information

The Scan-SIJSLauncher.ps1 script looks for Java installations and launches the Snow Inventory Java Scanner. You can read more about the scanner at Snow Docs - Snow Inventory Java Scanner.

The script must be executed as part of the Snow Inventory Agent for Windows, according to the topic Running PowerShell scripts as part of the scanning process on Snow Docs. Otherwise the results will not be included in the snowpack.

In the case that you want to run a manual scan, this script must be executed with appropriate permissions, so execute it using only sc.exe control SnowInventoryAgent5 128, as described in the Windows Agent - Command line topic on Snow Docs.

For debugging purposes, the script can be executed manually and supports common parameters, so you will receive detailed logs using the command Scan-SIJSLauncher.ps1 -Debug -InformationAction 'Continue'.

Only java binaries with a valid signature will be started.

The Snow Inventory Java Scanner must be in the root layer of the Snow Inventory Agent folder.

The script is digitally signed by Snow Software AB for enhanced security and verification.

Function

The script looks for the Snow Inventory Java Scanner sijs.jar in the following paths:

  • $env:ProgramFiles\Snow Software\Inventory\Agent
  • $env:snow_agent

It also checks for the SnowInventoryAgent5 service path using Get-WMIObject or Get-Service.

The script looks for the snowagent.config file in the identified agent paths and extracts the value of the env.java_home setting, if set. This is then used as first java source.

The script checks the following paths for Java Installations:

  • {{$ {env:ProgramFiles(x86)}

    \Common Files\Oracle\Java\javapath\java.exe}}

  • $env:ProgramFiles\Common Files\Oracle\Java\javapath\java.exe

  • {{$ {env:JAVA_HOME}

    )bin\java.exe}}

  • $env:ProgramFiles\Java\jre6\bin\java.exe

  • $env:windir\System32\java.exe

The script checks the following registry locations for javahome paths:

  • HKLM:\SOFTWARE\JavaSoft\Java Runtime Environment
  • HKLM:\SOFTWARE\JavaSoft\Java Development Kit

Furthermore, it uses the Get-Command CmdLet to identify existing Java installations.

Once it identified sijs.jar and java.exe, the script checks the Java installation for a valid signature using the Get-AuthenticodeSignature CmdLet and then starts the Snow Inventory Java Scanner.

It returns the script manifest using the name Scan-SIJSLauncher.

It returns the duration and result as <CustomRegKey> using the Registry path HKEY_LOCAL_MACHINE\SOFTWARE\Snow Software\Scan-SIJSLauncher.

MediumIntegrity

This script does need medium integrity to find java and execute the the Snow Inventory Java Scanner.

Troubleshooting

Custom encryption might need to be applied to this script when running on Snow Inventory Agent for Windows prior to version 7, as it will not be executed in medium integrity.

If you cannot see the <CustomRegKey> with the Name HKEY_LOCAL_MACHINE\SOFTWARE\Snow Software\Scan-SIJSLauncher and values duration and / or status, the script maybe hit the defined powershell timeout in the Snow Inventory Agent.

NEW

  • Signature validation for Java executables.
  • Duration and status of the script execution are now reported as CustomRegKey.

CORRECTIONS

  • File encoding changed to UTF-8-BOM to prevent HashMismatch errors (04771125).

DEPRECATED

  • There will be no encrypted snow-ps1 version of this script provided by Snow Software.

2.0

Release date: 2024-02-08

Compatible Versions

Snow Inventory Agent for WindowsMicrosoft PowerShellSnow Inventory Java Scanner
Version 5 or laterVersion 3 and laterVersion 1 or later

Information

The Scan-SIJSLauncher.ps1 script looks for Java installations and launches the Snow Inventory Java Scanner. You can read more about the scanner at Snow Docs - Snow Inventory Java Scanner.

The script must be executed as part of the Snow Inventory Agent for Windows, according to the topic Running PowerShell scripts as part of the scanning process on Snow Docs. Otherwise the results will not be included in the snowpack.

In the case that you want to run a manual scan, this script must be executed with appropriate permissions, so execute it using only sc.exe control SnowInventoryAgent5 128, as described in the Windows Agent - Command line topic on Snow Docs.

For debugging purposes, the script can be executed manually and supports common parameters, so you will receive detailed logs using the command Scan-SIJSLauncher.ps1 -Debug -InformationAction 'Continue'.

The Snow Inventory Java Scanner must be in the root layer of the Snow Inventory Agent folder.

The script looks for the Snow Inventory Java Scanner sijs.jar in the following paths:

  • $env:ProgramFiles\Snow Software\Inventory\Agent
  • $env:snow_agent

It also checks for the SnowInventoryAgent5 service path using Get-WMIObject or Get-Service.

The script looks for the snowagent.config file in the identified agent paths and extracts the value of the env.java_home setting, if set. This is then used as first java source.

The script checks the following paths for Java Installations:

  • $env:ProgramFiles(x86)\Common Files\Oracle\Java\javapath\java.exe
  • $env:ProgramFiles\Common Files\Oracle\Java\javapath\java.exe
  • $($env:JAVA_HOME)bin\java.exe
  • $env:ProgramFiles\Java\jre6\bin\java.exe
  • $env:windir\System32\java.exe

The script checks the following registry locations for javahome paths:

  • HKLM:\SOFTWARE\JavaSoft\Java Runtime Environment
  • HKLM:\SOFTWARE\JavaSoft\Java Development Kit

Furthermore, it uses the Get-Command CmdLet to identify existing Java installations.

Once it identified sijs.jar and java.exe, the script starts the Snow Inventory Java Scanner using the identified Java installation.

It returns the script manifest using the name Scan-SIJSLauncher.

MediumIntegrity

This script does need medium integrity to find java and execute the the Snow Inventory Oracle Middleware Scanner.

Troubleshooting

Custom encryption might need to be applied to this script when running on Snow Inventory Agent for Windows prior to version 7, as it will not be executed in medium integrity.

NEW

  • Snow Inventory Agent for Windows 7 support.
  • The script is now signed by Snow Software AB.

DEPRECATED

  • There will be no encrypted snow-ps1 version of this script provided by Snow Software.

Flexera does not own the third party trademarks, software, products, or tools (collectively, the "Third Party Products") referenced herein. Third Party Product updates, including user interface updates, may not be reflected in this content.