Old 24th November 2011, 11:24   #1
Thyrador
Junior Member
 
Join Date: Mar 2011
Posts: 24
hosts file on x64 systems

hey there, me again.

is it even possible to manipulate/append some text into the hosts ($SYSDIR\drivers\etc\hosts) file?
even if i run the installer as admin (per runas admin) it wont append any text to it.


any idea how to run a program within/after installer/ing with administrator privileges so that the second installer/ the program easily can update the hosts-file?

thx for help
Thyrador is offline   Reply With Quote
Old 24th November 2011, 11:45   #2
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
This is one of the file that have special protection on modern Windows systems.

It's owned by a special "TrustedInstaller" user account, so only Windows own installer (and Windows updates) can modify that file.

And there is good reason for this

AFAIK you can take ownership of such files with some ACL trickery and then modify them.

But first of all: Why do you want to modify that file ???

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote
Old 24th November 2011, 14:47   #3
Thyrador
Junior Member
 
Join Date: Mar 2011
Posts: 24
it'll change if I start an editor with administrative privileges. such as notepad per runas admin.

thought it'll work the same with installer has elevated rights.

modification is important bcause it comes with some filter software (such as childprotection, etc)
Thyrador is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump