Re: [WiX-users] WIX custom action
http://buildmaestro.wordpress.com/2011/08/30/c-dtf-using-locale-net-culture-folder-and-resources-files-for-translations-with-makesfxca-exe/ -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] WIX custom action
I don't know why that specific thing doesn't work, but if you are in the UI dialogs, then there are no .resx files installed, or resource Dlls either. From the MSI point of view, the big picture is that MSI files do one language at a time, typically applied at install time by specifying a transform for the specific language in the command line options.. So there is no point in having code that chooses between multiple languages when there will only be one language in the MSI being installed. You'd build a transform for that MSI file that includes localized dialogs and errors. The errors are in the Error table, so your custom action code just gets the error text from the Error table by number. That's why the DTF Session.Message call has an overload that takes an error number, meaning just display the text associated with this error number. This is the way that MSI files are localized. There is also WiX help for localized strings for the install, see following link, but I believe that's mainly to do with building separate MSIs for each language without using transforms, but using WiX localization features instead. There's still one language per MSI. http://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/make_installer_localizable.html --- Phil Wilson On Fri, Jul 4, 2014 at 7:42 AM, Vaghela, Rajesh rajesh.vagh...@capgemini.com wrote: Hi Friends, I have created one custom dialog on its next it validates whether the selected folder is system folder or not. To achieve the above requirement I have created custom action using c#, to this custom action selected path is being send. In case the selected path is system folder then it call Win32 MessageBox.Show(System folder not allowed). Everything works fine as expected. Now the problem is I need to localize the text System folder not allowed, so I have created Messages.resx and Messages.fr-FR.resx resource file. And purposely for testing I have set System.Resources.ResourceManager rm = new System.Resources.ResourceManager(MyCustomAction.Messages, Assembly.GetExecutingAssembly()); string culture = fr-FR; currentCultureInfo = new CultureInfo(culture); Thread.CurrentThread.CurrentUICulture = currentCultureInfo; Thread.CurrentThread.CurrentCulture = currentCultureInfo; MessageBox.Show(rm.GetString(SystemFolderNotAllowed_lbl)); The above code always return English locale text. Is it because I am not adding statellite assembly? If yes then how do I add as after build I get MyCustomAction.CA.dll. Do I need to do some extra work to add localization in custom action? Thanks regards, Rajesh -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] WIX custom action
I have not done this with a C# dll CA, but I had a similar problem localizing my mba C# dll. The C# dll gets loaded into a host. In the mba case the host had already defined a resource dictionary using the default name. So in my project (which is not in front of me now) I had to define resx files with a different name than the default resource_en.resx. Rather than use satelite DLLs (which you won't be able to use with a C# DLL in the Binary table, without significant difficulty so far as I am aware) mark the resx files as EmbbeddedResources. Then I used ILSpy to look at the assembly and figure out what the correct namespace was to access the resource dictionary defined by my resx files. It was some time ago that I did this, so I am sure my description is lacking some detail. -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/WIX-custom-action-tp7595655p7595667.html Sent from the wix-users mailing list archive at Nabble.com. -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
[WiX-users] WIX custom action
Hi Friends, I have created one custom dialog on its next it validates whether the selected folder is system folder or not. To achieve the above requirement I have created custom action using c#, to this custom action selected path is being send. In case the selected path is system folder then it call Win32 MessageBox.Show(System folder not allowed). Everything works fine as expected. Now the problem is I need to localize the text System folder not allowed, so I have created Messages.resx and Messages.fr-FR.resx resource file. And purposely for testing I have set System.Resources.ResourceManager rm = new System.Resources.ResourceManager(MyCustomAction.Messages, Assembly.GetExecutingAssembly()); string culture = fr-FR; currentCultureInfo = new CultureInfo(culture); Thread.CurrentThread.CurrentUICulture = currentCultureInfo; Thread.CurrentThread.CurrentCulture = currentCultureInfo; MessageBox.Show(rm.GetString(SystemFolderNotAllowed_lbl)); The above code always return English locale text. Is it because I am not adding statellite assembly? If yes then how do I add as after build I get MyCustomAction.CA.dll. Do I need to do some extra work to add localization in custom action? Thanks regards, Rajesh -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
[WiX-users] Wix Custom Action - SchedXMLFile
Hi, I have an xml file (e.g.: Sampleconfig.xml) that contains a number of key-value configuration data such as connection string. During installation time, there is a custom action that takes these data from the sample config file, and populate them as MSI properties. E.g.: the custom action takes connectionstringvalue from SampleConfig.xml and put it in a msi property called connectionstringxml which is used by the wix custom action xmlfile to modify xml entry in the target file web.config. For the msi package, the wix xmlfile custom action run just fine. Now, I built a patch and in a verbose log I see that during the installation the SchedXMLFile custom action was called with return value 1. However, I don't see new updates to my target web.config file. My question is, what is return value 1 mean for the xmlfile wix custom action? Was it run or aborted? How can I get the xml replacement to work for the patch ? Many thanks for your help. _ Live connected. Get Hotmail Messenger on your phone. http://go.microsoft.com/?linkid=9724462 -- ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] WiX custom action error on windows vista or XP
Are you logging in your CA before each and any error is returned? What specifically, according to the installation log, is the error? -Original Message- From: Alex Wernecke [mailto:awerne...@finteq.co.za] Sent: Tuesday, February 23, 2010 9:39 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] WiX custom action error on windows vista or XP They require .Net Framework 2.0, Im testing for the framework with the following condition PropertyRef Id=NETFRAMEWORK35/ Condition Message=The .NET Framework 3.5 must be installed ([NETFRAMEWORK35]) Installed OR NETFRAMEWORK35 /Condition This test is done just within the package tags. So it checks as the installer is launched. I made a reference to WixNetFxExtenstion so that it can check the framework. Is it a problem that im checking for framework 3.5? Although I didn't think it would as 3.5 needs 2.0 to be installed too. Could the problem be Windows Installer? Here is the custom action declaration and binary reference. CustomAction Id=LaunchSettings BinaryKey=ServiceInstall DllEntry=InstallService Execute=immediate/ Binary Id=ServiceInstall SourceFile=C:\Users\User\Documents\Visual Studio 2008\Projects\Project\InstallAService\bin\Debug\InstallAService.CA.dll / Custom actions are sequenced in the InstallExecuteSequence. InstallExecuteSequence !--Launch Action-- Custom Action=SQLConnector After=InstallFilesNOT Installed/Custom /InstallExecuteSequence -Original Message- From: Blair [mailto:os...@live.com] Sent: Tuesday, February 23, 2010 6:25 PM To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] WiX custom action error on windows vista or XP What version of the framework do your custom actions require, and what version of the framework are you testing for? Also, how/where do you test for the framework, and at what point are your custom actions sequenced? -Original Message- From: Alex Wernecke [mailto:awerne...@finteq.co.za] Sent: Tuesday, February 23, 2010 6:31 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] WiX custom action error on windows vista or XP Hi, Im having a problem. My WiX MSI's seem to only work correctly on windows 7? In my WiX installation custom c# project actions are called and performed but it only seems to work on windows 7 machines. I have a condition check to check that the machine has .Net Framework 3.5 but at the point in the installation when the c# custom action is executed the application installation ends with an error. The installation needs to be done on any machine from Windows XP or newer. What could cause this?? Many thanks, Alex -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users __ Information from ESET Smart Security, version of virus signature database 4890 (20100223) __ The message was checked by ESET Smart Security. http://www.eset.com __ Information from ESET Smart Security, version of virus signature database 4890 (20100223) __ The message was checked by ESET Smart Security. http://www.eset.com -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
[WiX-users] WiX custom action error on windows vista or XP
Hi, Im having a problem. My WiX MSI's seem to only work correctly on windows 7? In my WiX installation custom c# project actions are called and performed but it only seems to work on windows 7 machines. I have a condition check to check that the machine has .Net Framework 3.5 but at the point in the installation when the c# custom action is executed the application installation ends with an error. The installation needs to be done on any machine from Windows XP or newer. What could cause this?? Many thanks, Alex -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] WiX custom action error on windows vista or XP
What version of the framework do your custom actions require, and what version of the framework are you testing for? Also, how/where do you test for the framework, and at what point are your custom actions sequenced? -Original Message- From: Alex Wernecke [mailto:awerne...@finteq.co.za] Sent: Tuesday, February 23, 2010 6:31 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] WiX custom action error on windows vista or XP Hi, Im having a problem. My WiX MSI's seem to only work correctly on windows 7? In my WiX installation custom c# project actions are called and performed but it only seems to work on windows 7 machines. I have a condition check to check that the machine has .Net Framework 3.5 but at the point in the installation when the c# custom action is executed the application installation ends with an error. The installation needs to be done on any machine from Windows XP or newer. What could cause this?? Many thanks, Alex -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] WiX custom action error on windows vista or XP
They require .Net Framework 2.0, Im testing for the framework with the following condition PropertyRef Id=NETFRAMEWORK35/ Condition Message=The .NET Framework 3.5 must be installed ([NETFRAMEWORK35]) Installed OR NETFRAMEWORK35 /Condition This test is done just within the package tags. So it checks as the installer is launched. I made a reference to WixNetFxExtenstion so that it can check the framework. Is it a problem that im checking for framework 3.5? Although I didn't think it would as 3.5 needs 2.0 to be installed too. Could the problem be Windows Installer? Here is the custom action declaration and binary reference. CustomAction Id=LaunchSettings BinaryKey=ServiceInstall DllEntry=InstallService Execute=immediate/ Binary Id=ServiceInstall SourceFile=C:\Users\User\Documents\Visual Studio 2008\Projects\Project\InstallAService\bin\Debug\InstallAService.CA.dll / Custom actions are sequenced in the InstallExecuteSequence. InstallExecuteSequence !--Launch Action-- Custom Action=SQLConnector After=InstallFilesNOT Installed/Custom /InstallExecuteSequence -Original Message- From: Blair [mailto:os...@live.com] Sent: Tuesday, February 23, 2010 6:25 PM To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] WiX custom action error on windows vista or XP What version of the framework do your custom actions require, and what version of the framework are you testing for? Also, how/where do you test for the framework, and at what point are your custom actions sequenced? -Original Message- From: Alex Wernecke [mailto:awerne...@finteq.co.za] Sent: Tuesday, February 23, 2010 6:31 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] WiX custom action error on windows vista or XP Hi, Im having a problem. My WiX MSI's seem to only work correctly on windows 7? In my WiX installation custom c# project actions are called and performed but it only seems to work on windows 7 machines. I have a condition check to check that the machine has .Net Framework 3.5 but at the point in the installation when the c# custom action is executed the application installation ends with an error. The installation needs to be done on any machine from Windows XP or newer. What could cause this?? Many thanks, Alex -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users __ Information from ESET Smart Security, version of virus signature database 4890 (20100223) __ The message was checked by ESET Smart Security. http://www.eset.com __ Information from ESET Smart Security, version of virus signature database 4890 (20100223) __ The message was checked by ESET Smart Security. http://www.eset.com -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] WIX - Custom Action calling EXE (with a dependent DLL)
Sankaranarayanan wrote: In my installer - I have a custom action which calls an EXE to perform some operation. At the end of the installation, I want to make sure that the EXE used in the Custom Action is deleted from the system. I don't want to ship the EXE to clients. Remember that anyone can extract any file from an MSI, so if your goal is to prevent users from having access to the file, deleting it won't do any good from a security perspective. 1) Are there any better approaches for this problem - No. That's why the recommendation is that CAs not have dependencies. 2) Instead of copying the files to Program Files folder - Are there ways to load the EXE and DLL in Binary table and make the EXE reference the DLL. No. 3) Are there any automatic ways to delete the EXE and DLL files at the end of the operation. (without writing another Custom Action to make calls to del command) No. -- sig://boB http://bobs.org - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
[WiX-users] WIX - Custom Action calling EXE (with a dependent DLL)
Hi, In my installer - I have a custom action which calls an EXE to perform some operation. At the end of the installation, I want to make sure that the EXE used in the Custom Action is deleted from the system. I don't want to ship the EXE to clients. I find that we can do it in the following ways 1) Package the EXE in Binary Table - so that the installer will automatically extract it into its temp directory and delete it at the end of the operation. 2) Unfortunately - In my case, the EXE has the dependency on a DLL, so option 1 is ruled out. Even if I have the EXE and the DLL file in Binary Table - The installer doesn't seem to extract the DLL file into the temporary directory and the Custom Action fails with reason EXE couldn;t load the DLL. Currently I am copying both DLL and EXE into Program Files folder and execting the Custom Action with (WIXCA.CAQuietExec operation). Have another custom action to delete the EXE and DLL from program files folder after usage. 1) Are there any better approaches for this problem - 2) Instead of copying the files to Program Files folder - Are there ways to load the EXE and DLL in Binary table and make the EXE reference the DLL. 3) Are there any automatic ways to delete the EXE and DLL files at the end of the operation. (without writing another Custom Action to make calls to del command) Your thoughts are most welcome. Thanks, Loonysan ___ Yahoo! Answers - Got a question? Someone out there knows the answer. Try it now. http://uk.answers.yahoo.com/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users