0

My Windows 7 admin pushes out some proxy settings (e.g., a proxy.pac file available through http) to my computer every night that I don't want. I have modified this pac-file and stored it locally, on C:. Currently I have to replace the http URL to a file path every morning. Would it be possibe, maybe using the host-file, to redirect this http URL to a file path? Convincing my admin to stop changing my network settings is not gonna happen, hence I am looking for a workaround.

I am local admin on my machine.

d-b
  • 636
  • 1
  • 6
  • 24

1 Answers1

0

ould it be possibe, maybe using the host-file, to redirect this http URL to a file path?

No. The hosts file translates host-names into IP addresses. It does not do anything with file paths. (In fact it does very little, being designedin an era where computing resources were very limited).

Hence I am looking for a workaround.

Maybe we can help with that though. How does the new pac get pushed? What happens if you make the file you modified read-only? Or (ugly but likely working) how about replacing the pac with a copy from your userfolder by placing a batch-file in the startup folder?

Hennes
  • 64,768
  • 7
  • 111
  • 168
  • I don't know how it gets pushed. Probably with some group policy or similar. It is changed every morning when I login. My modified file is on C:, it is not affected by whatever method is used to change my LAN proxy settings so no real point in making it read only. How would a batch file in my startup folder help? Or do you assume I shut down my computer every day? Is there a "startup folder" that is run every time I login? That could be a solution. – d-b Dec 22 '15 at 11:17
  • Yes. I did assume that the computer got shut down daily. That seems to be the default at most firms were I worked. If it does not than. Maybe something with a file monitoring program? Keep looking at the pac file. If it changes execute the command to overwrite it? Feels like a kludge though. http://superuser.com/questions/468662/how-to-monitor-a-folder-for-changes-and-execute-a-command-if-it-does-on-window – Hennes Dec 22 '15 at 11:26
  • The pac file is not change, they change the path to the pac script in the LAN-settings. – d-b Dec 22 '15 at 13:55