Hi, <CustomAction Id="CallRegASM" Directory="INSTALLDIR" Win64="no" ExeCommand=""[WindowsFolder]Microsoft.NET\Framework\v2.0.50727\regasm.exe" /codebase "[INSTALLDIR]MyAssembly.dll"" Return="check" />
works fine. If uninstall I would use <CustomAction Id="CallUnRegASM" Directory="INSTALLDIR" Win64="no" ExeCommand=""[WindowsFolder]Microsoft.NET\Framework\v2.0.50727\regasm.exe" /unregister "[INSTALLDIR]MyAssembly.dll"" Return="check" /> to unregister MyAssembly.dll. I suppose it should happen before the files are removed otherwise the dll will not be found. If I call regasm /unregister my.dll from command line it works. Where should I place the second CA in wxs to work by uninstalling and which attribute has to be used to have it working? I suppose: <InstallExecuteSequence> <LaunchConditions After="AppSearch" /> <Custom Action='CallRegASM' After='InstallFinalize'>NOT Installed</Custom> I suppose somewhere here: <Custom Action='CallUnRegASM' After='CostFinalize'>Installed</Custom> <RemoveExistingProducts After="InstallFinalize" /> </InstallExecuteSequence> but it deliveres an error 2732 Thanks in advance for any quick help, Peter pobox77 wrote: > > Hi Dhaval, > > Does uninstall work too? > I mean will the dll also deregistered if I uninstall the package? > > Thanks in advance, > Peter > > > Don Tasanasanta wrote: >> >> Your solution helped me find what was wrong with mine. For some reason >> the CA didn't like what I was putting in for the Directory value. I put >> in INSTALLDIR and everything worked great. >> >> >> >> Thanks! >> >> >> >> ________________________________ >> >> From: Dhaval Patel [mailto:[EMAIL PROTECTED] >> Sent: Friday, March 09, 2007 4:59 PM >> To: Don Tasanasanta >> Subject: Re: [WiX-users] custom action to reg NET 2.0 >> >> >> >> Here is one of my CustomAction elements that I have used in different >> projects - I don't see anything in your CA that will not allow it to >> work, but maybe you want to change the ExeCommand attribute to something >> like I have and give it a shot: >> >> <InstallExecuteSequence> >> >> <Custom Action='Installation' After='InstallFinalize'>NOT >> Installed</Custom> >> >> </InstallExecuteSequence> >> >> <CustomAction Id='Installation' Directory='INSTALLDIR' Win64='no' >> >> ExeCommand='"[WindowsFolder]Microsoft.NET\Framework\v2.0.50727\regasm.ex >> e" /codebase "[ProgramFilesFolder]MyComapny\MyProduct\MyProduct.dll"' >> >> Return='check' /> >> >> This seems to work just fine (i.e. it successfully registers the .dll >> for COM Interop in the registry). I think I had the same issue that you >> are having, but I figured out the solution through trial and error, and >> then I forgot all about it :) >> >> The problem I think is that you may think WIX will execute the CA from >> within the "Directory" ([FRAMEWORKBASEPATH]v2.0.50727 in your case) >> attribute, but that probably is not the case. Notice in my case how I >> explicitly pass all the paths to the ExeCommand attribute directly - I >> don't even worry about the "Directory" attribute (I assume you can set >> it to any valid DirectoryId within your current WIX project, if you >> decide to use the technique I am using). This is probably the reason why >> it is working in my case, and not yours. >> >> Let us all know if this fixes your issue :) >> >> >> >> >> On 3/8/07, Don Tasanasanta <[EMAIL PROTECTED] > wrote: >> >> I have been banging my head against this all day... I'm trying to get >> aspnet_regiis.exe to run and set the ASPNET version to 2.0 for my >> virtual directory. >> >> >> >> Here is my custom action... >> >> <CustomAction Id="SetAspNet" Return="asyncWait" >> Directory="[FRAMEWORKBASEPATH]v2.0.50727" Execute="commit" >> ExeCommand="aspnet_regiis.exe -s W3SVC/1/ROOT/MYWebsite -norestart" /> >> >> >> >> Where FRAMEWORKBASEPATH is the path to Framework under Microsoft.NET in >> the WINDOWS folder. >> >> >> >> I have also tried >> >> >> >> <CustomAction Id="VIA3AdminAspNet" Return="asyncWait" >> Property="[ASPNETREGPATH]" Execute="commit" ExeCommand="-s >> W3SVC/1/ROOT/MyWebsite -norestart" /> >> >> >> >> Where ASPNETREGPATH is the entire path plus aspnet_regiis.exe >> >> >> >> I have also tried changing the Execute to "immediate" and sequencing the >> custom action after installfinalize. >> >> >> >> Every time I run I get a 1631 return from my custom actions. >> >> >> >> The command line works just fine when run from a cmd prompt. What am I >> missing here? >> >> >> ------------------------------------------------------------------------ >> - >> 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=DEVDE >> V >> _______________________________________________ >> WiX-users mailing list >> WiX-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wix-users >> >> >> >> >> ------------------------------------------------------------------------- >> 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 >> >> > > -- View this message in context: http://www.nabble.com/custom-action-to-reg-NET-2.0-tf3373202.html#a9630470 Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------- 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