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

  • Thread starter Thread starter Stefan Sczekalla-Waldschmidt
  • Start date 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
 
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
 
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
 
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
 
Back
Top