2

I am trying to install a .msi file using powershell. But I cannot find a way to in set check boxes while installation. Anyone know how to do it?

Dketkar
  • 21
  • 3

1 Answers1

0

Typical powershell installation script steps:

1.Invoke-Item ‘C:\Script\somefile.exe’

Run given app (also .msi).

2.Select-Window PROCESS-NAME | Set-WindowActive

Set focus on the installer window, so you are able to send simulated keys to the installer.

3.Select-window PROCESS-NAME | Send-Keys “{ENTER}” | Send-Click

confirms given screen.

4.Select-window PROCESS-NAME | Send-Keys “{TAB}” | Send-Click

switches tabs in a given window.

5.Select-window PROCESS-NAME | Send-Keys ” ” | Send-Click

activates/deactivates active option button.

6.Select-Window PROCESS-NAME | Select-control| Send-Keys “123456789 1234” | Send-Click

gives you the method to fill textboxes.

7.Select-window PROCESS-NAME | Select-control | select-control -title “CHECK-BOX NAME” | Send-Click

The part which you are interested in is point 7. You need to know the checkbox name and then you can send click command to it.

Microsoft reference site.

LookAheadAtYourTypes
  • 1,451
  • 2
  • 20
  • 31