Switching to forward slashes seems very strange on a Windows system. Many
people have found an easy way to make older tools that don't correctly handle
trailing backslashes is to put a dot on the end of the string.
"[ProgramFilesFolder]."
That gets me, "C:\Program Files\." which will be treated as the directory.
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Aaron Shurts
Sent: Wednesday, June 06, 2007 9:33 AM
To: [EMAIL PROTECTED]
Cc: WiX-users@lists.sourceforge.net
Subject: Re: [WiX-users] INSTALLDIR Parameter to CustomAction
Call this as a custom action just after CostFinalize in the immediate sequence:
sub ConvertSlash()
dim strInstallDir, strModifiedDir
strInstallDir = Session.Property("INSTALLDIR")
strModifiedDir = Replace(strInstallDir, "\", "/")
Session.Property("SLASH_DIR") = strModifiedDir
end sub
In your custom action, reference the newly created property [SLASH_DIR], or
whatever you would like to call it. INSTALLDIR is left intact so that Windows
Installer will play nicely with it and you have a new property to work with in
your custom actions.
Regards,
//aj
On 6/5/07, [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]> <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:
I've run into a problem that sounds fairly simple to resolve, however,
I've been spinning my wheels on it for a while.
I've created a CustomAction that requires the install path parameter.
However, the string does not come across correctly in my arguments of
the exe because of the "\". I need to set it to "/", but my wxs will
not recognize the path.
I've tried all of the following:
C:\Program Files\MyPath\ -- produces incorrect string in exe (C:\Program
Files\MyPath")
C:\\Program Files\\MyPath\\ -- produces incorrect string in exe
(C:\Program Files\MyPath")
C:/Program Files/MyPath/ -- produces error when running MyInstall.msi
(Could not access network location C:/Program Files/MyPath.)
[C:\Program Files\MyPath\] -- produces error when running MyInstall.msi
(Could not access network location [C:\Program Files\MyPath\].)
<Property Id="INSTALLDIR">C:\Program Files\MyPath\</Property>
<Binary Id="configupdater"
SourceFile="c:\temp\my_csharp_executable.exe" />
<CustomAction
Id="MyAction"
ExeCommand="[mybinary] "[INSTALLDIR]""
BinaryKey="mybinary" Return="check" Execute="immediate"
/>
Any help is greatly appreciated.
Regards,
~mark
-------------------------------------------------------------------------
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<mailto:WiX-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/wix-users
-------------------------------------------------------------------------
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