Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources: Active Threads
Viewing all articles
Browse latest Browse all 8411

Install EXE file with with GUI popup

$
0
0

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"
     }

 


Viewing all articles
Browse latest Browse all 8411

Latest Images

Trending Articles



Latest Images