adding a line to ...drivers/etc/services using group policies

  • Thread starter Stefan Sczekalla-Waldschmidt
  • Start date
S

Stefan Sczekalla-Waldschmidt

Hi

we are using group-policies to deploy software to certain computers.

A package we are going to make needs an updated Lin in
....drivers/etc/services.

Any Idea how I can "patch" this file to add a certain line ?

Kind Regards,

Stefan
 
M

Mark Heitbrink [MVP]

Hi,
we are using group-policies to deploy software to certain computers.
A package we are going to make needs an updated Lin in
....drivers/etc/services.
Any Idea how I can "patch" this file to add a certain line ?

Deploy it with a selfmade MSI or just edit it with a computer
startup script.

echo "name port/proto shortname #info" >>
%systemroot\system32\drivers\etc\services

But to be honest, who needs this file? It´s just information ...

Mark
 
S

Stefan Sczekalla-Waldschmidt

Hello Mark,

I already had seen several pices of software using etc/services to gahter
which "Ports" to use.

well and due to having several pices of software changing thouse files
I can't simply deploy a "ready"-made file - I really need to change an
existing.

One idea I developed ist to deploy a "change the f*ing file batch" and
run this batch by modifying the "runonce" reg key ...

Kind regards

Stefan
 
M

Mark Heitbrink [MVP]

Hi,
I already had seen several pices of software using etc/services to gahter
which "Ports" to use.

Really? I´m shocked. My file is never edited and from 2001(?) I guess.
well and due to having several pices of software changing thouse files
I can't simply deploy a "ready"-made file - I really need to change an
existing.

Do it with the "echo >>services" but I don´t know, what happens if the
line already exists. You can filter it with "find" and then skip the
action, if you find the entry. Like:

Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top