You are not logged in.

#1 23 May 2016 06:37

xiro
New Member
Registered: 23 May 2016
Posts: 1

Psexec+ Host file

How to edit the host file from another computer using psexec?

I have tried C:\Windows\System32\drivers\etc>notepad hosts

the command notepad but it doesn open the hosts file from another computer to be edit any idea how to do this?

Offline

#2 23 May 2016 09:56

bluesxman
Member
From: UK
Registered: 29 Dec 2006
Posts: 1,129

Re: Psexec+ Host file

psexec is not the appropriate tool for that.

You can just edit over the UNC path (assuming file sharing restrictions permit it).  From your computer:

net use /user:SOMEACCOUNT \\OTHERCOMPUTER
notepad \\OTHERCOMPUTER\c$\windows\system32\drivers\etc\hosts

First command shouldn't be necessary if the credentials you are logged in with are valid at the remote -- e.g. on a domain.

Last edited by bluesxman (23 May 2016 09:57)


cmd | *sh | ruby | chef

Offline

Board footer

Powered by