$newText = $newText -replace "PSAPP ", $ApplicationTitle $newText = $text -replace "PSVENDOR ", $ApplicationPublisher $path = $ContentSourcePath "Deploy-Application.ps1 " Write-host "Modifying installer for the current application " #Modify PSAppDeploy Deploy-Application.ps1 as needed ![]() exe $ContentSourcePath "Files\ " $InstallEXE Move \\server\sources\Utilities\PSAppdeploy\ $ApplicationDownload. #Copy PSAppDeploy base scripts and Ninite installer to the packages FolderĬopy \\server\sources\Utilities\PSAppdeploy\source\ * $ContentSourcePath -recurse ![]() $ContentSourcePath = "\\server\sources\packages\ " $ApplicationPublisher "\ " $ApplicationTitle "\ " $ApplicationTitle $ApplicationSoftwareVersion "\ " $CMApplDeployName = $ApplicationPublisher " " $ApplicationTitle " " $ApplicationSoftwareVersion " PSAppDeploy " $CMAppDisplayName = $ApplicationPublisher " " $ApplicationTitle " " $ApplicationSoftwareVersion $InstallEXE = $ApplicationTitle $ApplicationSoftwareVersion ".exe " #Create variables based on package versions $ApplicationSoftwareVersion = $NiniteOutput -replace ".*: " $NiniteOutput = (cmd /c "\\server\sources\Utilities\PSAppdeploy\ninite.exe /select $ApplicationDownload /freeze $ApplicationDownload.exe /silent. Write-host "Creating Content folder and Ninite Installer " ![]() $ApplicationLanguage = ( Get-Culture).Name $DeploymentUninstallCommandLine = "Deploy-Application.ps1 uninstall " $DeploymentInstallCommandLine = "Deploy-Application.ps1 install " #It basically creates a Ninite Pro offline installation of the app, packages PSAppDeploy around it, throws it in SCCM with everything bar the detection method and distributes it. #It also requires the "source" folder which is a slightly modified version of PSAppDeploy 3.1.5, with the modifications being removing the EXE and putting in keywords to replace in the powershell script #This script needs the SCCM 2012 console, Ninite Pro and powershell locally. #Please leave this by section in when distributing the script, this script however does not carry a license. #Created by: Christian Joy, Last Modified 20150901
0 Comments
Leave a Reply. |