http://bugs.winehq.org/show_bug.cgi?id=24017
Summary: reg /query not implemented Product: Wine Version: 0.9 Platform: x86 OS/Version: Linux Status: NEW Keywords: download, Installer, patch Severity: normal Priority: P2 Component: programs AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com
(Broken out from catchall bug 19533.)
reg /query doesn't work in wine. This breaks several apps, including pando downloader.
Shuyin Lu wrote an implementation of reg /query in March 2010, and intended to submit it to wine-patches, but ran out of time. I'm attaching it here.
http://bugs.winehq.org/show_bug.cgi?id=24017
--- Comment #1 from Dan Kegel dank@kegel.com 2010-08-15 12:34:29 --- Also, David Cournapeau did an implementation; it's at http://github.com/cournape/wine/commits/_reg_query/programs/reg/reg.c
http://bugs.winehq.org/show_bug.cgi?id=24017
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|reg /query not implemented |reg query not implemented
--- Comment #2 from Dan Kegel dank@kegel.com 2010-08-15 12:35:35 --- grr, it's reg query, not reg /query.
http://bugs.winehq.org/show_bug.cgi?id=24017
--- Comment #3 from Dan Kegel dank@kegel.com 2010-08-15 13:11:55 --- Created an attachment (id=30169) --> (http://bugs.winehq.org/attachment.cgi?id=30169) Shuyin's draft patch, attached with permission from the author
http://bugs.winehq.org/show_bug.cgi?id=24017
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|0.9 |1.3.0
http://bugs.winehq.org/show_bug.cgi?id=24017
--- Comment #4 from Dan Kegel dank@kegel.com 2010-08-16 08:43:06 --- Correction: pando downloader runs into this, and crashes shortly thereafter, but the crash isn't related.
http://bugs.winehq.org/show_bug.cgi?id=24017
Myk Taylor myk002@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |myk002@yahoo.com
http://bugs.winehq.org/show_bug.cgi?id=24017
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
--- Comment #5 from Austin English austinenglish@gmail.com 2010-09-27 13:46:29 CDT --- This would also be useful for winetricks, to know if the .Net installroot keys need to be deleted or not (reg delete fails if the key doesn't exist).
http://bugs.winehq.org/show_bug.cgi?id=24017
Anton Romanov theli@ukr.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |theli@ukr.net
http://bugs.winehq.org/show_bug.cgi?id=24017
Amos Wenger amos@official.fm changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |amos@official.fm
--- Comment #6 from Amos Wenger amos@official.fm 2011-04-10 07:45:07 CDT --- Is this still relevant? From my experience in Wine 1.3.17 vanilla, Pando Downloader runs perfectly.
http://bugs.winehq.org/show_bug.cgi?id=24017
--- Comment #7 from Dan Kegel dank@kegel.com 2011-04-10 09:51:17 CDT --- Yes, users need it, if nothing else. And it'd simplify winetricks.
http://bugs.winehq.org/show_bug.cgi?id=24017
--- Comment #8 from Amos Wenger amos@official.fm 2011-04-10 09:53:30 CDT --- Alrighty then, what's wrong with the patch? It looks good to me (except maybe convert_data_to_wchar could be made reusable, it's probably already coded in other areas of Wine.. I suppose?). Why hasn't it been merged yet?
http://bugs.winehq.org/show_bug.cgi?id=24017
--- Comment #9 from Dan Kegel dank@kegel.com 2011-04-10 10:11:32 CDT --- The author has to keep resubmitting the patch and addressing feedback until it's accepted. I will ping David and Shuyin to see if either is willing to pick it up again.
http://bugs.winehq.org/show_bug.cgi?id=24017
Sylvain Petreolle spetreolle@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |spetreolle@yahoo.fr
http://bugs.winehq.org/show_bug.cgi?id=24017
achipa plists@csipa.in.rs changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |plists@csipa.in.rs
http://bugs.winehq.org/show_bug.cgi?id=24017
Guo Jian orzhvs@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |orzhvs@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=24017
lizhenbo litimetal@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |litimetal@gmail.com
--- Comment #10 from lizhenbo litimetal@gmail.com 2013-06-24 02:13:55 CDT --- Does this problem exists in wine 1.6-rc3 now? Also, is this bug blocking bug 25015?
http://bugs.winehq.org/show_bug.cgi?id=24017
--- Comment #11 from Myk Taylor myk002@yahoo.com 2013-06-24 11:33:54 CDT --- (In reply to comment #10)
Does this problem exists in wine 1.6-rc3 now? Also, is this bug blocking bug 25015?
reg query is a stub implementation now. It will always return: STUB QUERY - <key that you are querying> (null) 0 0 regardless of the contents of the key
so I would say that it is not yet implemented. I do not know whether this still affects bug 25015.
http://bugs.winehq.org/show_bug.cgi?id=24017
Hugh McMaster hughmcmaster@outlook.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hughmcmaster@outlook.com
http://bugs.winehq.org/show_bug.cgi?id=24017
--- Comment #12 from Hugh McMaster hughmcmaster@outlook.com 2013-08-24 06:17:43 CDT --- Created attachment 45714 --> http://bugs.winehq.org/attachment.cgi?id=45714 Hugh McMaster's patch
I don't know if anyone is still interested in this functionality, but I've put together a draft patch that implements 'reg.exe query <key> </v> </s>'.
The patch was created against wine 1.7.0.
http://bugs.winehq.org/show_bug.cgi?id=24017
--- Comment #13 from achipa plists@csipa.in.rs 2013-08-25 03:53:57 CDT --- There is (still) interest - I'm using a custom built reg.exe myself based on this patch as the Nokia Asha tools (http://developer.nokia.com/Develop/asha/java/tools.xhtml) use "reg query" to detect the various installed SDKs.
http://bugs.winehq.org/show_bug.cgi?id=24017
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net Summary|reg query not implemented |Multiple applications need | |'reg.exe' 'query' operation | |implementation
--- Comment #14 from Anastasius Focht focht@gmx.net --- Hello folks,
obviously still present.
Source: http://source.winehq.org/git/wine.git/blob/f9c2e21fb1a1425652d3a2b256380be9c...
--- snip --- 359 static int reg_query(WCHAR *key_name, WCHAR *value_name, BOOL value_empty, 360 BOOL subkey) 361 { 362 static const WCHAR stubW[] = {'S','T','U','B',' ','Q','U','E','R','Y',' ', 363 '-',' ','%','s',' ','%','s',' ','%','d',' ','%','d','\n',0}; 364 reg_printfW(stubW, key_name, value_name, value_empty, subkey); 365 366 return 1; 367 } --- snip ---
$wine --version wine-1.7.9-286-g8f53710
Regards
https://bugs.winehq.org/show_bug.cgi?id=24017
hanska2@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hanska2@luukku.com
--- Comment #15 from hanska2@luukku.com --- Still the same 1.7.24
https://bugs.winehq.org/show_bug.cgi?id=24017
J V jonathan-vola@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan-vola@hotmail.com
--- Comment #16 from J V jonathan-vola@hotmail.com --- Created attachment 49451 --> https://bugs.winehq.org/attachment.cgi?id=49451 Updated Shuyin's patch
Tried making my own. I got a few types working but it was too much work and I didn't have a windows machine to check my results against anyway.
Shuyin's patch doesn't apply against wine any more, but no matter, I applied it to an old version and rebased it so this should be up to date.
Haven't eyeballed all the code but it certainly works.
https://bugs.winehq.org/show_bug.cgi?id=24017
--- Comment #17 from J V jonathan-vola@hotmail.com --- One thing I noticed around enum_all_values_subkeys(), `reg query /s` is supposed to "[...]query all subkeys and value names recursively." while this function only does it on one level.
I'm not sure if this is a bug in the patch or yet another case of windows implementation not living up to it's documentation, but either way I've written a patch to get recursion working: https://github.com/jnvsor/wine/commits/daf0e5e5cb5886a435b1db3c75ed3cab0c938...
And yes besides that it looks good, a damn sight better than the current source code of reg anyway :)
https://bugs.winehq.org/show_bug.cgi?id=24017
--- Comment #18 from J V jonathan-vola@hotmail.com --- Cleaned it up a lot, implemented some more missing features, fixed a few crashes.
I wanted to submit it to the wine-patches mailing list but holy shit mailing lists are a pain.
https://github.com/jnvsor/wine/compare/60de49770c0...b7e64971bcb2eab
https://bugs.winehq.org/show_bug.cgi?id=24017
--- Comment #19 from hanska2@luukku.com --- Patches aren't gathered from bug attachments. So you need to send it over...
https://bugs.winehq.org/show_bug.cgi?id=24017
Hugh McMaster hugh.mcmaster@outlook.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #45714|0 |1 is obsolete| |
https://bugs.winehq.org/show_bug.cgi?id=24017
Jeff D. Hanson jhansonxi@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jhansonxi@gmail.com
--- Comment #20 from Jeff D. Hanson jhansonxi@gmail.com --- In Wine 1.8 the query still returning "STUB QUERY".
https://bugs.winehq.org/show_bug.cgi?id=24017
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dmitry@baikal.ru, | |erich.e.hoover@wine-staging | |.com, michael@fds-team.de, | |sebastian@fds-team.de Status|NEW |STAGED Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/reg-Implement_ | |Query
https://bugs.winehq.org/show_bug.cgi?id=24017
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man@post.com
--- Comment #21 from super_man@post.com --- At least some work regarding this issue has merged into upstream.
https://bugs.winehq.org/show_bug.cgi?id=24017
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|STAGED |NEW
--- Comment #22 from Sebastian Lackner sebastian@fds-team.de --- @Hugh: Is there anything missing, or can we mark this bug as fixed? The basic functionality is definitely present already. I would suggest to start a new bug report if there are still remaining problems.
https://bugs.winehq.org/show_bug.cgi?id=24017
--- Comment #23 from Hugh McMaster hugh.mcmaster@outlook.com --- I've still got a few minor issues to address, but nothing that prevents us from marking the bug as fixed.
https://bugs.winehq.org/show_bug.cgi?id=24017
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED Fixed by SHA1| |dd5da0ae640966be2ccc2ea84a6 | |fb1b638da0f5c
--- Comment #24 from Sebastian Lackner sebastian@fds-team.de --- (In reply to Hugh McMaster from comment #23)
I've still got a few minor issues to address, but nothing that prevents us from marking the bug as fixed.
Okay, marking as fixed then (with dd5da0ae640966be2ccc2ea84a6fb1b638da0f5c and various previous patches). Thanks for all the effort.
https://bugs.winehq.org/show_bug.cgi?id=24017
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #25 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.9.10.