I want to delete a file prior to the install / reinstall.

I have an app that has 4 config files. and i have it set up as with conditions for the components.

During app install depending on which "flavor" is being installed im passing a parameter to the msi.

Var="Site1"
Var="Site2"
Var="Site3"


Now, if lets say someone at site 1 gets site 2 cfg file i want to just simple reinstall the app over the top
and make sure i get the site2 cfg file.

So what i was thinking, seting up a custom action vbs

If file esxists delete
i have the vbs already working

but i run into a problem where it just deletes the file and it never puts it back on :(


Return processing: Synchronous (Ignore Exit code)
In-script Execution: Deferred Execution
Install Exec Sequence: After InstallInitialize


So you would think that it would delete the file that is there, and then proceed with the install and copy the new file down every time
even on a repair/reinstall.


Install Shield 2009 / Admin Studio
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
To simplify it:

What are the custom action settings if i want to:

delete file prior to the install of the application if it exists,

install the updated file as part of the package
Answered 07/15/2009 by: Enes
Senior Yellow Belt

Please log in to comment
0
Have you verified the file will come down on a machine without the file already existing, that is, are you sure your little variable dance there is working?
Verbose log?
You can use the "Override system version" option on the file you're bringing down as well. I admit, I've had mixed results in the past with that, but it might work for you.
Answered 07/16/2009 by: turbokitty
Sixth Degree Black Belt

Please log in to comment
0
Does your custom action come before the InstallFiles action? It should.

You might be deleting the file too late in the process.
Answered 07/27/2009 by: elgwhoppo
Senior Purple Belt

Please log in to comment
0
You're making things W A Y too complicated. Use the RemoveFile table. http://msdn.microsoft.com/en-us/library/aa371201%28VS.85%29.aspx

AFAICR, InstallShield has a UI for file deletion, to save you having to work out how to use the table.
Answered 07/28/2009 by: VBScab
Red Belt

Please log in to comment
0
ORIGINAL: VBScab

You're making things W A Y too complicated. Use the RemoveFile table. http://msdn.microsoft.com/en-us/library/aa371201%28VS.85%29.aspx



This might even be a candidate for a sticky! LOL, so many questions are answered by that link.
Answered 07/28/2009 by: elgwhoppo
Senior Purple Belt

Please log in to comment
0
First, a post which repeats my advice almost 24 hours after my original and now a post advising the use of a script! A script is completely unnecessary. Look at the sequence: the RemoveFiles action (which reads the RemoveFile table) is executed some time before InstallFiles.

Please, make sure your advice is valid before posting, especially to new packagers. This junk is hard enough to get one's head around without being sent off in completely spurious directions.
Answered 07/29/2009 by: VBScab
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity