This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Windows\System32\drivers\etc\services how to manipulate ?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 18, 2009
03:56 AM
Windows\System32\drivers\etc\services how to manipulate ?
Hello,
i have a very old Installer, wich i have to redesign.
This old Installation manipulates the file
C:\Windows\System32\drivers\etc\services
I have to add three lines if they don't exists.
Is it possible to do this with IS2009 and vista ????
(How? Where ?)
e.g.:
i have a very old Installer, wich i have to redesign.
This old Installation manipulates the file
C:\Windows\System32\drivers\etc\services
I have to add three lines if they don't exists.
Is it possible to do this with IS2009 and vista ????
(How? Where ?)
e.g.:
# Copyright (c) 1993-2004 Microsoft Corp.
#
# This file contains port numbers for well-known services defined by IANA
#
# Format:
#
# / [aliases...] [#]<BR />#<BR />systat 11/tcp users #Active users<BR />systat 11/udp users #Active users<BR /></div></div></div>
#
# This file contains port numbers for well-known services defined by IANA
#
# Format:
#
#
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 21, 2009
04:05 AM
We also have an installer to append a line into ...\drivers\etc\services, and it works fine on Vista with UAC turned on. Our installer only runs with admin privilege BTW.
We used the InstallScript to open the file in append mode ( OpenFileMode(FILE_MODE_APPEND) ) and then use WriteLine to add the content.
We used the InstallScript to open the file in append mode ( OpenFileMode(FILE_MODE_APPEND) ) and then use WriteLine to add the content.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 21, 2009
05:53 AM
Hello Henry
i tried the following code, but it fails to open the file.
I am using a Basic MSI Installation
Andreas
----------------------------------------------
strDirectory = WINSYSDIR^"Drivers"^"etc";
strFile = "Services";
OpenFileMode(FILE_MODE_APPEND);
// OpenFileMode(FILE_MODE_BINARY);
// Try to Open the File
if( OpenFile(nvFileHandle,strDirectory,strFile) < 0 ) then
MessageBox ("OpenFile failed.", SEVERE);
return -1;
endif;
i tried the following code, but it fails to open the file.
I am using a Basic MSI Installation
Andreas
----------------------------------------------
strDirectory = WINSYSDIR^"Drivers"^"etc";
strFile = "Services";
OpenFileMode(FILE_MODE_APPEND);
// OpenFileMode(FILE_MODE_BINARY);
// Try to Open the File
if( OpenFile(nvFileHandle,strDirectory,strFile) < 0 ) then
MessageBox ("OpenFile failed.", SEVERE);
return -1;
endif;
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 22, 2009
01:44 AM
Are there any switches, start conditions etc. so the code above would work ?
Or anything else so i can write into the 'service' file ?
Andreas
Or anything else so i can write into the 'service' file ?
Andreas
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 22, 2009
05:47 AM
when executing the CA with In-Script Execution: '... System Context' he can write into the file 'services' 🙂
But ...
The Installer doesn't know any Properties anymore ...
(Global variables the same)
So i wrote all Properties in an ini File in FOLDER_TEMP ...
and read them within the CA ...
It works ...
Don't know if there is a better solution.
Andreas
But ...
The Installer doesn't know any Properties anymore ...
(Global variables the same)
So i wrote all Properties in an ini File in FOLDER_TEMP ...
and read them within the CA ...
It works ...
Don't know if there is a better solution.
Andreas