main

DownloadsTips

[FREE] Tech Tools

5fa05a17d739c6cb33da928ac0ad1edb.jpg?fit=550%2C204

In this post, you will find many useful tools that will help you in your day to day life while in the field or while working on small projects in your free time.

These can easily be placed on a USB for convenience or in a shared location on your network. I have found many of these utilities useful so I thought it would be a good idea to have them all in one place so anyone can access them.

The type of tools that are listed will help with driver issues, partitioning hard drives or external media, quick anti virus scanning and general operating system tweaks.

Tips

A list of Control Panel Applets

60479.png?fit=768%2C576

Below I have gathered a list of the Control Panel applet commands that can be run from the command prompt, but this list can also be useful for scripting purposes and creating domain policies with 3rd party tools like AppSense.

Tips

How to get MSI product code or GUID with PowerShell

basic-powershell-commands-intro-670x335.png?fit=670%2C335

Save the below script as Get-MSIFileInformation.ps1 to C:\Scripts.

param(
    [parameter(Mandatory=$true)]
    [ValidateNotNullOrEmpty()]
    [System.IO.FileInfo]$Path,
  
    [parameter(Mandatory=$true)]
    [ValidateNotNullOrEmpty()]
    [ValidateSet("ProductCode", "ProductVersion", "ProductName", "Manufacturer", "ProductLanguage", "FullVersion")]
    [string]$Property
)
Process {
    try {
        # Read property from MSI database
        $WindowsInstaller = New-Object -ComObject WindowsInstaller.Installer
        $MSIDatabase = $WindowsInstaller.GetType().InvokeMember("OpenDatabase", "InvokeMethod", $null, $WindowsInstaller, @($Path.FullName, 0))
        $Query = "SELECT Value FROM Property WHERE Property = '$($Property)'"
        $View = $MSIDatabase.GetType().InvokeMember("OpenView", "InvokeMethod", $null, $MSIDatabase, ($Query))
        $View.GetType().InvokeMember("Execute", "InvokeMethod", $null, $View, $null)
        $Record = $View.GetType().InvokeMember("Fetch", "InvokeMethod", $null, $View, $null)
        $Value = $Record.GetType().InvokeMember("StringData", "GetProperty", $null, $Record, 1)
  
        # Commit database and close view
        $MSIDatabase.GetType().InvokeMember("Commit", "InvokeMethod", $null, $MSIDatabase, $null)
        $View.GetType().InvokeMember("Close", "InvokeMethod", $null, $View, $null)          
        $MSIDatabase = $null
        $View = $null
  
        # Return the value
        return $Value
    }
    catch {
        Write-Warning -Message $_.Exception.Message ; break
    }
}
End {
    # Run garbage collection and release ComObject
    [System.Runtime.Interopservices.Marshal]::ReleaseComObject($WindowsInstaller) | Out-Null
    [System.GC]::Collect()
}