Archive: WinSxS_HasAssembly and msvcrt90.dll


WinSxS_HasAssembly and msvcrt90.dll
I'm using WinSxS_HasAssembly to detect whether vc++ 2008 SP1 redistributables are installed. The function always returns 0 even though the redist package is installed. I'm calling the function with the following code...

Function CheckVCRedist
Var /GLOBAL VCREDIST
push 'msvcr90.dll'
push 'Microsoft.VC90.CRT,version="9.0.21022.8",type="win32",processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b"'
call WinSxS_HasAssembly
pop $VCREDIST
DetailPrint 'WinSxS check for runtime returned $VCREDIST'
FunctionEnd


Anyone else have any difficulty with this function and vc++ 2008 SP1?

I remember glancing over a discussion on this over here..
http://kobyk.wordpress.com/2008/04/1...sis-installer/
..though I don't know if it was actually resolved there.

To be honest, we use the registry keys to detect whether it is installed (it's not foolproof, but no method seems to be.. and if the registry key is missing while the product -is- installed, it's typically a good idea for the user to re-install anyway), and the prepackaged installers (run in silent mode) to install them if needed - rather than trying to install them ourselves.

But that discussion should give you something to work with, at least :)


You have a space in x86, not sure if that is just the forum post or what but the assembly string needs to be in the correct format and the function is very picky about it.

Also, your post says msvcrt90.dll but your code says msvcr90.dll, make up your mind ;)