You are not logged in.
Pages: 1
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
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
Pages: 1