diff --git a/src/setup/win32/Product.wxs b/src/setup/win32/Product.wxs index a582256a..2d97f21c 100644 --- a/src/setup/win32/Product.wxs +++ b/src/setup/win32/Product.wxs @@ -34,6 +34,7 @@ + @@ -56,10 +57,45 @@ NOT LEGACY_UNINSTALL_EXISTS - - + + + + + - NOT Installed + + + + NOT Installed AND (UILevel = 4 OR UILevel = 5) + + + + + RESTART_EXPLORER="yes" + + + RESTART_EXPLORER="yes" + + + RESTART_EXPLORER="no" + + diff --git a/src/setup/win32/Scripts.vbs b/src/setup/win32/Scripts.vbs new file mode 100644 index 00000000..41eef854 --- /dev/null +++ b/src/setup/win32/Scripts.vbs @@ -0,0 +1,32 @@ +Function RestartExplorerPrompt + + Dim message + message = "The Windows Explorer process needs to be restarted. " & _ + "A reboot is required if you do not wish to do this. " & vbCr & vbCr & _ + "Would you like setup to restart the Windows Explorer process?" + + answer = MsgBox(message, vbSystemModal Or vbYesNo Or vbQuestion, "Restart Explorer") + + If answer = vbYes Then + restart = "yes" + Else + restart = "no" + End If + + Session.Property("RESTART_EXPLORER") = restart + +End Function + +Function RestartExplorer + + Set wmi = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") + Set processList = wmi.ExecQuery("Select * from Win32_Process Where Name = 'explorer.exe'") + + For Each process in processList + process.Terminate(1) + Next + + Set shell = CreateObject("Wscript.Shell") + shell.Run "explorer.exe" + +End Function diff --git a/src/setup/win32/synergy.wixproj b/src/setup/win32/synergy.wixproj index ef098810..581d7574 100644 --- a/src/setup/win32/synergy.wixproj +++ b/src/setup/win32/synergy.wixproj @@ -12,6 +12,7 @@ ..\..\..\build\wix\obj\$(Configuration)\ + $(WixExtDir)\WixFirewallExtension.dll WixFirewallExtension