There's a MoveFile immediate CA in http://msiext.codeplex.com. 
Although "cmd.exe /C move "..."" will work as well on all operating 
systems except Windows 9x.

dB. @ dblock.org 
Moscow|Geneva|Seattle|New York



-----Original Message-----
From: Nicole Zheng [mailto:nicole.zheng...@hotmail.com] 
Sent: Wednesday, February 03, 2010 5:06 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] How to rename an existing file after installation (major 
upgrade)?


When my application runs for the 1st time, it creates a file named devcie.txt
under the installation folder.
Since the file name is a typo (should be device.txt), I want to provide a
higher version .msi to perform a major upgrade and rename the file during
the installation.

My code is like:
<Property Id="QtExecCmdLine" Value="rename &quot;C:\Program
Files\MyApp\Devcie.txt&quot; Device.txt" />
    <CustomAction Id="QtExecExample" BinaryKey="WixCA"
DllEntry="CAQuietExec" Execute="immediate" Return="check"/>
.
.
.
<InstallExecuteSequence>
      <Custom Action="QtExecExample" After="InstallFinalize"/>
</InstallExecuteSequence>

But it doesn't work. The error logs:
CAQuietExec:  Command string must begin with quoted application name.
CAQuietExec:  Error 0x80070057: invalid command line property value
CAQuietExec:  Error 0x80070057: failed to get Command Line

Look forward your help. Thanks a lot.


-- 
View this message in context: 
http://n2.nabble.com/How-to-rename-an-existing-file-after-installation-major-upgrade-tp4506348p4506348.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to