Archive: Annoying popup dialogs


Annoying popup dialogs
Hi

I need to install the following:

Microsoft Visual C++ 2005 SP1 Redistributable Package (x86)

Microsoft's brief description is:

The Microsoft Visual C++ 2005 SP1 Redistributable Package (x86) installs runtime components of Visual C++ Libraries required to run applications developed with Visual C++ on a computer that does not have Visual C++ 2005 installed.

I have no problems installing the executable but get annoying dialogs popping up whilst it's doing it's stuff despite executing it with /Q for quiet.

Is there a way to prevent these dialogs from appearing.

Cheers,

Paul


http://blogs.msdn.com/astebner/archi...-packages.aspx and http://unattended.sourceforge.net/installers.php might be able to help


The visual c redistributable package is like an onion, the installer have several layers wrapped around the core installer. The layers don't pass along the quiet switch that you want, so I solved it by extracting the central installer (msi and cab file) before building my installer and calling that from my installer:

DetailPrint "Extract: VCRedist_x86.exe"
SetDetailsPrint none
SetOutPath $PLUGINSDIR
File "WindowsInstaller-KB893803-v2-x86.exe"
File "VCRedist.msi"
File "VCRedis1.cab"

SetDetailsPrint both
DetailPrint "Execute: WindowsInstaller-KB893803-v2-x86.exe"
SetDetailsPrint none
ExecWait '"$PLUGINSDIR\WindowsInstaller-KB893803-v2-x86.exe" /quiet /norestart'

SetDetailsPrint both
DetailPrint "Execute: VCRedist_x86.exe"
SetDetailsPrint none
ExecWait '"$SYSDIR\msiexec.exe" /i $PLUGINSDIR\VCRedist.msi /qn /norestart'

I also include the Windows Installer (3.0) because our systems are using Windows 2000 Professional and Windows Installer was only at version 2. The VCRedistributable package requires Windows Installer 3.0

Don

msiexec.exe ?
Hi

Thanks for your quick reply.

I have extracted vcredist_x86.exe to get VCREDI~3.EXE and then extracted that to get vcredist.msi & vcredis1.cab.

I downloaded WindowsInstaller-KB893803-v2-x86.exe

So now we have the following files:

(1) vcredist_x86.exe
(2) VCREDI~3.EXE (I suppose it's OK to delete this?)
(3) vcredist.msi
(4) vcredis1.cab
(5) WindowsInstaller-KB893803-v2-x86.exe


I've followed everything you have said but do not understand where the msiexec.exe comes from in your code.

Cheers,

Paul


msiexec.exe is in the Windows system32 folder (the $SYSDIR variable will point there). It is the exe that knows how to process msi files.

Yes, you can get rid of the VCREDI~3 file. The vcredist_x86.exe is not needed either. I display to the user that it is being installed when we really install only the msi and cab files.

Don


Windows Installer Window appears
Hi

Thanks for the explanation.

I've got it working now, the only problem is towards the end of the install I get the Windows Installer Window appear. I've attached it so you know what I'm talking about.

Any ideas how to get rid of that as well?

Cheers,

Paul


I just found out that executing the vcredist_x86.exe with the following parameters from the command line replicates my problem.


vcredist_x86.exe /q:a /c:"msiexec /i vcredist.msi /qn /l*v %temp%\vcredist_x86.log"


That is, the Windows Installer window appears.

Cheers,

Paul

Your screen shot is missing so I don't know exactly what the message about Windows Installer said. If it says "Error 1723. There is a problem with this Windows Installer package..." then Windows Installer needs the upgrade (to 3.0) which is why I install it before running the msi to install the VC redistributables. My installs run without any popup messages at all.

Are you still running the vcredist_x86.exe and also running the msiexec to install the msi file? that would be attempting to install the same files twice (which shouldn't hurt, but is a waste of time and space in the installer).

I executed the command you showed in your post on a fresh Win2k SP4 system and don't get any popups, but the files are not installed. Which OS are you installing on?

Don


Screen Shot
Sorry I definitely attached it, I think that maybe it was too big, so I've made it smaller this time.

There is no error, the Windows Installer installs correctly and can be seen in Control Panel -> Add/Remove Programs. In addition, the VCRedist_x86.exe (AKA msi file) is installed correctly because it can also be seen there.


DetailPrint "Executing: WindowsInstaller-KB893803-v2-x86.exe"
SetDetailsPrint none
ExecWait '"$INSTDIR\bin\VC_Redist\WindowsInstaller-KB893803-v2-x86.exe" /quiet /norestart'

DetailPrint "Execute: VCRedist_x86.exe"
SetDetailsPrint none
ExecWait '"$SYSDIR\msiexec.exe" /i $INSTDIR\bin\VC_Redist\vcredist.msi /qn /norestart'


You can see from my code that I'm not running vcredist_x86.exe twice. The OS is XP. I also tested my installer on a clean Windows XP virtual machine and I have the same problem.

Cheers,

Paul

That looks like the help screen that appears because Windows Installer got an unknown switch. I don't see any errors in your command line though.

Run it again and when that window appears, look at it with Process Explorer to verify the command line passed to it. That should show you what switch it doesn't like.

Don


OK, I'll download that and give it a go. What do you mean by a "unknown switch".

Cheers,

Paul


The help window is showing the parameters (switches) that it understands. If you give it something that's not on the list, it pops up that help info.

ExecWait "$SYSDIR\msiexec.exe /i vcredist.msi /foo"

Don


That's a nice program man, thanks for that.

I have taken the following from Process Explorer.

----------------------------
WindowsInstaller-KB893803-v2-x86.exe
----------------------------
tab selected= Image

Command line="C:\Documents and Settings\Paul\Desktop\ApplicationName\bin\VC_Redist\WindowsInstaller-KB893803-v2-x86.exe" /quiet /norestart
Path=C:\Documents and Settings\Paul\Desktop\ApplicationName\bin\VC_Redist\WindowsInstaller-KB893803-v2-x86.exe
Current directory=C:\Documents and Settings\Paul\Desktop\ApplicationName\
Version=3.01.0000.0000
Parent=ApplicationName_v1.0.exe(3592)

----------------------------
msiexec.exe
----------------------------
tab selected=Image

Command line="C:\WINDOWS\system32\msiexec.exe" /i C:\Documents and Settings\Paul\Desktop\ApplicationName\bin\VC_Redist\vcredist.msi /qn /norestart
Path=C:\WINDOWS\system32\msiexec.exe
Current directory=C:\Documents and Settings\Paul\Desktop\ApplicationName\
Version=3.01.4000.1823
Parent=AplicationName_v1.0.exe(1280)

Looks good to me, Any ideas?

Cheers,

Paul


The argument to the /i switch in the msiexec.exe command line needs quotes because "Documents and Settings" contains spaces.

Don


I can't believe after all that it was a quotes issue.
Thanks for your help on this matter, it works as expected.

Cheers,

Paul