|
| Inicio → WINDEV 2024 → [WD19 & Win8.1] The requested operation requires elevation (740) |
| [WD19 & Win8.1] The requested operation requires elevation (740) |
| Iniciado por guest, 29,nov. 2014 13:01 - 4 respuestas |
| |
| | | |
|
| |
| Publicado el 29,noviembre 2014 - 13:01 |
Hi All
I am trying to launch a third party exe from my ERP. It checks for the existence of certain types of files in a certain directory and then sends them to the third party. When calling it with WD19's Exerun I get the following error:
"Unable to lauch 'file path and name' executable: The requested operation requires elevation (740)"
When called from a file manager (Total Commander), I can launch the same program after first closing a pop up window asking whether it's ok to launch. But I do not get the pop up window when using Exerun in my ERP, just the error.
Quite obviously this is caused by Windows' inbuilt terroristvirus called UAC. In Windows 8.1 this problem is no longer totally controllable from the UAC setting slider window, like it was in 7.
So I disabled the EnableUA key in the Windows register: HKEY_LOCAL_MACHINE -> Software -> Microsoft -> Windows -> CurrentVersion -> Policies -> System -> EnableUA = 0
Now the program can be run from Total Commander without any pop-ups disturbing the user, but WD19's Exerun still can't run it; it still gives the same error.
Any suggestions on how to handle this problem in Windev 19?
Best regards Ola |
| |
| |
| | | |
|
| | |
| |
| Publicado el 29,noviembre 2014 - 13:18 |
Hi Ola,
Perhaps ShellExecute(Fexedir()+"\YourExe.exe") can do the trick?
Cheers Tor-Bjarne |
| |
| |
| | | |
|
| | |
| |
| Publicado el 29,noviembre 2014 - 20:03 |
Hi Tor-Bjarne
Yes! ShellExecute does the trick. Many thanks!
I thought that it is used only for opening a document with the associated app, but indeed, it also launches a plain exe file.
Now I am wondering, whether I should replace Exerun with ShellExecute everywhere in my app...
best regards Ola |
| |
| |
| | | |
|
| | |
| |
| Publicado el 30,noviembre 2014 - 13:26 |
Hi,
I would consider it, my understanding of shellexecute is like a doubleclick on a file in the file explorer. If a exefile open, if a pdf file open acrobat and load and so on <img src="/NG2013_WEB/ui/smiley/1.gif" align=absmiddle border=0 alt=":)">
But exerun give you some options like exeDontWait, exeIconize and so forth. So it depends on what you want.
There is (probably) a Windows API that can start an exe and ask for elevation/permission (or a adminuser and password as input) but here you got to ask some WInDev/Windows API experts, as I have not done this mutch 
Cheers Tor-Bjarne |
| |
| |
| | | |
|
| | |
| |
| Publicado el 01,diciembre 2014 - 14:50 |
Hi guys,
Indeed this is possible to start an EXE which has no specific manifest file in elevated mode by code. But this is a bit complex. Couple years ago an article in the LST 86 (p. 32) was giving some code on how to do it that way.
We have used a slightly modified version of that code example for years and works very well. (So we were able to restart our own application in elevated mode, if it detected drivers were missing, to automatically install what was missing without needing a special install software.)
I guess if it is of interest to you, you could ask the Free Technical Support team to get your hand on the code example.
Best regards, Alexandre Leclerc |
| |
| |
| | | |
|
| | | | |
| | |
|