Need my MSI to overwrite a file, how to do this?
So, i'm working at a collega and i manage all the Windows systems with SCCM. Now we have a new version of Sketchup 2017, that comes along with a new license. This license is stored in a file called "Sketchup.lic".
Now, the issue is, when uninstalling the old version, this old license file Sketchup,lic stays in C:\ProgramData\SketchUp\SketchUp 2017. Then, when i deploy the new version, the old license file isn't overwritten by the new license file, which i added in Installshield in Files/Folders.
How do i make sure the old license key file is overwritten with the new one? This is really giving me a headache. Thanks alot of the help in advance!
Now, the issue is, when uninstalling the old version, this old license file Sketchup,lic stays in C:\ProgramData\SketchUp\SketchUp 2017. Then, when i deploy the new version, the old license file isn't overwritten by the new license file, which i added in Installshield in Files/Folders.
How do i make sure the old license key file is overwritten with the new one? This is really giving me a headache. Thanks alot of the help in advance!
0 Comments
[ + ] Show comments
Answers (8)
Please log in to answer
Posted by:
anonymous_9363
6 years ago
This will be because the .LIC file will be time-stamped with the current day's date and time, meaning that the file in the MSI is older. Thus, Windows Installer's rules for non-versioned files mean that it won't be overwritten.
Use the RemoveFile table.
Use the RemoveFile table.
PS.
You're adding the .LIC using a transform, right?
You're adding the .LIC using a transform, right?
Posted by:
rad33k
6 years ago
@Shrikant:
I always thought that non versioned files are only replaced when Created and Modified dates of the installed file are the same (no matter if file in the installer package is newer or older - I think that the purpose is to do not replace files modified during application run-time) as it is described here:
File Versioning Rules - Neither File Has a Version
File Versioning Rules - Neither File Has a Version with File Hash Check
FileF example here.
I always thought that non versioned files are only replaced when Created and Modified dates of the installed file are the same (no matter if file in the installer package is newer or older - I think that the purpose is to do not replace files modified during application run-time) as it is described here:
File Versioning Rules - Neither File Has a Version
File Versioning Rules - Neither File Has a Version with File Hash Check
FileF example here.
Posted by:
Shrikant
6 years ago
Posted by:
El Pollo Diablo
6 years ago
Posted by:
anonymous_9363
6 years ago
@Shrikant:
Non versioned file get overwritten only if thoes are newer (Date and time stamp) than the installed one...You know this (well, you've re-worded my response, at least) and yet you don't know how to condition a component?
Posted by:
alphabeta
6 years ago
Posted by:
anonymous_9363
6 years ago
Posted by:
nagendrasingh
6 years ago
I do understand that my method uses a script to do the work instead of a .msi. In my case the .msi stays the same and I don't want to edit it. So here it goes:
I work in a university as well and need to update these files on a yearly/half yearly basis.
With SCCM, you can create an application which would check for presence of a file say 2018QTR1.txt, 2018QTR2.txt etc.
If the file is missing, then
Stop the service/kill a program to etc to release the lock on .lic file etc
delete the licence file.
Copy a new licence file
Put a 2018QTR1.txt etc
Start the service etc
After three months, you can change the application definition to check for 2018QTR2.txt and so on.
I work in a university as well and need to update these files on a yearly/half yearly basis.
With SCCM, you can create an application which would check for presence of a file say 2018QTR1.txt, 2018QTR2.txt etc.
If the file is missing, then
Stop the service/kill a program to etc to release the lock on .lic file etc
delete the licence file.
Copy a new licence file
Put a 2018QTR1.txt etc
Start the service etc
After three months, you can change the application definition to check for 2018QTR2.txt and so on.