Nice tip, thanks it worked fine :-)
On 20/03/07, Hugues Valois <[EMAIL PROTECTED]> wrote:
You may want to try adding a '.' instead of removing the '\'. That
doesn't require a custom action and attrib should like it.
Value='"[SystemFolder]attrib.exe" +S +H "[DocumentsFolder]."
Hugues
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rob
Hamflett
Sent: Tuesday, March 20, 2007 6:51 AM
To: wix-users@lists.sourceforge.net
Subject: SPAM: Re: [WiX-users] Remove slash from the end of directory
property
No, you need a Custom Action.
Rob
Ricardo Lopes wrote:
> Hi,
>
> Is there any simple way to remove the slash at the end of a directory
> property, or remove the last character from a property value?
>
> I'm trying to change attributes for a folder using a custom action at
> the end of the installation but the attrib command from windows
doesn't
> like the slash at the end of the directory property.
>
> Here is a sample of my code:
>
> ...
>
> <CreateFolder Directory="DocumentsFolder" />
>
> ...
>
> <CustomAction Id="SetQtExecCmdLine" Return="check"
> Property="QtExecCmdLine"
> Value='"[SystemFolder]attrib.exe" +S +H "[DocumentsFolder]"'
/>
>
> <CustomAction Id="QtExec" BinaryKey="wixca"
DllEntry="CAQuietExec"
> Execute="immediate" Return="check" />
> <Binary Id="wixca" src="$(var.ResourcesDir)\wixca.dll" />
>
> <InstallExecuteSequence>
> <Custom Action="SetQtExecCmdLine" After="CostFinalize" />
>
> <Custom Action="QtExec" After="InstallFinalize"/>
> </InstallExecuteSequence>
>
>
> The [DocumentsFolder] is replaced by "c:\some\path\", with a "\" in
the
> end.
>
> Thanks,
> Ricardo Lopes.
>
>
>
------------------------------------------------------------------------
>
>
------------------------------------------------------------------------
-
> 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=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
--
Ricardo Lopes
-------------------------------------------------------------------------
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