Never overwrite

Got a problem you cannot solve? Try here.
cedd
Posts: 4
Joined: Fri May 14, 2010 11:13 am

Never overwrite

Postby cedd » Fri May 14, 2010 11:15 am

Hi

I have a file in my install program marked as "never Overwrite" and "permanent file". Whenever I run the install program it overwrites this file. At best this seems counter intuitive. At worst an error. I am very glad I checked this before releasing it as I would have got in big trouble. Is there a way of making this work?

Thanks

Cedd

cedd
Posts: 4
Joined: Fri May 14, 2010 11:13 am

Re: Never overwrite

Postby cedd » Wed May 19, 2010 4:48 am

Hello again.

I cannot believe that I am the first person to want to install a file only in the case where it doesn't exist already. I also can't believe that installaware is not capable of doing this.

I have read the help, which is not very detailed but certainly implies that it should work. it doesn't work. I've searched the forums and not found anything helpful. There is one post that says overwriting an existing file is "expected behaviour" when "never overwrite" is ticked, which seems strange.

Can someone please, please tell me how to do this.

Thanks

Cedd

sdeschenes
Posts: 76
Joined: Wed Sep 12, 2007 3:34 pm

Re: Never overwrite

Postby sdeschenes » Wed May 19, 2010 11:56 am

Hi,

I built a stripped down installer project which includes a file (named FileA) that is dated 8/11/2009, made sure that it does not overwrite the same file if it exists on the target system and installed. I, then, rebuilt my installer but this time I used a newer version of FileA, which is dated 4/13/2010. After installing, I checked FileA on the target system and it is still dated 8/11/2009.

I even tried installing the file as permanent. After uninstalling, I checked the target system and the file was not removed.

I am not sure why you are running into this issue. Do you have a sample project that can reproduce the problem you are experiencing?

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

Re: Never overwrite

Postby MichaelNesmith » Wed May 19, 2010 5:55 pm

That is truly odd.

Try wrapping the Install Files statement around an If...End clause.

Call Does File/Folder Exist on the file in question, and test the return of that in the wrapper If clause.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

cedd
Posts: 4
Joined: Fri May 14, 2010 11:13 am

Re: Never overwrite

Postby cedd » Thu May 20, 2010 2:03 am

Thanks for the replies people, I shall look into this and let you know how I get on.

cedd
Posts: 4
Joined: Fri May 14, 2010 11:13 am

Re: Never overwrite

Postby cedd » Thu May 20, 2010 4:07 am

Hi.

I tried building the install again this morning and it worked just fine (so apologies for the messages - I am embarassed). This confused me though, so I tried some experimenting. I unticked the never overwrite and permanent file boxes and rebuilt, but the install program then didn't overwrite the file (when it should have) closing installaware, opening again, rebuilding and then running seemed to sort the problem out. The same problem happened when ticking the boxes again. It seems that something needs to happen in order for the build process to notice that these boxes have been ticked / unticked. I thought saving the project might be the thing to do it but I couldn't spot a pattern as to why and when this occurs. The good news for me is that once the install file is built, the results are the same (if it overwrites once, it will always overwrite and vice versa) so this means that as long as I test the install before release everything should be fine.

Thanks for the help

Cedd


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 14 guests