Change Silent Installation Behavior to Require Restart / Don't Close Explorer

2,131 views
Skip to first unread message

eric

unread,
Jul 10, 2015, 7:19:30 PM7/10/15
to us...@tortoisesvn.tigris.org
Hi all!

I am attempting to deploy TortoiseSVN in an SCCM environment. I found a
thread
(http://tigris-scm.10930.n7.nabble.com/Windows-7-update-TortoiseSVN-kill-explorer-td97470.html)
where Erwan was having a similar problem (Explorer is closing during
updating). Instead of Explorer closing, I would like to default to the "Do
not close applications. A reboot will be required" option from the "Files in
Use" window during a silent installation. I have tried all the
MSIRESTARTMANAGERCONTROL=0/Disable/DisableShutdown properties without luck.

How can I make it so that a silent installation of TortoiseSVN will never
close Explorer and return a 3010 when needed?

Thanks!
Eric



--
View this message in context: http://tigris-scm.10930.n7.nabble.com/Change-Silent-Installation-Behavior-to-Require-Restart-Don-t-Close-Explorer-tp99014.html
Sent from the tortoisesvn - users mailing list archive at Nabble.com.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3126673

To unsubscribe from this discussion, e-mail: [users-un...@tortoisesvn.tigris.org].

Stefan Küng

unread,
Jul 11, 2015, 2:46:24 AM7/11/15
to us...@tortoisesvn.tigris.org
On 11.07.2015 00:54, eric wrote:
> Hi all!
>
> I am attempting to deploy TortoiseSVN in an SCCM environment. I found a
> thread
> (http://tigris-scm.10930.n7.nabble.com/Windows-7-update-TortoiseSVN-kill-explorer-td97470.html)
> where Erwan was having a similar problem (Explorer is closing during
> updating). Instead of Explorer closing, I would like to default to the "Do
> not close applications. A reboot will be required" option from the "Files in
> Use" window during a silent installation. I have tried all the
> MSIRESTARTMANAGERCONTROL=0/Disable/DisableShutdown properties without luck.
>
> How can I make it so that a silent installation of TortoiseSVN will never
> close Explorer and return a 3010 when needed?

Not sure, but I think you also have to set REBOOT=force to prevent the
restart manager from closing apps.

Stefan

--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest interface to (Sub)version control
/_/ \_\ http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3126706

Gavin Lambert

unread,
Jul 12, 2015, 9:56:22 PM7/12/15
to us...@tortoisesvn.tigris.org
On 11/07/2015 10:54, quoth eric:
> I am attempting to deploy TortoiseSVN in an SCCM environment. I found a
> thread
> (http://tigris-scm.10930.n7.nabble.com/Windows-7-update-TortoiseSVN-kill-explorer-td97470.html)
> where Erwan was having a similar problem (Explorer is closing during
> updating). Instead of Explorer closing, I would like to default to the "Do
> not close applications. A reboot will be required" option from the "Files in
> Use" window during a silent installation. I have tried all the
> MSIRESTARTMANAGERCONTROL=0/Disable/DisableShutdown properties without luck.

I haven't tested this, but theoretically you would need to use both of these:

MSIRESTARTMANAGERCONTROL=Disable
REBOOT=ReallySuppress

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3126900

eric

unread,
Jul 13, 2015, 3:54:43 PM7/13/15
to us...@tortoisesvn.tigris.org
Stefan,

REBOOT=Force reboots the endpoint automatically without user intervention,
which is worse than restarting Explorer from our customers' point of view.
What I need is the REBOOT=Force functionality (leave Explorer running), but
instead of issuing a restart after the installation ends, the installer will
return a 3010 return code indicating a restart is necessary (and pending).

Gavin,

I have tested all combinations of MSIRESTARTMANAGERCONTROL and REBOOT flags
with no success, I cannot keep Explorer running during a silent
installation.

I agree that the MSIRESTARTMANAGERCONTROL property should do it, but it is
not. Is this a bug? There should be a way to silently install with a restart
after instead of forcing Explorer to close.



--
View this message in context: http://tigris-scm.10930.n7.nabble.com/Change-Silent-Installation-Behavior-to-Require-Restart-Don-t-Close-Explorer-tp99014p99020.html
Sent from the tortoisesvn - users mailing list archive at Nabble.com.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3127006

Gavin Lambert

unread,
Jul 13, 2015, 6:55:30 PM7/13/15
to us...@tortoisesvn.tigris.org
On 14/07/2015 07:29, quoth eric:
> I have tested all combinations of MSIRESTARTMANAGERCONTROL and REBOOT flags
> with no success, I cannot keep Explorer running during a silent
> installation.
>
> I agree that the MSIRESTARTMANAGERCONTROL property should do it, but it is
> not. Is this a bug? There should be a way to silently install with a restart
> after instead of forcing Explorer to close.

Can you post the full command line that you tried?

Have you tried running it directly rather than through SCCM?

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3127020

eric

unread,
Jul 13, 2015, 8:18:51 PM7/13/15
to us...@tortoisesvn.tigris.org
I have tried the following:

msiexec /qn /i TortoiseSVN-1.8.11.26392-x64-svn-1.8.13.msi
MSIRESTARTMANAGERCONTROL=Disable REBOOT=ReallySuppress

msiexec /qn /i TortoiseSVN-1.8.11.26392-x64-svn-1.8.13.msi
MSIRESTARTMANAGERCONTROL=DisableShutdown REBOOT=ReallySuppress

msiexec /qn /i TortoiseSVN-1.8.11.26392-x64-svn-1.8.13.msi
MSIRESTARTMANAGERCONTROL=0 REBOOT=ReallySuppress

msiexec /qn /i TortoiseSVN-1.8.11.26392-x64-svn-1.8.13.msi
MSIRESTARTMANAGERCONTROL=Disable REBOOT=Force (this restarted the endpoint
automatically as expected)

Every one of these commands restarts Explorer, regardless of which account I
am using (Administrator or System Account via PsExec). If I use the System
Account (what SCCM deploys in), Explorer will not even respawn until I
launch it manually from the task manager.



--
View this message in context: http://tigris-scm.10930.n7.nabble.com/Change-Silent-Installation-Behavior-to-Require-Restart-Don-t-Close-Explorer-tp99014p99022.html
Sent from the tortoisesvn - users mailing list archive at Nabble.com.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3127028

Gavin Lambert

unread,
Jul 15, 2015, 9:49:28 PM7/15/15
to us...@tortoisesvn.tigris.org
On 14/07/2015 11:53, eric wrote:> I have tried the following:
>
> msiexec /qn /i TortoiseSVN-1.8.11.26392-x64-svn-1.8.13.msi
> MSIRESTARTMANAGERCONTROL=Disable REBOOT=ReallySuppress

Have you tried putting the "/i filename" part at the end of the command line?

The only other thing that I can think of is that the property requires MSI v4.0 at minimum -- do you know what version you have installed and/or what version the TSVN installer was built with? (A look at the file suggests it was built with WiX 3.8, but I'm not sure how that corresponds with MSI versions.) However AFAIK if it runs in MSI < 4.0 then it won't use the restart manager anyway, so this might not be relevant.


Otherwise, part of the docs suggest that you might need to create an MST file to introduce this property, rather than using the command line. However this blog suggests that you ought to be able to do it on the command line:

http://blogs.technet.com/b/odsupport/archive/2011/04/29/msi-restart-manager-how-it-relates-to-office-updates-and-application-restarts.aspx

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3127341

Stefan Küng

unread,
Jul 16, 2015, 1:05:50 PM7/16/15
to us...@tortoisesvn.tigris.org
On 16.07.2015 03:49, Gavin Lambert wrote:
> On 14/07/2015 11:53, eric wrote:> I have tried the following:
>>
>> msiexec /qn /i TortoiseSVN-1.8.11.26392-x64-svn-1.8.13.msi
>> MSIRESTARTMANAGERCONTROL=Disable REBOOT=ReallySuppress
>
> Have you tried putting the "/i filename" part at the end of the
> command line?
>
> The only other thing that I can think of is that the property
> requires MSI v4.0 at minimum -- do you know what version you have
> installed and/or what version the TSVN installer was built with? (A
> look at the file suggests it was built with WiX 3.8, but I'm not sure
> how that corresponds with MSI versions.) However AFAIK if it runs in
> MSI < 4.0 then it won't use the restart manager anyway, so this might
> not be relevant.

Try setting WixUIRMOption=DontUseRM on the command line. The default in
WiX installers is to set WixUIRMOption to "UseRM", and I'm guessing
that's what is used when the dialog is not shown.
However: that property only affects the RmShutdownAndRestart event
(https://msdn.microsoft.com/en-us/library/aa371365%28v=vs.85%29.aspx),
and that should not matter at all if the MSIRESTARTMANAGERCONTROL
property is set to "Disable".

Stefan

--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest interface to (Sub)version control
/_/ \_\ http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3127421

eric

unread,
Jul 16, 2015, 1:33:01 PM7/16/15
to us...@tortoisesvn.tigris.org
Gavin:
I am using Windows 7 SP1 as my test environment which is using Windows
installer 5.0. This supports all of the latest commands for msiexec. I did
try putting the "/i filename" bit at the very end and it still did not help.
I have tried setting properties from a transform file which was equally
unsuccessful. In digging through the MSI logs, the values are being set
correctly, just not working as I envisioned them to.

Stefan:
I cannot set the WixUIRMOption=DontUseRM as it is a private property. I
tried setting this value using a transform before I made my first post and
it was unsuccessful. Just for fun I tried it from the command line just now
and it still did not work.



--
View this message in context: http://tigris-scm.10930.n7.nabble.com/Change-Silent-Installation-Behavior-to-Require-Restart-Don-t-Close-Explorer-tp99014p99032.html
Sent from the tortoisesvn - users mailing list archive at Nabble.com.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3127427

Stefan Küng

unread,
Jul 16, 2015, 1:44:09 PM7/16/15
to us...@tortoisesvn.tigris.org
On 16.07.2015 19:06, eric wrote:
> Gavin:
> I am using Windows 7 SP1 as my test environment which is using Windows
> installer 5.0. This supports all of the latest commands for msiexec. I did
> try putting the "/i filename" bit at the very end and it still did not help.
> I have tried setting properties from a transform file which was equally
> unsuccessful. In digging through the MSI logs, the values are being set
> correctly, just not working as I envisioned them to.
>
> Stefan:
> I cannot set the WixUIRMOption=DontUseRM as it is a private property. I
> tried setting this value using a transform before I made my first post and
> it was unsuccessful. Just for fun I tried it from the command line just now
> and it still did not work.

I think you have to set a policy on your computer(s) to disable the
restart manager, because as it says here:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa372466%28v=vs.85%29.aspx

"Silent UI level installations always shut down applications and
services, and on Windows Vista, always use Restart Manager."

So you have to set the "DisableAutomaticApplicationShutdown" policy as
described here:
https://msdn.microsoft.com/en-us/library/aa368298%28v=vs.85%29.aspx
to "2".

But remember: preventing processes from restarting and expecting a
reboot but not automatically reboot leaves the system in an unstable
state because only *some* of the files got replaced, not all. I guess
that's why msi doesn't let you do this easily.
At least with an UI install, the user is aware of the problem - for
silent installs, the user would not know that and I guess that's why
it's not possible to do that.


Stefan

--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest interface to (Sub)version control
/_/ \_\ http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3127432

eric

unread,
Jul 16, 2015, 2:21:35 PM7/16/15
to us...@tortoisesvn.tigris.org
There are plenty of MSIs that accomplish this though. They leave everything
running and request a reboot (return code 3010). This then translates into
Software Center stating that a reboot is required to complete the
installation. Setting "DisableAutomaticApplicationShutdown" = 1 keeps
Explorer from restarting, but your MSI returns a return code of "0", not
"3010" which indicates everything went smoothly and no restart is required.
Is that correct? (Setting "DisableAutomaticApplicationShutdown" = 2 did not
keep Explorer from restarting by the way).



--
View this message in context: http://tigris-scm.10930.n7.nabble.com/Change-Silent-Installation-Behavior-to-Require-Restart-Don-t-Close-Explorer-tp99014p99035.html
Sent from the tortoisesvn - users mailing list archive at Nabble.com.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3127438

Stefan Küng

unread,
Jul 16, 2015, 2:50:47 PM7/16/15
to us...@tortoisesvn.tigris.org
On 16.07.2015 19:55, eric wrote:
> There are plenty of MSIs that accomplish this though. They leave everything
> running and request a reboot (return code 3010). This then translates into

Perhaps those don't have a MsiRMFilesInUse dialog included? If that
dialog is missing in the msi, the restart manager is disabled.

Stefan

--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest interface to (Sub)version control
/_/ \_\ http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3127446

eric

unread,
Jul 16, 2015, 3:16:11 PM7/16/15
to us...@tortoisesvn.tigris.org
So you are saying there is no way to silently install this MSI and keep
Explorer running without adding a policy key to the registry of every
endpoint I am deploying this to?



--
View this message in context: http://tigris-scm.10930.n7.nabble.com/Change-Silent-Installation-Behavior-to-Require-Restart-Don-t-Close-Explorer-tp99014p99038.html
Sent from the tortoisesvn - users mailing list archive at Nabble.com.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3127449

Stefan Küng

unread,
Jul 17, 2015, 2:47:42 PM7/17/15
to us...@tortoisesvn.tigris.org
On 16.07.2015 20:50, eric wrote:
> So you are saying there is no way to silently install this MSI and keep
> Explorer running without adding a policy key to the registry of every
> endpoint I am deploying this to?

I think so, yes.
You could try to remove the MsiRMFilesInUse dialog from the msi: if that
dialog is not there, the restart manager is not used.

Stefan

--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest interface to (Sub)version control
/_/ \_\ http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3127598

eric

unread,
Jul 22, 2015, 9:24:00 PM7/22/15
to us...@tortoisesvn.tigris.org
Stefan Küng wrote
> You could try to remove the MsiRMFilesInUse dialog from the msi: if that
> dialog is not there, the restart manager is not used.

I did this through a transform and directly modifying the msi with InstEd.
This did not affect the behavior of the silent installation in any way. If
you run the msi with the transform and go through the installer manually, no
Restart Manager dialogs appear, but the Files In Use dialog will appear
saying that "Windows Explorer (Process Id: xxxx)" is "using files that need
to be updated by this setup. Close these applications and then click Retry
to continue the installation or Cancel to exit it." There are three buttons
at the bottom of the window: "Exit, Ignore, and Retry". Pressing "Ignore"
finishes the installation like normal, updating the locked files upon reboot
(the exact process I am looking for, if I could press the "Ignore" button at
the Files In Use dialog while having it completely silent then everything
would be perfect!). The msi is still closing Explorer without the Restart
Manager, which means that there is something else controlling the process
killing during silent installs. Is the FilesInUse dialog closing running
processes on its own?



--
View this message in context: http://tigris-scm.10930.n7.nabble.com/Change-Silent-Installation-Behavior-to-Require-Restart-Don-t-Close-Explorer-tp99014p99049.html
Sent from the tortoisesvn - users mailing list archive at Nabble.com.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3128293
Reply all
Reply to author
Forward
0 new messages