Merge branch 'main' of https://git.steelants.cz/JonatanRek/INT_PKG_BUILDER
This commit is contained in:
commit
57c10bfebc
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
v1.8.6/*
|
||||
build/*.intunewin
|
||||
|
File diff suppressed because one or more lines are too long
11
apps/FortigateVPN/check.ps1
Normal file
11
apps/FortigateVPN/check.ps1
Normal file
@ -0,0 +1,11 @@
|
||||
$ProgramName = "FortiClientVPN"
|
||||
#$ProfileName = "DEMO scloud" # Change to your Profilename!
|
||||
$ProgramVersion_target = '7.4.0.1658' # Set to version from MSI
|
||||
$ProgramPath = "C:\Program Files\Fortinet\FortiClient\FortiClient.exe"
|
||||
$ProgramVersion_current = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($ProgramPath).FileVersion
|
||||
#$RegPath = "HKLM:\SOFTWARE\Fortinet\FortiClient\Sslvpn\Tunnels\$ProfileName"
|
||||
#$RegContent = Get-ItemProperty -Path $RegPath
|
||||
|
||||
if(($ProgramVersion_current -eq $ProgramVersion_target) <#-and ($RegContent)#>){
|
||||
Write-Host "Found it!"
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
Windows Registry Editor Version 5.00
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Fortinet\FortiClient\Sslvpn]
|
||||
Windows Registry Editor Version 5.00
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Fortinet\FortiClient\Sslvpn]
|
||||
"WinDnsCacheService"=dword:00000002
|
@ -4,12 +4,12 @@ $installerName = "FortiClient_v7.4.0.1658.msi"
|
||||
Start-Transcript -Path "$PathIntune\Log\FortigateVPN-install.log" -Force
|
||||
|
||||
$installerPath = ('./bin/' + $installerName)
|
||||
$installArgs = "/install","/quiet","/norestart"
|
||||
$installArgs = "/quiet","/norestart"
|
||||
Start-Process -FilePath $installerPath -ArgumentList "$installArgs" -Wait
|
||||
Write-Host ("Fortigate VPN Installed versions installed: " + $installerName)
|
||||
|
||||
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)
|
||||
{
|
||||
Write-Host ("Profile [{0}] Imported" -f $folder.Name)
|
||||
|
16
apps/FortigateVPN/uninstall.ps1
Normal file
16
apps/FortigateVPN/uninstall.ps1
Normal file
@ -0,0 +1,16 @@
|
||||
$PathIntune = "$Env:Programfiles\itego\intune"
|
||||
Start-Transcript -Path "$PathIntune\Log\FortigateVPN-uninstall.log" -Force
|
||||
|
||||
# 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
|
||||
}
|
||||
0
|
||||
|
||||
Stop-Transcript
|
@ -1,25 +1,25 @@
|
||||
# array of uninstall args
|
||||
$uninstallArgs = "/uninstall"," ","/quiet", "IGNOREDEPENDENCIES=ALL"
|
||||
$dotnetVersions = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -like "Microsoft .NET*" }
|
||||
|
||||
foreach ($version in $dotnetVersions) {
|
||||
# update array index 1 with version id
|
||||
$uninstallArgs[1] = '"' + $version.IdentifyingNumber + '"'
|
||||
Write-Host "Uninstalling $($version.Name)... $("$uninstallArgs")"
|
||||
Start-Process -FilePath "msiexec.exe" -ArgumentList "$uninstallArgs" -Wait
|
||||
}
|
||||
|
||||
Write-Host "All Microsoft .NET versions uninstalled."
|
||||
|
||||
#$uri = "https://download.visualstudio.microsoft.com/download/pr/f1e7ffc8-c278-4339-b460-517420724524/f36bb75b2e86a52338c4d3a90f8dac9b/windowsdesktop-runtime-8.0.12-win-x64.exe"
|
||||
$uri = "https://download.visualstudio.microsoft.com/download/pr/136f4593-e3cd-4d52-bc25-579cdf46e80c/8b98c1347293b48c56c3a68d72f586a1/dotnet-runtime-8.0.12-win-x64.exe"
|
||||
$installerName =($uri -split "/")[-1]
|
||||
$installerPath = ('./bin/' + $installerName)
|
||||
if (-not (Test-Path -Path $installerPath)){
|
||||
Invoke-WebRequest -Uri $uri -OutFile $installerPath
|
||||
}
|
||||
|
||||
$installArgs = "/install","/quiet","/norestart"
|
||||
Start-Process -FilePath $installerPath -ArgumentList "$installArgs" -Wait
|
||||
|
||||
Write-Host ("Microsoft .NET versions installed: " + $installerName)
|
||||
# array of uninstall args
|
||||
$uninstallArgs = "/uninstall"," ","/quiet", "IGNOREDEPENDENCIES=ALL"
|
||||
$dotnetVersions = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -like "Microsoft .NET*" }
|
||||
|
||||
foreach ($version in $dotnetVersions) {
|
||||
# update array index 1 with version id
|
||||
$uninstallArgs[1] = '"' + $version.IdentifyingNumber + '"'
|
||||
Write-Host "Uninstalling $($version.Name)... $("$uninstallArgs")"
|
||||
Start-Process -FilePath "msiexec.exe" -ArgumentList "$uninstallArgs" -Wait
|
||||
}
|
||||
|
||||
Write-Host "All Microsoft .NET versions uninstalled."
|
||||
|
||||
#$uri = "https://download.visualstudio.microsoft.com/download/pr/f1e7ffc8-c278-4339-b460-517420724524/f36bb75b2e86a52338c4d3a90f8dac9b/windowsdesktop-runtime-8.0.12-win-x64.exe"
|
||||
$uri = "https://download.visualstudio.microsoft.com/download/pr/136f4593-e3cd-4d52-bc25-579cdf46e80c/8b98c1347293b48c56c3a68d72f586a1/dotnet-runtime-8.0.12-win-x64.exe"
|
||||
$installerName =($uri -split "/")[-1]
|
||||
$installerPath = ('./bin/' + $installerName)
|
||||
if (-not (Test-Path -Path $installerPath)){
|
||||
Invoke-WebRequest -Uri $uri -OutFile $installerPath
|
||||
}
|
||||
|
||||
$installArgs = "/install","/quiet","/norestart"
|
||||
Start-Process -FilePath $installerPath -ArgumentList "$installArgs" -Wait
|
||||
|
||||
Write-Host ("Microsoft .NET versions installed: " + $installerName)
|
||||
|
@ -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"
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user