This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Chained MSIs don't work when logged in through Remote Desktop
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 23, 2008
12:11 PM
Chained MSIs don't work when logged in through Remote Desktop
I recently started a thread about a problem when using chained MSIs function (see http://community.installshield.com/showthread.php?t=184624).
I think that the problem occurs when connecting to a remote PC using Remote Desktop. It only happens when connecting to a XP or Server 2003 box; the problem doesn't seem to happen when connecting to Vista/2008.
When logged in physically to the PC, the chainer executable gets called as a child of the msiexec service process.
When the user logs in through Remote Desktop, a separate session is created for the remote user, while the Windows Installer service (msiexec) is running in another session. In this case, the chainer executable gets invoked under the remote user's session, thus not in the same process tree as msiexec. Documentation of the MsiJoinTransaction API says that "The installer verifies that the process requesting ownership [i.e. the chainer executable] and the process that currently owns the transaction share a parent process in the same process tree.", so my guess is that, since msiexec is running under one process tree and the chainer runs in another, then the MsiJoinTransaction -and the whole installation for that matter- fails.
What I noticed on Vista is that the process tree is organized in a different way than in XP, and the msiexec service doesn't run under the console session process tree, but in a separate process tree so it doesn't matter if you are connecting through RD.
Neither the MSDN nor InstallShield's documentation seem to be aware of the Remote Desktop situation. Is there a way to make it work?
I think that the problem occurs when connecting to a remote PC using Remote Desktop. It only happens when connecting to a XP or Server 2003 box; the problem doesn't seem to happen when connecting to Vista/2008.
When logged in physically to the PC, the chainer executable gets called as a child of the msiexec service process.
When the user logs in through Remote Desktop, a separate session is created for the remote user, while the Windows Installer service (msiexec) is running in another session. In this case, the chainer executable gets invoked under the remote user's session, thus not in the same process tree as msiexec. Documentation of the MsiJoinTransaction API says that "The installer verifies that the process requesting ownership [i.e. the chainer executable] and the process that currently owns the transaction share a parent process in the same process tree.", so my guess is that, since msiexec is running under one process tree and the chainer runs in another, then the MsiJoinTransaction -and the whole installation for that matter- fails.
What I noticed on Vista is that the process tree is organized in a different way than in XP, and the msiexec service doesn't run under the console session process tree, but in a separate process tree so it doesn't matter if you are connecting through RD.
Neither the MSDN nor InstallShield's documentation seem to be aware of the Remote Desktop situation. Is there a way to make it work?
(9) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 23, 2008
11:07 PM
I have an email in to Microsoft about this. I will post the information that I get.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 02, 2009
12:18 PM
Hi Everybody,
Has anyone got some more information on the issue. I have been facing exactly the same issue.
Has anyone got some more information on the issue. I have been facing exactly the same issue.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 26, 2009
11:18 AM
You must use mstsc /console on Windows XP SP2 or Windows 2003, or use mstsc /admin on Windows XP SP3 or Windows 2008 or later to start Remote Desktop Connection when using chained .msi packages.
The easiest way to do this is simply edit the shortcut to add the appropriate option. We added code to our install and uninstall to detect this and issue a warning message, but you'll certainly want to make this clear in your readme or other install info.
Regards,
David
The easiest way to do this is simply edit the shortcut to add the appropriate option. We added code to our install and uninstall to detect this and issue a warning message, but you'll certainly want to make this clear in your readme or other install info.
Regards,
David
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 27, 2009
01:40 AM
Thanks David, i have been using the same as suggested. However it would be great if you could tell me how are you detecting the /console mode. Is there any msi property or you are using something else.
Thanks in advance
Nio
Thanks in advance
Nio
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 27, 2009
09:47 AM
Nio,
It's just a matter of checking to see if the sessionId is greater than zero. Calls to GetCurrentProcessId() and ProcessIdToSessionId() will get you the sessionID. (Done within a custom action, of course.)
Cheers,
David
It's just a matter of checking to see if the sessionId is greater than zero. Calls to GetCurrentProcessId() and ProcessIdToSessionId() will get you the sessionID. (Done within a custom action, of course.)
Cheers,
David
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 04, 2010
04:00 PM
David,
Did you do this in VBScript? Do you still have the script lying around?
Thanks,
Paul
Did you do this in VBScript? Do you still have the script lying around?
Thanks,
Paul
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 05, 2010
03:28 PM
Never mind -
I'm realizing that you can't get session 0 on Windows 2008 Server with RDP because of the new security model.
I'm throwing out Chained MSI and finding another solution.
Paul
I'm realizing that you can't get session 0 on Windows 2008 Server with RDP because of the new security model.
I'm throwing out Chained MSI and finding another solution.
Paul
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 06, 2010
10:54 PM
This issue is with Win2k3 systems only. For win2k8 you need not figure this out. I have used msi chaining recently. The feature is great however a lot has to be done by MS to make it really usable. If you have reboots to handle, different checks for parent and child install and if you want to make the msi's loosely coupled, you would have to spend lots of time in writing customcode and testing.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 08, 2010
09:00 AM
Thanks for the reply on this Nio.
I hadn't actually tried it yet on Windows 2008 Server, just assumed it would work (or not work) the same. Silly me!
I hadn't actually tried it yet on Windows 2008 Server, just assumed it would work (or not work) the same. Silly me!
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)