FILE REPLACEMENT
Am working on an app that replaces SERVICES file in WINDOWS\SYSTEM32\DRIVER\ETC.
The original app replaces the service file but the resulting msi does not. I've checked my msi and the services file is there but it does not replace the one on destination computer after installation.
Pls help
Giz
The original app replaces the service file but the resulting msi does not. I've checked my msi and the services file is there but it does not replace the one on destination computer after installation.
Pls help
Giz
0 Comments
[ + ] Show comments
Answers (8)
Please log in to answer
Posted by:
jonasm
18 years ago
Hi!
The file gets replaces "in following order":
1. The new file has a higher version number
2. If the new file as a version number, but the old files does not.
3. If the files has different languages, the one that has the ProductLanguage Propery value will be installed.
4. If the files that don't have version numbers at all, the file with the newest date will be installed.
In InstallShield there is a setting to "always overwrite" on the file. I have not used it myself tho.
I hope this helps.
/Jonas
The file gets replaces "in following order":
1. The new file has a higher version number
2. If the new file as a version number, but the old files does not.
3. If the files has different languages, the one that has the ProductLanguage Propery value will be installed.
4. If the files that don't have version numbers at all, the file with the newest date will be installed.
In InstallShield there is a setting to "always overwrite" on the file. I have not used it myself tho.
I hope this helps.
/Jonas
Posted by:
gizmolala
18 years ago
Posted by:
brenthunter2005
18 years ago
Posted by:
gizmolala
18 years ago
Posted by:
timmsie
18 years ago
Posted by:
gizmolala
18 years ago
Posted by:
jonasm
18 years ago
Maybe the file you have captured has the same date och version as the one already existing??
I would also recommend you to append the information to your file.
You can use this VBS to append the information, but you have to figure out the other yourself. =)
/Jonas
------------------
On Error Resume Next
Set shell = WScript.CreateObject("WScript.Shell")
Set FSO = WScript.CreateObject("Scripting.FileSystemObject")
'Settings for the paths
WindowsSystemServiceFolder = "C:\WINDOWS\system32\drivers\etc\"
FileToOpen = "services"
'Open files-values
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8
Set File = fso.OpenTextFile(WindowsSystemServiceFolder + FileToOpen, ForAppending)
File.WriteLine "Service 1 1111/tcp #Service number 1"
File.WriteLine "Service 2 2222/tcp #Service number 2"
File.WriteLine "And so on..."
File.Close
WScript.Quit
I would also recommend you to append the information to your file.
You can use this VBS to append the information, but you have to figure out the other yourself. =)
/Jonas
------------------
On Error Resume Next
Set shell = WScript.CreateObject("WScript.Shell")
Set FSO = WScript.CreateObject("Scripting.FileSystemObject")
'Settings for the paths
WindowsSystemServiceFolder = "C:\WINDOWS\system32\drivers\etc\"
FileToOpen = "services"
'Open files-values
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8
Set File = fso.OpenTextFile(WindowsSystemServiceFolder + FileToOpen, ForAppending)
File.WriteLine "Service 1 1111/tcp #Service number 1"
File.WriteLine "Service 2 2222/tcp #Service number 2"
File.WriteLine "And so on..."
File.Close
WScript.Quit
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.