Closed megabugman closed 2 years ago
Can you give me some example of application, so as I can replicate the issue?
Sure. How can I send you a private message/file? I've uploaded a sample file here: https://easyupload.io/aqjg8f plz use download134 and OptionToExecuteAsAdmin#134
FYI, in version 2.1.0.1568 the crash no longer occurs when running applications.
Strangely enough, the crash was solved by itself (!?), but the issue remains. ASuite can't run executable that needs admin permissions (UAC).
This is because ASuite no longer uses the Windows ShellExecute method directly, but CreateProcessW (via FreePascal library) and the latter CANNOT run executables that require admin permissions.
So I'll have to insert code to be able to execute the ShellExecute method in these cases, as a fallback. And if the latter still fails, report the error by message.
I was too quick, as you have stated the issue persists. this is the screenshot:
With the commit ab830727080ea4675d740002a0e33f2efc8f2aeb I added the fallback code and now ASuite should be able to run all executables without problems as before.
Please test it and if there are still problems reopen this issue without problems. Thank you very much
issue persists in 2.1.0.1591, see test file
there seems to be an issue with the icon as well:
Edit: actually the issue is fixed as the application starts normally, but you should remove the two MessageBoxex:
I did more tests in 2.1.0.1588, apps run as expected, in 2.1.0.1591 not! From what I can tell the culprit seems to be Installer: Nullsoft Scriptable Install System
@megabugman Another test with commit 71442117192800a3775655174ae61fd605d28ee3 (https://github.com/salvadorbs/Asuite/actions/runs/1405098581). Please test it. I hope it's the right time. Thank you very much. 😄
OK, thanks it works now. I'll open a new issue regarding the icon display problem.
sorry, it worked yesterday. today not, I'm using 2.1.0.1600. I hope you can reproduce the issue:
Why not use an apimonitor and spy on other program launchers? You may want to add some sort of logging in case a thread has existed immediately. My 2 cents.
Why not use an apimonitor and spy on other program launchers? You may want to add some sort of logging in case a thread has existed immediately. My 2 cents.
It's a great idea, but I'm having trouble detecting which api are used in other launchers (eg pstart).
Which function are you using? Try
https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecutew
Great, I had assumed that PStart used the ShellExecuteW API. ASuite uses freepascal TProcess (so internally CreateProcessW in Windows) to have shared code between Windows and Linux.
With this PR https://github.com/salvadorbs/Asuite/pull/146, I decided to go back to having two different codes. In Windows I will use ShellExecuteEx, while in Linux I will use TProcess. This PR is not yet complete, as there is still no support for custom environment variables in Windows. But I believe you can already start testing.
All applications start so far in 2.1.0.1611. I keep testing...
Works as expected also 2.1.0.1613, closing report
some applications do not start, they crash immediately. These applications work if "run as admin". Please add an option in properties to run application always as admin.![image](https://user-images.githubusercontent.com/17204819/130959693-4947cbaa-523c-4619-b09a-2265b382e8cf.png)