Commit Graph

7706 Commits

Author SHA1 Message Date
Qian Hong 279ac253e5 kernel32: Fallback to default comspec when %COMSPEC% is not set.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=19801
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-03 19:44:43 +02:00
Thomas Faller 731d7b30dd cmd: Don't print an empty line if no command was executed.
Signed-off-by: Thomas Faller <tfaller1@gmx.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-03 19:44:02 +02:00
Jason Edmeades 987fee3791 cmd: Correct handling of %~0 for batch call.
When a batch label is called, %0 and %~0 should be the label being
called, and if you start adding modifiers to it (eg %~d0) then you get
details of the batch program containing the label.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44369
Signed-off-by: Jason Edmeades <us@edmeades.me.uk>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-29 22:01:38 +02:00
Jason Edmeades bc9d68bcbe cmd: Fix 'if exist' with a directory\ as a parameter.
'if exists' takes a parameter which can be directory, directory\ or
directory\. for example, and should equate to true if the directory
exists. The syntax directory\ is explicitly rejected by FindFirstFile
and hence was not working - look for this specific case, and if found
append a '.'.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45506
Signed-off-by: Jason Edmeades <us@edmeades.me.uk>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-29 22:01:38 +02:00
Jason Edmeades 8b6ba774c0 cmd: for /f fails to launch quoted program plus args.
for /f can run a program and parse its output. The program name can
supply args and be quoted or not.  If quoted, wine fails to run the
program because internally we were adding an extra pair of
quotes. These are not needed and can be removed.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=39906
Signed-off-by: Jason Edmeades <us@edmeades.me.uk>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-29 22:01:38 +02:00
Jason Edmeades 58d21b3319 cmd: Handle single line 'if' as nested if or with redirects.
A single line if statement causes problems when it has redirects
and/or continuation type operators (|, &&, || etc) because it is
expected that if there is more than one command in the 'if', then it
will use brackets. This patch changes the 'if' parsing to emulate
brackets at a continuation character. In addition, 'for' and 'if'
statements do not have their output redirected immediately, instead it
is redirected on the individual commands being executed not the
statement itself. We were opening the redirect once for the 'if' and
once for the processing of the statement inside the if.

Signed-off-by: Jason Edmeades <us@edmeades.me.uk>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-29 22:01:38 +02:00
Jason Edmeades 5c444c4e0d cmd: Fix shortpath handling in for loops.
When 's' is used as a modifier, the paths that are presented to the
other modifiers needs to be a short path. Given the 'filename' part of
the path may not exist, we cannot use GetShortPathName directly
without first removing the filename part to just leave the directory
bit.

Signed-off-by: Jason Edmeades <us@edmeades.me.uk>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-29 22:01:38 +02:00
Thomas Faller 6c1118994c wine.inf: Set CurrentBuild always to the same value as CurrentBuildNumber.
Make that the registry entry

HKLM\Software\Microsoft\Windows NT\CurrentVersion\CurrentBuild

has always the same value as

HKLM\Software\Microsoft\Windows NT\CurrentVersion\CurrentBuildNumber

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42870
Signed-off-by: Thomas Faller <tfaller1@gmx.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-29 22:01:38 +02:00
Zebediah Figura c18f8e4c32 winedevice: Reimplement (un)loading drivers on top of ZwLoadDriver()/ZwUnloadDriver().
We can't implement ZwLoadDriver() on top of StartService(), since the latter
takes the service database lock. Instead simply move the entire body of
create_driver()/unload_driver() into ZwLoadDriver()/ZwUnloadDriver().
Similarly, clean up the list of loaded drivers in ntoskrnl rather than
winedevice.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45084
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-29 22:01:38 +02:00
Zebediah Figura 44e7943274 winedevice: Make driver (un)loading synchronous.
This essentially reverts 440482d2ef.

440482d was aimed towards making it possible to load multiple drivers
asynchronously, as well as to allow reentrancy. Unfortunately, asynchronicity
is incorrect, as demonstrated by bug 38836, and some trivial testing shows
that the SCM database lock is held for the entirety of the driver entry and
exit routines, and that StartService() and ControlService() block until they
complete. 5726824 and dd2624a nullified the effects of 440482d, making driver
loading all but synchronous (with the exception of the added 30 second
timeout, but this is actually incorrect: drivers can block indefinitely).

This patch therefore does not change any behaviour, but rather removes the
use of threadpools and "async" functions, essentially reverting back to the
implementation prior to 440482d. The incidental change to unload_driver()
made by that patch (viz. never to unload a driver without a DriverUnload()
routine) is kept.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-29 22:01:38 +02:00
Francois Gouget fb6b48d3e2 xcopy: Spelling fix in a comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-23 20:01:56 +02:00
Michael Stefaniuc 83e481fee2 explorer: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-21 23:21:52 +02:00
Michael Stefaniuc e011370f13 dxdiag: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-21 23:21:52 +02:00
Alistair Leslie-Hughes 006d3f3365 regedit: Don't expand items on initial tree creation.
The Message TVM_EXPAND is captured in treeview_notify, then passes
g_pChildWnd->hTreeWnd on to OnTreeExpanding which hasn't been
initialized yet.  The function get_last_key is already called after
the hTreeWnd has been assigned to select the previous selected
item (if it exists).

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-21 23:02:31 +02:00
Michael Stefaniuc 04413abcc7 cmd: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-21 23:02:30 +02:00
Zebediah Figura e525e49976 winedbg/gdbproxy: Silence some noisy debug messages.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-20 09:07:55 +02:00
Nikolay Sivov 25ba7708d3 winecfg: Update changed state on associations checkbox click.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-17 09:12:25 +02:00
Zebediah Figura 2592690540 msiexec: Don't keep the custom action GUID in the main thread's stack.
Since it could potentially change on us during an asynchronous custom action.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 18:41:14 +02:00
Dmitry Timoshkov 186ae9ed31 winecfg: Allow to disable MIME-type associations.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 18:38:51 +02:00
Fabian Maurer d175419f0b cmd: Handle quotes when parsing the folders in the PATH environment variable.
Semicolons are also allowed inside a path, as long as they are quoted.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45552
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 13:14:10 +02:00
Zebediah Figura 05e54ac6e6 winedbg: Ignore EXCEPTION_INVALID_HANDLE.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 11:07:37 +02:00
Zebediah Figura 1dbab1cd0d winedbg/gdbproxy: Simplify packet_verbose().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 11:07:37 +02:00
Zebediah Figura 00349e3f2a winedbg/gdbproxy: Don't try to single-step a terminated process.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 11:07:37 +02:00
Zebediah Figura 6159431cd7 winedbg/gdbproxy: Use the WINEDEBUG interface for debugging winedbg.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 11:07:37 +02:00
Michael Stefaniuc 27c88fc4a6 netstat: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-15 21:01:09 +02:00
Michael Stefaniuc 84f2249284 winhlp32: Avoid an ARRAY_SIZE-like macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 10:16:03 +02:00
Michael Stefaniuc 038d9e8ab9 winhlp32: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 10:16:03 +02:00
Michael Stefaniuc c33c75fc77 winemenubuilder: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 10:16:03 +02:00
Michael Stefaniuc d4f1d510aa winebrowser: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 10:16:03 +02:00
Michael Stefaniuc 33f4548ae6 regsvr32: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 10:16:03 +02:00
Michael Stefaniuc 6784ffcb63 extrac32: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 10:16:03 +02:00
Michael Stefaniuc 91fda02ff6 msinfo32: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 10:16:00 +02:00
Zebediah Figura 6925846988 msi: Generate unique names for 32- and 64-bit custom action server pipes.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 10:15:59 +02:00
Michael Stefaniuc 0b788e9a72 winetest: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 09:44:12 +02:00
Michael Stefaniuc e4f68323fc wordpad: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 09:44:12 +02:00
Michael Stefaniuc 0f5b224bfa wineboot: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 09:44:12 +02:00
Michael Stefaniuc dbf2426b74 uninstaller: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 09:44:12 +02:00
Michael Stefaniuc effac73e72 msiexec: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 09:43:00 +02:00
Michael Stefaniuc ae375252dc ipconfig: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 09:42:56 +02:00
Michael Stefaniuc f559c605cb taskkill: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 09:42:51 +02:00
Michael Stefaniuc beb464358e net: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 09:42:48 +02:00
Michael Stefaniuc 7487e5f4e8 icinfo: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 09:42:45 +02:00
Michael Stefaniuc d3188ce1f9 hostname: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 09:42:41 +02:00
Michael Stefaniuc b762bd7b17 clock: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 09:42:37 +02:00
Michael Stefaniuc 094f5b4270 attrib: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 09:42:34 +02:00
Michael Stefaniuc 0b88a53acd taskmgr: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 09:42:09 +02:00
André Hentschel 13f9461e99 winedbg: Check for visible window station before displaying crash dialog.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=35928
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-16 21:28:45 +02:00
Hugh McMaster 6b620e6d61 regedit: Do not overwrite a hex data type with REG_BINARY when modifying a value.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-16 21:28:45 +02:00
Hugh McMaster a131cff7a8 regedit: Replace Hungarian notation used with struct edit_params members.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-16 21:28:45 +02:00
Hugh McMaster 32f487bdb2 regedit: Always display DWORD values in hexadecimal when initializing the editor dialog.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-16 21:28:45 +02:00