/build/static/layout/Breadcrumb_cap_w.png

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!


0 Comments   [ + ] Show comments

Answers (8)

Posted by: anonymous_9363 6 years ago
Red Belt
1
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.

PS.
You're adding the .LIC using a transform, right?
Posted by: rad33k 6 years ago
Fourth Degree Brown Belt
1
@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.
Posted by: Shrikant 6 years ago
White Belt
0
Non versioned file get overwritten only if thoes are newer (Date and time stamp) than the installed one...
Posted by: El Pollo Diablo 6 years ago
White Belt
0
It worked with RemoveFile in Installshield (Direct Editor)! I'm so happy, you have no idea ;-) Thanks!
Posted by: anonymous_9363 6 years ago
Red Belt
0
@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
Black Belt
0
If you have the MSI installed by Group Policy you can have the .LIC go out to replace the current .LIC file.
Posted by: anonymous_9363 6 years ago
Red Belt
0
@alphabeta: I'm intrigued to know how you think deploying the MSI by GP would make any difference to the way that the Windows Installer engine handles a non-versioned file. Please share.
Posted by: nagendrasingh 6 years ago
Black Belt
0
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.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