leexgone / uiautomation-rs

The uiatomation-rs crate is a wrapper for windows uiautomation. This crate can help you make windows uiautomation API calls conveniently.
Apache License 2.0
87 stars 15 forks source link

How to create a non-exe-process? #40

Closed valeriigamaley closed 1 year ago

valeriigamaley commented 1 year ago

Introduction:

Hello again, guys. Now I have a common question: can I run a non-exe-process (such as .msi, or etc.)? Because Process::create(path_to_exe) works nice and start all exe installers, but if i tried that on .msi Process::create(path_to_msi) processes, it does not work. Can I use Process to start .msi installers?

Steps to reproduce:

  1. Get some .msi installer
  2. Try create process using a path to .msi

Software: Win10 x64, rustc 1.69, cargo 1.69, uiautomation 0.51

leexgone commented 1 year ago

There is a msiexec command to invoke .msi files. You can pass the .msi file name as an argument to this command.

msiexec.exe /i "C:\example.msi" /qn

You may try this.

valeriigamaley commented 1 year ago

that working idea, but msiexec need full path to run package installer. thx, i will think about how use non-full path to execute)