Skip to content

Commit

Permalink
add instructions to wingetResult array
Browse files Browse the repository at this point in the history
  • Loading branch information
technoluc committed May 21, 2022
1 parent 6abe97d commit 78209f9
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions winutil.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ $WPFinstall.Add_Click({
$wingetResult.Add("$node`n")
}
If ( $wingetinstall -eq "Microsoft.OfficeDeploymentTool" )
{
{ $wingetResult.Add("Please execute install.cmd as Administrator from C:\Program Files\OfficeDeploymentTool. After installation completes execute activate.cmd")
Start-Process powershell.exe -Verb RunAs -ArgumentList "-command iwr -outf 'C:\Program Files\OfficeDeploymentTool\config.xml' 'https://github.com/technoluc/winutil/raw/main/office/deploymentconfig.xml' ; iwr -outf 'C:\Program Files\OfficeDeploymentTool\install.cmd' 'https://github.com/technoluc/winutil/raw/main/office/deploymentinstall.cmd' ; iwr -outf 'C:\Program Files\OfficeDeploymentTool\activate.cmd' 'https://github.com/technoluc/winutil/raw/main/office/ActivateOffice21.cmd'"
}

Expand All @@ -395,12 +395,7 @@ $WPFinstall.Add_Click({
# Popup after finished
$ButtonType = [System.Windows.MessageBoxButton]::OK
$MessageboxTitle = "Installed Programs "
if ( $wingetinstall -eq "Microsoft.OfficeDeploymentTool" ) {
$Messageboxbody = ( "Please execute install.cmd as Administrator from C:\Program Files\OfficeDeploymentTool. After installation completes execute activate.cmd" )
}
else {
$Messageboxbody = ($wingetResult)
}
$Messageboxbody = ($wingetResult)
$MessageIcon = [System.Windows.MessageBoxImage]::Information

[System.Windows.MessageBox]::Show($Messageboxbody,$MessageboxTitle,$ButtonType,$MessageIcon)
Expand Down

0 comments on commit 78209f9

Please sign in to comment.