[Bug 38761] Multiple installers using Visual Studio 2010, 2015 installer technology fail when the default installation target path is changed (notation composer 3.x)

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Nov 28 08:57:02 CST 2015


https://bugs.winehq.org/show_bug.cgi?id=38761

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                URL|                            |http://www.notation.com/Dow
                   |                            |nloadComposerTrial.php
                 CC|                            |focht at gmx.net
            Summary|Installation failure using  |Multiple installers using
                   |Visual Studio 2010, 2015    |Visual Studio 2010, 2015
                   |installer                   |installer technology fail
                   |                            |when the default
                   |                            |installation target path is
                   |                            |changed (notation composer
                   |                            |3.x)
     Ever confirmed|0                           |1

--- Comment #3 from Anastasius Focht <focht at gmx.net> ---
Hello Reinhold,

confirming.

--- quote ---
As this bug report is still uncommented I want to make you aware again.
--- quote ---

well, that's unfortunate but can't be avoided as not many people do this kind
of work which requires in-depth understanding and many times expert knowledge.

The Wine project has a steady influx of bug reports and many existing bug
reports (1000+) not yet analysed but only a small group of developers/support
folks.
Various reports go under the radar for months unless targeting famous/widely
used apps/games or look interesting/challenging to certain folks.

Anyway, I've had a look at this one now.

--- snip ---
$ WINEDEBUG=+tid,+seh,+relay,+msi wine msiexec -i
Inst_NS_Composer_3_English_Trial.msi >>log.txt 2>&1
...
002c:trace:msi:ACTION_CostFinalize Building directory properties
002c:trace:msi:msi_resolve_target_folder resolving L"TARGETDIR"
...
002c:trace:msi:msi_get_property returning L"C:\\Program Files\\Notation_3" for
property L"TARGETDIR"
...
002c:trace:msi:msi_set_property 0x156c60 L"TARGETDIR" L"C:\\Program
Files\\Notation_3\\" -1
...
002c:trace:msi:msi_get_property returning L"C:\\windows\\Fonts\\" for property
L"FontsFolder"
...
002c:trace:msi:msi_resolve_target_folder L"FontsFolder" resolves to
L"C:\\windows\\Fonts\\"
002c:trace:msi:msi_resolve_target_folder resolving L"TEMPFOLDER"
002c:trace:msi:msi_get_property 0x156c60 L"TEMPFOLDER" (nil) 0x33f814
...
002c:trace:msi:msi_get_property returning L"C:\\users\\focht\\Temp\\" for
property L"TEMPFOLDER"
...
002c:trace:msi:msi_set_property 0x156c60 L"TEMPFOLDER"
L"C:\\users\\focht\\Temp\\" -1
...
002c:trace:msi:msi_resolve_target_folder L"_461946CF33E24F1F8C6C47D9E867DFA9"
resolves to L"C:\\users\\focht\\Temp\\PQ3ZVI537A3FM2.TMP\\Documents\\"
002c:trace:msi:msi_resolve_target_folder L"_B7CBAC26035C47F18B6F5F409BE272E2"
resolves to L"C:\\users\\focht\\Temp\\PQ3ZVI537A3FM2.TMP\\"
002c:trace:msi:msi_resolve_target_folder L"TEMPFOLDER" resolves to
L"C:\\users\\focht\\Temp\\"
...
002c:trace:msi:MSI_ProcessMessage (nil) (nil) (nil) 0 10 L"Action ended
13:55:28: CostFinalize. Return value 0."
--- snip ---

Dump of 'Directory' table which is of interest here with 'ORCA' tool:

--- snip ---
Directory    Directory_Parent    DefaultDir
s72    S72    l255
Directory    Directory
TARGETDIR        SourceDir
_4183CE3144BF419094440ECAD41D6D6C    TARGETDIR    COMPOS~1|Composer_3
_37B592B7B95848B89840FB73443ED00A    _B7CBAC26035C47F18B6F5F409BE272E2   
SONGS|Songs
_B7CBAC26035C47F18B6F5F409BE272E2    TEMPFOLDER   
PQ3ZVI~1.TMP|PQ3ZVI537A3FM2.TMP
_28B18BAA886D43719199BBE1B15DDCB5    _B7CBAC26035C47F18B6F5F409BE272E2   
TEMPLA~1|Templates
_461946CF33E24F1F8C6C47D9E867DFA9    _B7CBAC26035C47F18B6F5F409BE272E2   
DOCUME~1|Documents
FontsFolder    TARGETDIR    .:FONTSF~1|Fonts Folder
TEMPFOLDER    TARGETDIR    TEMPFO~1|TempFolder
DesktopFolder    TARGETDIR    .:USER'S~1|User's Desktop
ProgramMenuFolder    TARGETDIR    .:USER'S~2|User's Programs Menu
--- snip ---

The directory resolution in 'CostFinalize' MSI action is fine.
All directory target paths resolved as expected.

