Right now, I'm packaging some piece of software intune for which the developers didn't intend a silent-install-mode. Without a silent-install the manual rollout of this software would be very tiresome. The installation-routine is rather easy. I just need to start the software and press Enter in a certain interval. It is no big deal.
I've played around with the python-package pyautogui and I'm aware of the existence of AutoIt, but I want to realize the task without any dependencies. I just want to work with given windows-utilities.
I've come up with this script.
Write-Host "Starting program Setup..."
Write-Host "$PWD\SETUP.EXE"
Start-Process -FilePath "$PWD\SETUP.EXE"
Write-Host "Sleepin' 40 secs'..."
Start-Sleep 40
$wshell = New-Object -ComObject wscript.shell;
Not needed because focus goes automatically there
$wshell.AppActivate('Installer Windows Title')
Start-Sleep 10
Write-Host "Sleepin' 10 secs'..."
$wshell.SendKeys('~') # Enter
Write-Host "Sleepin' 20 secs'..."
Start-Sleep 20
$wshell.SendKeys('~') # Enter
Write-Host "Sleepin' 5 secs'..."
Start-Sleep 5
if (Test-Path "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\my-program.lnk" ){
Write-Host "progam-install was successful!"
}else{
Write-Host "program-install was not successful..."
}
The sleeping is for the time in between when SETUP.EXE is running their task.
On my local machine with administrative rights, the program gets installed successfully. Deployed via an intune-package the GUI will not open and the program won't get installed.
Is it even possible for gui-installer to open when deployed over intune? By the intune-option Install Behavior the install is done via System. Could this be an issue? Does anyone got experience with such a task?
Thank you for your time.