Skip to content

Commit

Permalink
Update to v1.0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kernaltrap8 authored Nov 27, 2022
1 parent 8620086 commit c1b623f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion MSI-extractor.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ Add-Type -AssemblyName System.Windows.Forms

#Use Windows Forms to open a file select dialog

Write-Output ("What MSI do you want me to extract?")

$FileBrowser = New-Object System.Windows.Forms.OpenFileDialog -Property @{
InitialDirectory = [Environment]::GetFolderPath('Desktop')
Filter = 'Windows Packages (*.msi)|*.msi'
Expand All @@ -11,21 +13,27 @@ $Out = $FileBrowser.ShowDialog() #Display the dialog

#Select output directory

Write-Output ("What folder do you want me to extract the content to?")

$FolderBrowser = New-Object System.Windows.Forms.FolderBrowserDialog -Property @{
Description = 'Output'
}

$Out = $FolderBrowser.ShowDialog() #Display the dialog

Write-Output ("Extracting...")

$FolderBrowser.SelectedPath #Variable stuff

msiexec /a $FileBrowser.FileName /qb TARGETDIR=$($FolderBrowser.SelectedPath) # This uses the built in Windows tool to extract the MSI

Write-Output ("Done! Go to the path you provided to see the contents.")

#A helpful message

$Shell = New-Object -ComObject "WScript.Shell"
$Button = $Shell.Popup("Once you install the MSI using this PowerShell script, please add any programs that run from a shell (i.e. CMD, PowerShell) be added to Path.
To add a program to path, search for Control Panel in Windows Search, and open it. Once in Control Panel,
select User Accounts, then User Accounts again. On the side bar, select Change my Enviorment Variables.
Select the Path variable, and then Edit. Select a unfilled box, and type the path to the program (for most, it can be just the root folder, some may need to be bin) and then Ok, and Ok again.
You WILL need to restart any open shells.", 0, "Thank you for using MSI-Extractor", 0)
You WILL need to restart any open shells.", 0, "Thank you for using MSI-Extractor", 0)

0 comments on commit c1b623f

Please sign in to comment.