Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 8583

Need help. Newbie on PowerShell. Currently using PSAppDeployment Toolkit for SCCM 2012 SP1 CU3

$
0
0

I'm trying to detect .net extended via registry uninstall GUID {8E34682C-8118-31F1-BC4C-98CD9675E1C2}. Once detected, I would like dotNetFx40_Full_x86_x64.exe not to install but if not detected, I would like dotNetFx40_Full_x86_x64.exe to be installed and followed by the BrainStorm application installation. See script below. It is currently set to continueonerror but it always install .net even if it is detected. Thanks for all of your help.

#*===============================================
#* PRE-INSTALLATION
If ($deploymentType -ne "uninstall") { $installPhase = "Pre-Installation"
#*===============================================
 # Show Welcome Message, close applications if required, allow up to 3 deferrals
    Show-InstallationWelcome -CloseApps "iexplore,excel,groove,onenote,infopath,onenote,outlook,mspub,powerpnt,winword,winproj,visio" -AllowDefer -DeferTimes 3
 # Show Progress Message (with the default message)
 # Scans for .NET Extended Installation
 Get-RegistryKey "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{8E34682C-8118-31F1-BC4C-98CD9675E1C2}" -ContinueOnError
    # Show Installation in Progress
 Show-InstallationProgress "BrainStorm 3.02 Installation in Progress..." -WindowLocation "BottomRight" -TopMost $false
    # Remove any previous versions of BrainStorm
    Remove-MSIApplications "BrainStorm"
#*===============================================
#* INSTALLATION
$installPhase = "Installation"
#*===============================================
 # Install the base EXE
 Execute-Process -FilePath "dotNetFx40_Full_x86_x64.exe" -Arguments "/q /norestart"
 
    # Install the base MSI and apply a transform
    Execute-MSI -Action Install -Path "BrainStormQuickHelpX86.msi" -Transform "Brainstorm_Training_3.0.mst" -Parameters "DESKTOPICON=0 LOGINMETHOD=SSO COMPANYNAME=test.com /QN"

 


Viewing all articles
Browse latest Browse all 8583

Latest Images

Trending Articles



Latest Images