Netsh winhttp HTA??

Batch, ASP, JScript, Kixtart, etc.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 10 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
estradacme

Netsh winhttp HTA??

Post by estradacme »

I'm in the middle of migrating a global location to our new proxy servers. I have no access to group policy ( dont ask) so I figure I can create an HTA script for my helpdesk team so they can work on problematic machines when we go live.
Can someone guide me on creating the following for an HTA using “netsh winhttp set proxy XXXXXX” windows command???
There are 7 locations globally each running a different proxy server -

1. I need a way to connect to machines with any problems
a. Have a button where my helpdesk can select the appropriate proxy server and automate the install
b. so I need the ability to have a drop- down list or similar so the helpdesk can select the appropriate proxy servers and push this to the machine in question
2. Need a way to write to a log of what was modified once the change occurs

Full command:
netsh winhttp set proxy proxy-server="http=myproxy;https=myproxy:88" bypass-list="*.somesites.com"
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Netsh winhttp HTA??

Post by jvierra »

Can you post your HTA?

I don't think I understand what you mean. You cannot execute 'netsh' commads in an HTA so you need to give us your script and more infomation about what is not working or what errors you are getting.
User avatar
galaara98
Posts: 10
Last visit: Tue Nov 08, 2016 10:59 am

Re: Netsh winhttp HTA??

Post by galaara98 »

Is your Proxy needed to reach internal http resources.

Basically can you have your end users come to a webpage that helps them, instead of your Support staff instigating the change.

the simplest solution is a web page that says Start -> Run -> paste this text -> click Ok

The other thing you can do is write a script that runs on login (or whatever) that sets it. (not sure if you have access to deploy files to your workstations)

The other thing is technically netsh is a tool that manipulates the registry, you can use any number of registry manipulation strategies to do the equivalent (a simple .reg file would work) If you did want to look at it from a registry perspective: I believe the area you are interested in is HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections [WinHttpSettings]
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Netsh winhttp HTA??

Post by jvierra »

The method at hand will not work on earlier system.


Group Policy is the only rational approach to corporate rules.

NETSH works on newer systems but requires access to an admin session. WMI is great fro remoteing this. PowerShell is even better.

THis question came up frequently last year but quickly was abandoned when the help desk found out that the browser would auto-set if it was configured correctly.
This topic is 10 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked