I have this CustomAction in the wxs:

                <Directory Id="Configuration" Name="Config" 
LongName="Configuration">
                                <Component Id="ConfigFolder" 
Guid="4E448681-4A71-4c10-89EB-F09F4521171E">
                                                <!--File Id="ConfiguratorXML" 
Name="conf~1.xml" LongName="configurator.xml" Source=".\configurator.xml" 
DiskId="1"/-->
                                                <File Id="ConfiguratorEXE" 
Name="SFSCo~1.exe" LongName="SFSConfigFileEditor.exe" 
Source=".\SFSConfigFileEditor.exe" DiskId="1"/>
                                                </Component>
                </Directory>

<CustomAction Id="LaunchConfigurationExecutable" FileKey="ConfiguratorEXE" 
ExeCommand="configurator.xml &quot;[SFSENVIRONMENT]&quot;" Return="asyncWait"/>

In SFSConfigFileEditor.exe source code, it's look for configurator.xml in 
C:\Temp.

static int Main(string[] args)
                                {
                                                if (args.Length == 2)
                                                {
                                                                string logDir = 
@"C:\Temp";

                                                                if 
(!Directory.Exists(logDir))
                                                                {
                                                                                
Directory.CreateDirectory(logDir);
                                                                }
                                                                
DebugHelper.Logger.Log("Begin Configuration.", 
Path.Combine(logDir,"Configurator.log"));

                if(args[0].IndexOf('\\') < 0)
                                                    {
                                                        args[0] = logDir + '\\' 
+ args[0];
                                                    }


Now the deployment team doesn't like it. They want the SFSConfigFileEditor.exe 
look for configurator.xml in the current directory where the msi file is 
running.

If I change code as follows, it looks for the file in 
C:\Windows\System32\configurator.xml

if (configFile.IndexOf('\\') < 0)
                      {
                    configFile = Path.Combine(Directory.GetCurrentDirectory(), 
configFile);
                      }

Thanks
Jirong Hu
Build Master
780-644-5488


This communication is intended for the use of the recipient to which it is 
addressed, and may contain confidential, personal, and or privileged 
information. Please contact us immediately if you are not the intended 
recipient of this communication, and do not copy, distribute, or take action 
relying on it. Any communication received in error, or subsequent reply, should 
be deleted or destroyed.
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to