[Bug 51957] New: Program started via HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths should also be started if extension ".exe" is missing
https://bugs.winehq.org/show_bug.cgi?id=51957 Bug ID: 51957 Summary: Program started via HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths should also be started if extension ".exe" is missing Product: Wine Version: 6.19 Hardware: x86-64 OS: Linux Status: NEW Keywords: source Severity: normal Priority: P2 Component: shell32 Assignee: wine-bugs(a)winehq.org Reporter: xerox.xerox2000x(a)gmail.com Distribution: --- Created attachment 70937 --> https://bugs.winehq.org/attachment.cgi?id=70937 possible patch Hi, I found this as installer of adobe digital editions is failing in chocolatey. First autohotkey is installed, i guess to press some button from license agreement. After that script tries to install adobe digital editions but fails at a line: $ahkProc = Start-Process -FilePath 'AutoHotKey' ` -ArgumentList $ahkRun ` -PassThru Autohotkey is never started as this fails. I tested on windows and then both: Start-Process -FilePath 'AutoHotKey' and Start-Process -FilePath 'AutoHotKey.exe' succeed. In wine only the last one succeeds. Attached a patch that fixes this; Maybe needs more error checking? Hints for improvement welcome; Additional note: due to install-script for autohotkey following key is present: [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\AutoHotkey.exe] @="C:\\Program Files\\AutoHotkey\\AutoHotkey.exe" -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51957 Louis Lenders <xerox.xerox2000x(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51957 --- Comment #1 from Ken Sharp <imwellcushtymelike(a)gmail.com> --- Comment on attachment 70937 --> https://bugs.winehq.org/attachment.cgi?id=70937 possible patch What about .com, .bat, .pif, etc? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51957 --- Comment #2 from Louis Lenders <xerox.xerox2000x(a)gmail.com> --- Created attachment 70948 --> https://bugs.winehq.org/attachment.cgi?id=70948 test executable I did a bit more testing, and it turns out that Autohotkey does successfully start when you start it via "cmd /c Autohotkey", but it doesn't when trying to start via the PSconsole. So I put extra traces in the in shelexec.c to find the difference and it looks like essential difference is: Via cmd one gets in ShellExecuteExW for sei->lpVerb: L"open" whereas via PSconsole one gets: sei->lpVerb NULL I have attached test-executable that replicates the problem, and source below. To avoid having to install Autohotkey, it tries to start something outside the path, like ngen.exe On windows this successfully is started (via ShellExecuteExW), whereas in wine this fails. I`ll see if i try add test to wine Source of test executable: #include <windows.h> #include <stdio.h> int __cdecl wmain( int argc, WCHAR *argv[] ) { HKEY hk; WCHAR app_pathW[] = L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\ngen.exe"; WCHAR exe_pathW[] = L"c:\\windows\\MicroSoft.NET\\Framework\\v4.0.30319\\ngen.exe"; BOOL success = FALSE; SHELLEXECUTEINFOW sei; memset( &sei, 0, sizeof( sei ) ); sei.cbSize = sizeof( sei ); // sei.lpVerb = NULL; sei.lpFile = L"ngen"; sei.fMask = 1344; sei.nShow = 1; RegCreateKeyW( HKEY_LOCAL_MACHINE, app_pathW, &hk ); RegSetValueExW(hk, NULL, 0, REG_SZ, (LPBYTE) exe_pathW, sizeof(WCHAR) * ( lstrlenW(exe_pathW)+1)); RegCloseKey( hk ); printf("Trying to start ngen via App Paths...\n"); success = ShellExecuteExW( &sei ); if ( success ) printf("successfully started ngen.exe\n"); else printf("No success!!!!!!!!!!!!!\n"); RegDeleteKeyW( HKEY_LOCAL_MACHINE, app_pathW); return 0; } -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51957 Louis Lenders <xerox.xerox2000x(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #70937|0 |1 is obsolete| | --- Comment #3 from Louis Lenders <xerox.xerox2000x(a)gmail.com> --- Created attachment 70949 --> https://bugs.winehq.org/attachment.cgi?id=70949 possible patch Attached a simple patch that fixes the bug, but I don`t know if this is the right way to fix it -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51957 --- Comment #4 from Louis Lenders <xerox.xerox2000x(a)gmail.com> --- Created attachment 70951 --> https://bugs.winehq.org/attachment.cgi?id=70951 tests for App Paths Attached some tests for App Paths. There keep coming some failures on win10, but they are not related to these tests (tested with a noop patch) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51957 Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |leslie_alistair(a)hotmail.com Status|NEW |STAGED Staged patchset| |https://github.com/wine-sta | |ging/wine-staging/tree/mast | |er/patches/shell32-registry | |-lookup-app -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51957 Zeb Figura <z.figura12(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|STAGED |RESOLVED CC| |z.figura12(a)gmail.com Fixed by SHA1| |4edfe426e45de2d50401c234947 | |c92020805e11e --- Comment #5 from Zeb Figura <z.figura12(a)gmail.com> --- Fixed upstream by <https://source.winehq.org/git/wine.git/commitdiff/4edfe426e45de2d50401c234947c92020805e11e>. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51957 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #6 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 9.5. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51957 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |9.0.x -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=51957 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|9.0.x |--- --- Comment #7 from Michael Stefaniuc <mstefani(a)winehq.org> --- Removing the 9.0.x milestone from bug fixes included in 9.0.1. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla