Installer not restarting the Explorer.exe shell process.

PDF-XChange Drivers API (only) V4/V5
This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-XChange Printer Drivers SDK (only) - VERSION 4 & 5 - Please use the PDF-Tools SDK Forum for Library DLL assistance.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
RMan
User
Posts: 221
Joined: Tue Jul 02, 2013 10:06 pm

Installer not restarting the Explorer.exe shell process.

Post by RMan »

While I'm testing things here's another one.

I've noticed this several times when installing the SDK also but it's important to make sure you restart it if the users do not reboot because otherwise their desktop, start menu, and taskbar are all gone and users freak out. I'm testing in Windows 7 64 bit.

To reproduce it install the printer driver. Then access it's Printer Properties for the driver or print a test page so the driver has been used locking some of the dll files I'm guessing. Then right click on the Printer and Remove it. Then reinstall the printer and do not reboot.

Since we run it silently with the /NORESTART option it happens often when users are updating.

I've solved it in our wrapper program by restarting the Explorer.exe in shell mode if we can't find the "Shell_TrayWnd" class window. The trick it seams is in VB you have to shell out to the cmd.exe and in .Net it looks like you have to use the Process.Start to get it to start in shell mode instead of opening a Windows Explorer window.

Public Sub CDZN_ExplorerRestart()
On Error Resume Next
Dim lHwnd As Long
Dim sWindowsFolder As String
Dim sSystem32Folder As String
'See if the Shell_TrayWnd class window exists which is the Explorer Shell
lHwnd = FindWindow("Shell_TrayWnd", vbNullString)
If lHwnd = 0 Then
sWindowsFolder = CDZN_GetSpecialfolder(CSIDL_WINDOWS)
sSystem32Folder = CDZN_GetSpecialfolder(CSIDL_SYSTEM)
ShellExecute 0, "open", CDZN_BuildPath(sSystem32Folder, "cmd.exe"), "/c " & CDZN_BuildPath(sWindowsFolder, "Explorer.exe"), "", SW_HIDE
End If
End Sub

Installshiel 2012 has the same problem with our own program and shell extensions in use so it must be a Windows Installer limitation I take it but we also were able to solve it by disabling the MSIRestartManagerContol which usually means the user has to reboot but it's better than loosing their taskbar and not knowing how to shut down without a start menu.

MSIRESTARTMANAGERCONTROL = “Disable”

Here's the info I had found on it.
http://stackoverflow.com/questions/1598 ... nd-of-inst
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3549
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Installer not restarting the Explorer.exe shell process.

Post by Ivan - Tracker Software »

Hi RMan,
do you use MSI or EXE installer?
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
RMan
User
Posts: 221
Joined: Tue Jul 02, 2013 10:06 pm

Re: Installer not restarting the Explorer.exe shell process.

Post by RMan »

I'm testing with the exe installers. It happens with our customer driver installer but it also happens with the PDFSDKPRO5.zip SDK installers as well as the end user PDFX5.zip installer. I didn't have an older version of the end user to retest but I did retest the PDFSDKPRO5.zip from June and could reproduce it on a test machine.

The trick is you have to first print say a test page to the printer driver so it has been used which will cause you installer to prompt to close the Explorer.exe process since some of the files are in use. Then at the end if you choose to reboot later the menus and such are lost since the Explorer.exe shell process is not restarted.

I made a quick video on a Windows 7 x64 test machine to show you the steps to reproduce it if a user is just stepping through the standard installs even.

www.cadzation.com/tracker/InstallerNotR ... lorer.html
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17889
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Installer not restarting the Explorer.exe shell process.

Post by Tracker Supp-Stefan »

Hello RMan,

Please download and test this installer:
http://www.docu-track.co.uk/5.0.270n1/PDFSDKPRO5.exe

Regards,
Stefan
Post Reply