Hi All,
I am new to powershell and trying to write a script to automate .exe installation process. I have custom product and wants to install on local VM which is running on windows 8.
Following script downloads and uncompress the .exe file and shows GUI popup. Can someone help me how to handle GUI with powershell.
Such as click next button and accept terms and conditions radion button etc.
$url = $args[0]
$path = "C:\temp\test.exe"
$client = new-object System.Net.WebClient
$client.DownloadFile($url, $path)
#Invoke-Command -ScriptBlock {Start-Process -Wait -FilePath 'C:\Documents and Settings\user\Desktop\scripts\dbsetup_trial.exe' -ArgumentList '/S' -PassThru -Verb runas}
$result = Start-Process -Wait -FilePath $path
if($result.exitCode -eq 0){
write-host "Successfully installed"
}