how to app.open() Microsoft service.msc or gpedit.msc

Asked by jia

I have tried to open Windows service console app or group policy app console, somehow sikuli can not find the app in the path.
My guess is sikuli can only open app with *.exe, if you tried something else like *.msc, it will not work.

Here is script that I used: myapp=App(r'c:\Windows\System32\services.msc')
                                                 myapp.open()

The error will be : App.open failed: c:\Windows\System32\services.msc not found

Is this a bug? If I type services.msc in Dos window, it will open console. I make sure Windows\system32 is in PATH

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

--1. you are right
only .exe and .cmd are working. a .msc definitely not.
you might use os.popen to start an .msc

import os
os.popen(r'c:\Windows\System32\services.msc')

--2. .msc windows refuse to accept Sikuli actions
These console windows are somehow blocking the click actions. (see bug 794489)
S o you cannot use Siukuli currently to automate this stuff.

Revision history for this message
jia (klondike-4u) said :
#2

Thanks RaiMan, that solved my question.

Revision history for this message
jia (klondike-4u) said :
#3

Thanks RaiMan

Revision history for this message
RaiMan (raimund-hocke) said :
#4

For the action blocking I found a workaround: faq 1771

Revision history for this message
daluu (cuuld) said :
#5

Just wondering, what other file extensions are not supported by Sikuli/App.open command?

Wonder if App.open('start pathTo\yourFile.extension') will work.