Hi, Does this mean that users are not supposed to use the "INSTALLDIR" variable in their custom actions? But this is a windows installer variable (supposed to set by the windows installer service itself) and it should be safe to use it.
What is the reason this is not a recommended step not to use "INSTALLDIR" in custom action? Take Care Anirban -----Original Message----- From: Anirban Basu Sent: Tuesday, September 19, 2006 2:08 PM To: '[EMAIL PROTECTED]' Subject: RE: [WiX-users] FW: issue around INSTALLDIR Hi Rob, Thanks for your responses so far. I am trying to find some documentation on the [!FileId] syntax in MSI SDK. Still could not find it. If you have some of the documentation available, can you just forward me? Take Care Anirban -----Original Message----- From: Rob Mensching [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 19, 2006 11:59 AM To: Anirban Basu Subject: RE: [WiX-users] FW: issue around INSTALLDIR You should read: http://blogs.msdn.com/robmen/archive/2004/05/20/136530.aspx about VBScript CustomActions. You really should find better ways to call your code. Really, this CustomAction is scary from many different angles. I suggest reading the Formatted topic in the MSI SDK to understand the [!FileId] syntax. It is a far better way to refer to files you are installing. -----Original Message----- From: Anirban Basu [mailto:[EMAIL PROTECTED] Sent: Monday, September 18, 2006 23:09 To: [EMAIL PROTECTED] Subject: RE: [WiX-users] FW: issue around INSTALLDIR Here is the list of custom actions. <!-- Custom actions --> <CustomAction Id='InstallAdapterMethod' BinaryKey='PreReqScripts.vbs' VBScriptCall='InstallAdapter' Return='check'></CustomAction> <CustomAction Id='DeleteAdapterMethod' BinaryKey='PreReqScripts.vbs' VBScriptCall='UninstallAdapter' Return='check'></CustomAction> <CustomAction Id='IsAdapterExistMethod' BinaryKey='PreReqScripts.vbs' VBScriptCall='IsAdapterExists' Return='check'></CustomAction> <CustomAction Id='IsSendPortExistMethod' BinaryKey='PreReqScripts.vbs' VBScriptCall='IsSendPortExists' Return='check'></CustomAction> <CustomAction Id='IsSSORunningMethod' BinaryKey='PreReqScripts.vbs' VBScriptCall='IsSSOServiceRunning' Return='check'></CustomAction> <CustomAction Id="PrintEula" BinaryKey="WixCA" DllEntry="PrintEula" Return="ignore" Execute="immediate"/> <AdminExecuteSequence /> <InstallExecuteSequence> <Custom Action="InstallAdapterMethod" After="InstallFinalize">$copydlls>2</Custom> <Custom Action="DeleteAdapterMethod" After="InstallInitialize">$copydlls=2</Custom> <RemoveExistingProducts After="InstallFinalize" /> </InstallExecuteSequence> The script file we are using Pre-reqScripts.vbs is attached here. Please look into the method RegisterDllAndCallMethod. It is called from InstallAdaptrer and UninstallAdapter. But how the [!FileId] can be used? I have a file with id "xyz". Then how I can access the dll? What will be the syntax? Take Care Anirban -----Original Message----- From: Rob Mensching [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 19, 2006 11:31 AM To: Anirban Basu; "[EMAIL PROTECTED]" Subject: RE: [WiX-users] FW: issue around INSTALLDIR Why are you using INSTALLDIR at all? Can you show the CustomAction element that you're calling? I expect we'll find that you can use [!FileId] instead of [INSTALLDIR]filename.dll and get better results. ________________________________________ From: Anirban Basu Sent: Monday, September 18, 2006 6:28 PM To: Rob Mensching; Windows Installer XML Subject: RE: issue around INSTALLDIR Hi, Thanks for your responses. Rob, probably it is not possible to do away with the custom action. I am giving you more details on this. The custom action registers a dll which is copied to the installation directory. The dll is a .NET assembly. Then it calls "Install" and "Uninstall" method within the assembly which does specific actions. (like making BizTalk WMI calls etc.). I agree that storing the installation directory specifically into the registry is an option, but is it what all users of WIX are supposed to do? Does WIX not handle the modified installation directory? I agree that if I do not store modified installation directory somewhere it is not possible for WIX to identify the installation directory. But what I want to know is that from where WIX reads this value of "INSTALLDIR"? Your help is much appreciated. Take Care Anirban ________________________________________ From: Rob Mensching Sent: Saturday, September 16, 2006 3:17 PM To: Cullen Waters; Anirban Basu; Windows Installer XML Subject: RE: issue around INSTALLDIR Or better yet, quit calling your CustomAction. Something sounds very fishy in this design. More details about what you are doing in the CustomAction are probably necessary to really provide useful information. From: Cullen Waters Sent: Friday, September 15, 2006 09:58 To: Anirban Basu; Windows Installer XML Subject: RE: issue around INSTALLDIR Other users have reported that you have to save the modified installation directory value during install somewhere(like the registry). Then, on untinstall/reinstall/modify, do a regsearch to get the value of the key you created, and change INSTALLDIR to that value. Make sense? From: Anirban Basu Sent: Friday, September 15, 2006 7:50 AM To: Windows Installer XML Subject: issue around INSTALLDIR Importance: High Hi, I am running into a very severe issue. I may be having some problem in my setup.wxs file but really not being able to debug it. The issue is as follows. We have a very simple setup, which during setup registers an assembly (for custom action) and calls its methods. If the installation directory of the product is changed to something else from the default installation directory, the installation gets through properly. Actually in this case "INSTALLDIR" is changed properly to the value of the installation directory that user has selected. During un-installation the variable "INSTALLDIR" takes the default value and never changes to what user has selected during installation. So during un-installation the registration of the custom action assembly fails. Hence the un-installation fails. I can not find what from where windows installer is setting "INSTALLDIR" to default installation directory. Is using the "INSTALLDIR" property reliable? Do I need to set "INSTALLDIR" explicitly? Can somebody please tell me whether it is the expected behavior? Please reply ASAP. We are badly stuck in this issue. Any help will be appreciated. Microsoft India R&D Pvt. Ltd. God is good. Anirban Basu [EMAIL PROTECTED] Add me to your address book... Want a signature like this? ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users