This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Solution
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Oct 25, 2017
07:20 AM
Quick delete of previous installs file maked Permanent
In a previous install a file was marked as Permanent.
I would like to delete the file and put a new one in it's place during a full major update MSI installation.
I was thinking about creating a CA to do this, but was working where I'd place it or if there is another way.
Any suggestions?
Kevin
I would like to delete the file and put a new one in it's place during a full major update MSI installation.
I was thinking about creating a CA to do this, but was working where I'd place it or if there is another way.
Any suggestions?
Kevin
1 Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Oct 26, 2017
01:24 PM
ktbrownusa wrote:
In a previous install a file was marked as Permanent.
I would like to delete the file and put a new one in it's place during a full major update MSI installation.
I was thinking about creating a CA to do this, but was working where I'd place it or if there is another way.
Any suggestions?
Kevin
I created a CA that runs after Unpublish Features. This way the full uninstall has been completed if this is a major uninstall.
I put in the conditions REMOVE <> "ALL" so it doesn't run at the uninstall, just for the Install.
Sychronous
Immediate execution
Always Execute
Script as follows:
'This routine finds the permanent file and removes it by backing it up.
'Then the install will place the new file
Dim fso, FileConfig
FileConfig = "TheActualFileName"
DataDir = Session.Property("CommonAppDataFolder") & "Company\DataDirectory\"
On error resume next
Set fso = CreateObject("Scripting.FileSystemObject")
'If we haven't updated the the file to new one
'This is only for this move. If the back up exsits, we do not need to do it again
'MsgBox DataDir & FileConfig & "_Backup " & "|" & DataDir & FileConfig
If Not fso.FileExists (DataDir & FileConfig & "_Backup") then
fso.MoveFile DataDir & FileConfig, DataDir & FileConfig & "_Backup"
End If
