Delete File prior to install
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
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
Answers (6)
Please log in to answer
Posted by:
Enes
13 years ago
Posted by:
turbokitty
13 years ago
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.
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.
Posted by:
elgwhoppo
13 years ago
Posted by:
anonymous_9363
13 years ago
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.
AFAICR, InstallShield has a UI for file deletion, to save you having to work out how to use the table.
Posted by:
elgwhoppo
13 years ago
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.
Posted by:
anonymous_9363
13 years ago
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.
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.

so that the conversation will remain readable.