Now the folder selection dialog.
I changed the target to 'C:\\Program Files\\test\\' via 'Browse':

--- snip ---
...
002c:trace:msi:MSI_EvaluateConditionW 1 <- L"Installed=\"\" AND NOT RESUME"
002c:trace:msi:ACTION_PerformUIAction Performing action (L"FolderForm")
...
002c:trace:msi:MSI_DatabaseOpenViewW L"SELECT * FROM `CustomAction` WHERE
`Action` = 'FolderForm'" 0x33f928
...
002c:Call user32.CreateWindowExW(00000000,7ed19b20
L"MsiDialogCloseClass",008a4c3c
L"FolderForm",10000000,80000000,80000000,80000000,80000000,00000000,00000000,00000000,008a4bf8)
ret=7ecb1bda
...
002c:trace:msi:dialog_create_window Dialog L"SelectFolderDialog" control
L"[SFF_NewFldrBtn]" hwnd 0x100a2
...
002c:trace:msi:msi_dialog_add_control L"Static", L"FolderLabel", 00000003,
L"{\\VSI_MS_Sans_Serif13.0_0_0}&Folder:", 00020000
...
002c:trace:msi:event_subscribe event L"SelectionPath" control L"FolderLabel"
attribute L"SelectionPath"
...
002c:trace:msi:msi_get_property returning (null) for property L"TARGETDIR"
...
002c:trace:msi:msi_get_property returning L"C:\\Program Files\\Notation_3\\"
for property L"TARGETDIR"
002c:Call user32.SetWindowTextW(00050076,007e6338 L"C:\\Program
Files\\Notation_3\\") ret=7ecad8f5
...
002c:trace:msi:event_subscribe event L"SelectionPath" control L"Body" attribute
L"SelectionPath"
...
002c:trace:msi:event_subscribe event L"SelectionPath" control L"FolderText"
attribute L"SelectionPath"
...
002c:trace:msi:msi_get_property returning L"TARGETDIR" for property
L"SelectFolderDialog_Property"
...
002c:trace:msi:msi_get_property returning L"C:\\Program Files\\Notation_3\\"
for property L"TARGETDIR"
002c:Call KERNEL32.FindFirstFileW(0033e818 L"C:\\Program
Files\\Notation_3\\*",0033e5c8) ret=7ecaf87c
002c:Ret  KERNEL32.FindFirstFileW() retval=ffffffff ret=7ecaf87c
...
002c:trace:msi:msi_dialog_add_control L"BUTTON", L"NewFolderButton", 00380003,
L"[SFF_NewFldrBtn]", 00010040
...
002c:trace:msi:msi_get_property returning L"C:\\users\\focht\\Temp\\" for
property L"TempFolder"
...
002c:trace:msi:msi_get_property returning L"TARGETDIR" for property
L"SelectFolderDialog_Property"
...
002c:trace:msi:msi_get_property returning L"C:\\Program Files\\" for property
L"TARGETDIR"
002c:trace:msi:msi_set_property 0x156c60 L"TARGETDIR" L"C:\\Program
Files\\test\\" -1
...
002c:trace:msi:MSI_DatabaseOpenViewW L"UPDATE `_Property` SET `Value` = ? WHERE
`_Property` = 'TARGETDIR'" 0x33e4ac
...
002c:trace:msi:msi_get_property returning L"C:\\Program Files\\test\\" for
property L"TARGETDIR"
...
002c:trace:msi:dialog_event_handler handling event L"SetTargetPath"
...
002c:trace:msi:MSI_SetTargetPathW 0x15dc78 L"TARGETDIR" L"C:\\Program
Files\\test\\"
...
002c:trace:msi:MSI_DatabaseOpenViewW L"UPDATE `_Property` SET `Value` = ? WHERE
`_Property` = 'TARGETDIR'" 0x33e7fc
...
002c:trace:msi:msi_set_property 0x156c60 L"FontsFolder" L"C:\\Program
Files\\test\\" -1
...
002c:trace:msi:MSI_DatabaseOpenViewW L"UPDATE `_Property` SET `Value` = ? WHERE
`_Property` = 'FontsFolder'" 0x33e79c
...
002c:trace:msi:msi_resolve_target_folder L"FontsFolder" resolves to
L"C:\\Program Files\\test\\"
002c:trace:msi:msi_resolve_target_folder resolving L"TEMPFOLDER"
...
002c:trace:msi:msi_set_property 0x156c60 L"TEMPFOLDER" L"C:\\Program
Files\\test\\TempFolder\\" -1
...
002c:trace:msi:MSI_DatabaseOpenViewW L"UPDATE `_Property` SET `Value` = ? WHERE
`_Property` = 'TEMPFOLDER'" 0x33e79c
...
--- snip ---

When the target installation directory is changed (via folder selection dialog
or editing the field manually) the 'TARGETDIR' property which is a parent to
various directory properties obviously changes.
This is propagated through an event which calls in turn 'SetTargetPath' on the
components/packages.
Setting the target path causes a re-evaluation of all dependant properties
which have 'TARGETDIR' as parent (see 'Directory' table dump).

--- snip ---
...
Wine-dbg>b event_set_target_path
Breakpoint 1 at 0x7eca534b event_set_target_path
[/home/focht/projects/wine/wine.repo/src/dlls/msi/dialog.c:4470] in msi

Wine-dbg>c
...

Backtrace:

Wine-dbg>bt
Backtrace:
=>0 0x7ec7f2a0 msi_resolve_target_folder(package=0x1467b0,
name="_4183CE3144BF419094440ECAD41D6D6C", load_prop=0)
[/home/focht/projects/wine/wine.repo/src/dlls/msi/action.c:2333] in msi
(0x0033f138)
  1 0x7ecbef66 MSI_SetTargetPathW+0xe4(package=0x1467b0, szFolder="TARGETDIR",
szFolderPath="C:\Program Files\test")
[/home/focht/projects/wine/wine.repo/src/dlls/msi/install.c:584] in msi
(0x0033f188)
  2 0x7ecb33d8 event_set_target_path+0x8c(dialog=0x1ef188,
argument="TARGETDIR")
[/home/focht/projects/wine/wine.repo/src/dlls/msi/dialog.c:4480] in msi
(0x0033f1b8)
  3 0x7ecb36a8 dialog_event_handler+0xa6(dialog=0x1ef188,
event="SetTargetPath", argument="TARGETDIR")
[/home/focht/projects/wine/wine.repo/src/dlls/msi/dialog.c:4601] in msi
(0x0033f208)
  4 0x7ecaa822 msi_dialog_send_event+0xc8(dialog=0x1ef188,
event="SetTargetPath", arg="TARGETDIR")
[/home/focht/projects/wine/wine.repo/src/dlls/msi/dialog.c:931] in msi
(0x0033f248)

...

Wine-dbg>n
2342        if (!strcmpW( folder->Directory, szTargetDir )) /* special
resolving for target root dir */

Wine-dbg>p *folder
{entry={next=0x1422e8, prev=0x17d098}, children={next=0x17d188, prev=0x17d188},
Directory="_4183CE3144BF419094440ECAD41D6D6C", Parent="TARGETDIR",
TargetDefault="Composer_3", SourceLongPath="Composer_3",
SourceShortPath="COMPOS~1", ResolvedTarget="C:\Program
Files\Notation_3\Composer_3\", ResolvedSource=0x0(nil),
State=FOLDER_STATE_UNINITIALIZED, persistent=0x1, Cost=0, Space=0}
...

Wine-dbg>n
set_target_path () at
/home/focht/projects/wine/wine.repo/src/dlls/msi/install.c:558
558            LIST_FOR_EACH_ENTRY( fl, &folder->children, FolderList, entry )
Wine-dbg>n
...
560                child = fl->folder;
Wine-dbg>n
561                msi_resolve_target_folder( package, child->Directory, FALSE
);
Wine-dbg>p *child
{entry={next=0x17e070, prev=0x17dc60}, children={next=0x142938, prev=0x142938},
Directory="FontsFolder", Parent="TARGETDIR", TargetDefault="",
SourceLongPath="Fonts Folder", SourceShortPath="FONTSF~1",
ResolvedTarget="C:\windows\Fonts\", ResolvedSource=0x0(nil),
State=FOLDER_STATE_UNINITIALIZED, persistent=0, Cost=0, Space=0}
...
Wine-dbg>p *child
{entry={next=0x17e070, prev=0x17dc60}, children={next=0x142938, prev=0x142938},
Directory="FontsFolder", Parent="TARGETDIR", TargetDefault="",
SourceLongPath="Fonts Folder", SourceShortPath="FONTSF~1",
ResolvedTarget="C:\Program Files\test\", ResolvedSource=0x0(nil),
State=FOLDER_STATE_UNINITIALIZED, persistent=0, Cost=0, Space=0}
...
--- snip ---

This is fine for the first one '_4183CE3144BF419094440ECAD41D6D6C' which
pointed to 'C:\\Program Files\\Notation_3\\Composer_3\\' (default target).

The problem is that all directory targets/properties which didn't originally
point to a path containing old 'TARGETDIR' have their path reset too, causing
for example the incorrect 'TEMPFOLDER' relocation. This is what should not
happen.

I think the path for each directory target needs to be checked if it referred
to the old 'TARGETDIR' (by full or sub-path) or not.
In the latter case the directory target should not be resolved again.

$ sha1sum Inst_NS_Composer_3_English_Trial.msi 
bdcc963ad73e3ba74d293a394e35f0b03d8a74b0  Inst_NS_Composer_3_English_Trial.msi

$ du -sh Inst_NS_Composer_3_English_Trial.msi 
13M    Inst_NS_Composer_3_English_Trial.msi

$ wine --version
wine-1.8-rc2

Regards

-- 
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.



More information about the wine-bugs mailing list