cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

windows services file entries

CChong
By Level 11 Flexeran
Level 11 Flexeran
The SAP front end client 6.20 appends 100 entries to the end of the services file c:\winnt\system32\drivers\etc\services. The basic installshield package only captures the end product of this process. It captures the service file with the new entries already appended and compiles that file. This file overrights the original services file during install and you loose any service entries made by other existing applications.

Is there and easy fix to this other than switching to a script based install?
(5) Replies
The common practice is to have a custom action, running a small script, to update services file with required changes.
hendricksc,

I've successfully repackaged SAP 6.2C2. Here is a quick script that I use to append our SAP related stuff to the services file. I also included one that I run that removes all SAP related stuff from the services file upon an uninstall of the product, it also creates a backup of the working services file just in case something goes wrong.

The SAP_Services_File_Edit.vbs needs an install condition of :
" Not Installed " - This configures it so that it only runs this custom action on the first initial install of your .msi.

The " Install Exec Sequence " should be " After InstallInitialize ".

The ServicesFileCleanup.vbs needs an install condition of :
" &SAPGUINewFeature = 2 " - SAPGUINewFeature is whatever you called your feature.

The " Install Exec Sequence " should be " After " SAP_Services_File_Edit ".

" Return Processing " should be " Synchronous (Ignores Exit Code) for both custom actions.

" In-Script Execution " should be " Deferred Execution in System Context ".

You will of course need to create components for these files.

Let me know if you have problems...

Bryan
CChong
By Level 11 Flexeran
Level 11 Flexeran
I'll give it a try and let you know how it works out.
CChong
By Level 11 Flexeran
Level 11 Flexeran
I append our CA, the advantage is that entries to services file are done only once even if the vbs is called more than once. May be you give it a try or use it as template for your own CA.

Greetz, Heiko
CChong
By Level 11 Flexeran
Level 11 Flexeran
Thanks to all that helped me with this issue. Your input has helped me meet a difficult time line and you have all given me a crash refresher coarse in VB scripting.