Fixes to FG Install
This commit is contained in:
parent
f173df46e4
commit
f80333d14b
@ -4,12 +4,12 @@ $installerName = "FortiClient_v7.4.0.1658.msi"
|
|||||||
Start-Transcript -Path "$PathIntune\Log\FortigateVPN-install.log" -Force
|
Start-Transcript -Path "$PathIntune\Log\FortigateVPN-install.log" -Force
|
||||||
|
|
||||||
$installerPath = ('./bin/' + $installerName)
|
$installerPath = ('./bin/' + $installerName)
|
||||||
$installArgs = "/install","/quiet","/norestart"
|
$installArgs = "/quiet","/norestart"
|
||||||
Start-Process -FilePath $installerPath -ArgumentList "$installArgs" -Wait
|
Start-Process -FilePath $installerPath -ArgumentList "$installArgs" -Wait
|
||||||
Write-Host ("Fortigate VPN Installed versions installed: " + $installerName)
|
Write-Host ("Fortigate VPN Installed versions installed: " + $installerName)
|
||||||
|
|
||||||
foreach ($folder in (Get-ChildItem -Path ("{0}/config/" -f $PSScriptRoot) -Filter "vpn*.reg")) {
|
foreach ($folder in (Get-ChildItem -Path ("{0}/config/" -f $PSScriptRoot) -Filter "vpn*.reg")) {
|
||||||
$process = Start-Process -Path reg.exe -ArgumentList @("Import", $folder.FullName) -Wait -PassThru
|
$process = Start-Process -FilePath reg.exe -ArgumentList @("Import", $folder.FullName) -Wait -PassThru
|
||||||
If($process.ExitCode)
|
If($process.ExitCode)
|
||||||
{
|
{
|
||||||
Write-Host ("Profile [{0}] Imported" -f $folder.Name)
|
Write-Host ("Profile [{0}] Imported" -f $folder.Name)
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
# array of uninstall args
|
||||||
|
$uninstallArgs = "/uninstall"," ","/quiet", "/norestart"
|
||||||
|
$dotnetVersions = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -eq "FortiClient VPN*" }
|
||||||
|
|
||||||
|
foreach ($version in $dotnetVersions) {
|
||||||
|
# update array index 1 with version id
|
||||||
|
$uninstallArgs[1] = '"' + $version.IdentifyingNumber + '"'
|
||||||
|
Write-Host "Uninstalling $($version.Name) ($($version.Version))... $("$uninstallArgs")"
|
||||||
|
Start-Process -FilePath "msiexec.exe" -ArgumentList "$uninstallArgs" -Wait
|
||||||
|
}
|
@ -17,6 +17,7 @@ foreach ($folder in (Get-ChildItem -Path "./apps/" )) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Remove-Item -Path ("./build/{0}.intunewin" -f $folder.Name) -Force
|
||||||
$buildArgs = "-c", $folder.FullName, "-s", $sourceFile.FullName, "-o", "./build/", "-q"
|
$buildArgs = "-c", $folder.FullName, "-s", $sourceFile.FullName, "-o", "./build/", "-q"
|
||||||
Start-Process -FilePath ('./v{0}/Microsoft-Win32-Content-Prep-Tool-{0}/IntuneWinAppUtil.exe' -f $version) -ArgumentList "$buildArgs" -Wait
|
Start-Process -FilePath ('./v{0}/Microsoft-Win32-Content-Prep-Tool-{0}/IntuneWinAppUtil.exe' -f $version) -ArgumentList "$buildArgs" -Wait
|
||||||
Move-Item -Path ("./build/{0}.intunewin" -f ($sourceFile.Name -split "\.")[0]) -Destination ("./build/{0}.intunewin" -f $folder.Name)
|
Move-Item -Path ("./build/{0}.intunewin" -f ($sourceFile.Name -split "\.")[0]) -Destination ("./build/{0}.intunewin" -f $folder.Name)
|
||||||
|
Loading…
Reference in New Issue
Block a user