Move local files not working?

Got a problem you cannot solve? Try here.
moz
Posts: 8
Joined: Tue May 01, 2007 10:07 pm

Move local files not working?

Postby moz » Tue May 01, 2007 10:14 pm

I'm using a trial version of Admin 6.5 (build 42307) and trying to edit a text file during the install. When we upgrade our app we need to change some config settings to reflect the new version. So, I read the text file into a variable, make the changes and write it back out (append, not overwrite). That all works.

Rather than get two copies of the config inside the file, I'd like to rename or delete the original.

I've tried "move local files" with both the $TARGETDIR$ variable and a hardcoded path, "delete (when installing)" and neither work. I've even done a small write before both because the help on "write into text file" says that it will close the file when "read from text file" doesn't, but it turns out that I can manually move/rename the file when debugging the install so that shouldn't be the problem.

What does work is "Call DLL Kernel32.MoveFileA" as suggested here

Is the non-working of delete and move local file me not using them correctly?

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Thu May 03, 2007 5:17 pm

You are probably expecting the command to take immediate effect, when it won't, because its a Windows Installer command, and will execute when Apply Install or Apply Uninstall is called from your script.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 106 guests