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
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
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
Answered 03/29/2006 by: jonasm
Blue Belt

Please log in to comment
0
tnx jonas. one question, how come the original application replaces the services file but the msi does not though the file exist in the msi.

Giz
Answered 03/29/2006 by: gizmolala
Third Degree Blue Belt

Please log in to comment
0
First of all, you don't want to replace the SERVICES file as you could be overwriting important information. You should really have a custom action that appends the neccessary text to the end of the file. And then on uninstall, it removes the added lines.
Answered 03/29/2006 by: brenthunter2005
Fifth Degree Brown Belt

Please log in to comment
0
Tnx. It works well on XP but not on Win2000. On Win2000, the services file is not replaced but on XP it renames the original to .bk and then places the other file there.
Just finding a way to resolve this issue with Win2000

Giz
Answered 03/29/2006 by: gizmolala
Third Degree Blue Belt

Please log in to comment
0
I agree with Mr Hunter

Is the original application an msi. If not then it wont follow the file versioning rules and is set to always overwrite, which is dodgy
Answered 03/29/2006 by: timmsie
Fourth Degree Brown Belt

Please log in to comment
0
The app is actually SAPGUI 6.2. Does not come with any msi. I did setupcapture b4 and after. my resulting msi renames the original services file to services.bk in Win XP but does not do the same in Win2000.

Giz
Answered 03/29/2006 by: gizmolala
Third Degree Blue Belt

Please log in to comment
0
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
Answered 03/29/2006 by: jonasm
Blue Belt

Please log in to comment
0
I really appreciate Jonas.

Giz
Answered 03/29/2006 by: gizmolala
Third Degree Blue Belt

Please log in to comment
Answer this question or Comment on this question for clarity