How to automate Install/Uninstall Software in Windows

Ask general questions here.
semate
Posts: 19
Joined: Tue Jul 03, 2018 7:42 am

How to automate Install/Uninstall Software in Windows

Post by semate » Tue Aug 06, 2019 8:20 am

Hi!

When installing or deinstalling my software under test in windows 10 a safety dialog pops up where I have to manually confirm. Rest of the desktop is disabled at that point.
How to automate this with Ranorex?
Is that even possible? I would prefer a Ranorex solution over forcing some system settings on Windows.

Thanks!

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How to automate Install/Uninstall Software in Windows

Post by odklizec » Tue Aug 06, 2019 9:02 am

Hi,

Generally speaking, this kind of popup cannot be controlled by Ranorex (or any other TA tool). I think that the only solution of this problem is either running the test as 'administrator' (may or may not help), or decreasing UAC level...
https://www.cnet.com/how-to/how-to-run- ... dnt-do-it/
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

semate
Posts: 19
Joined: Tue Jul 03, 2018 7:42 am

Re: How to automate Install/Uninstall Software in Windows

Post by semate » Tue Aug 06, 2019 4:37 pm

With the help of my IT guy I found a way around it:

1. Create a new Task in the Windows Task Scheduler (e.g. My_Auto_Install)
2. Check "Run with the highest Privileges" (!)
3. In Actions select your installer exe (or bat file)
4. Execute the Task in Ranorex with Run Application: PowerShell.exe -Command "Start-ScheduledTask -TaskName 'My_Auto_Install'"

Seems to work so far.

Notes:
Setting the UAC to the second lowest step (with destkop visible) didn't work for me. Still couldn't access the Buttons with Spy.
Setting the UAC in the registry didn't get me anywhere either since it went into the same safety confirm dialog.