Hello Everyone
setx RLM_LICENSE "******@SERVERNAME.NETWORK.NET" /M
Start-Process -FilePath "Converge5.11.exe" -ArgumentList "/S" -Wait
Im trying to set up a simple installation script that installs an application (Converge) and then it should also set up an Environment variable for a License server:
The issue is that Intune just skips the Environment command (or it doesn't work properly because I have to run it in System Context). The command does work when I add it manually after the fact over the terminal. Is there any way to circumvent this issue? I also tried it with Powershell, but it doesn't even work manually with powershell,I tried this script here:
Start-Transcript -Path "C:\Windows\Temp\converge_install.log" -Append
# Set in current process so installer can use it
$env:RLM_LICENSE = "2765@SERVERNAME.NETWORK"
Write-Host "RLM_LICENSE in process: '$env:RLM_LICENSE'"
Start-Sleep -Seconds 2
# Run installer
Write-Host "Starting Converge5.11.exe installer..."
Start-Process -FilePath "Converge5.11.exe" -ArgumentList "/S" -Wait
Write-Host "Installer exited"
# NOW set variable via CMD using setx (machine-level)
Write-Host "Setting RLM_LICENSE via CMD (setx)..."
Start-Process -FilePath "cmd.exe" -ArgumentList "/c setx ******@SERVER.NET /M" -Wait -NoNewWindow
# Optional: verify from registry again
$check = [Environment]::GetEnvironmentVariable("RLM_LICENSE", "Machine")
Write-Host "RLM_LICENSE in registry after CMD setx: '$check'"
Stop-Transcript
Thank you for your help.
Kind regards,
Gabriel