Avatar of DRRAM
DRRAM
 asked on

IE script .bat

An someone please tell me or make me a script .bat that will turn proxy on  for IE explorer in xp?

My proxy is "PROXY xx.xx.xx.xx:8080"
and exception xx.xx.*

Thanks
DHCPMicrosoft ApplicationsWindows XP

Avatar of undefined
Last Comment
DRRAM

8/22/2022 - Mon
Myth_Buster

You first need to create a reg file with the following content:

Regedit4
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"MigrateProxy"=dword:00000001
"ProxyEnable"=dword:00000001
"ProxyHttp1.1"=dword:00000000
"ProxyServer"="http://ProxyServerName:80"
"ProxyOverride"="<local>"

Replace the ProxyServerName above with the name or IP of your Proxy Server.
Also, A reg file is just a text file with a .reg extension.
Name the reg file anything you like with the .reg extension.
In your .bat script add the following line:
regedit /s regfile.reg

That line tells regedit to silently import the registry settings in the file specified.

Note: You will need to include the FULL path to the location of the .reg file.

Cheers
DRRAM

ASKER
Please can you check the two files (attached) and please is possible to make a single file instead of the two files

Thanks
ie.bat.txt
regfile.reg.txt
Myth_Buster

I edited the spaces out and attached.
Also, I noticed the full path you had to the regfile was D:\ (a local drive).
If you plan on copying the regfile to every computer that may be ok.
But if your .bat is in a network share, you should copy the regfile there also.
Then the path to the reg file would be \\computername\sharefolder\regfile.reg.

Is there a network server? If so, is it a domain controller?
If so, you could use policies for all this instead of the batch script.

Cheers


regfile.reg.txt
ie.bat.txt
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
DRRAM

ASKER
PLEASE So it's not possible to put them in the same file
Myth_Buster

LOL put this in your .bat file and forget about the regfile:

REG ADD HKLM\Software\HackersAreUs /f
REG ADD HKLM\Software\HackersAreUs /v MigrateProxy /t reg_dword /d 00000001 /f
REG ADD HKLM\Software\HackersAreUs /v ProxyEnable /t reg_dword /d 00000001 /f
REG ADD HKLM\Software\HackersAreUs /v ProxyHTTP1.1 /t reg_dword /d 00000000 /f
REG ADD HKLM\Software\HackersAreUs /v ProxyServer /t reg_multi_sz /d http://ProxyServer:80 /f
REG ADD HKLM\Software\HackersAreUs /v ProxyOverride /t reg_multi_sz /d 192.168.1.1,192.168.2.* /f

Cheers
Myth_Buster

Whoops... forgot to change the reg key paths...
Here ya go:

REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings /f
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings /v MigrateProxy /t reg_dword /d 00000001 /f
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings /v ProxyEnable /t reg_dword /d 00000001 /f
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings /v ProxyHTTP1.1 /t reg_dword /d 00000000 /f
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings /v ProxyServer /t reg_multi_sz /d http://ProxyServer:80 /f
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings /v ProxyOverride /t reg_multi_sz /d 192.168.1.1,192.168.2.* /f

Cheers
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
DRRAM

ASKER
Please when launching the file (attached) I have many errors I have attached the image.
Thank you

IE-F.bat.txt
script-erreur.bmp
Myth_Buster

Every "REG ADD" command is one line of...
I attached what it should look like.
Also, I noticed your kernel is in a nother language...
... There are specific times when you will need to convert the text from Eng to the language of your kernel.
I think this should work in english though...
ie.bat.txt
DRRAM

ASKER
Microsoft Windows XP [version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

U:\>"C:\Documents and Settings\EEEE\Bureau\ie.bat"

U:\>REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings /f


Erreur : too many command line parameters

U:\>REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings /v
MigrateProxy /t reg_dword /d 00000001 /f

Erreur : too many command line parameters

U:\>REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings /v
ProxyEnable /t reg_dword /d 00000001 /f

Erreur : too many command line parameters

U:\>REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings /v
ProxyHTTP1.1 /t reg_dword /d 00000000 /f

Erreur : too many command line parameters

U:\>REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings /v
ProxyServer /t reg_multi_sz /d http://ProxyServer:80 /f

Erreur : too many command line parameters

U:\>REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings /v
ProxyOverride /t reg_multi_sz /d 192.168.1.1,192.168.2.* /f

Erreur : too many command line parameters
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
johnb6767

Missing quotes..... "Internet Settings" has a space in it.....


REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /f
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v MigrateProxy /t reg_dword /d 00000001 /f
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t reg_dword /d 00000001 /f
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyHTTP1.1 /t reg_dword /d 00000000 /f
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /t reg_multi_sz /d http://ProxyServer:80 /f
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride /t reg_multi_sz /d 192.168.1.1,192.168.2.* /f
DRRAM

ASKER
PERFECT
THANK YOU VERY MUCH DOES IT APPLY TO FIREFOX PLEASE
Myth_Buster

ahah... forgot the quotes, sorry... also, no this does not work for firefox... firefox has its own config files located in the application data directory in each users profile
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
DRRAM

ASKER
please give me an example in your file how you forgot the quotes ?? for applied in firefox
Myth_Buster

i was referring to the quote johnb6767 pointed out above.

for firefox, you would need to edit the config file under a user profile and copy that config file to each workstation.
search for the config file. edit it as needed. save it and copy it to the .bat file directory.
then use the .bat file to copy it to each user directory when they login.
DRRAM

ASKER
please I have several config file Under a user profile you can specify where is this file

and other

Please how I can create a desktop shortcut of a file. bat that is on the network through Active Directory and which is activated at the start of the session
Thx
Your help has saved me hundreds of hours of internet surfing.
fblack61
Myth_Buster

I have answered the original question and will have to redirect you to another site posting  for the firefox settings as I do not have time to continue back and forth on this topic.

http://www.edugeek.net/forums/windows/11358-set-firefox-proxy-via-login-script.html

That should get you going.

Cheers
DRRAM

ASKER
Please you find attached an image corresponds to my request
1 - how can I uncheck in file .bat "use automatic configuration script" (image: point 6)
2 - How can I check in file .bat "Bypass proxy server for local addresses" (image: point 8)

Thank you very much for your help
IE-Net.png
ASKER CERTIFIED SOLUTION
DRRAM

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
DRRAM

ASKER
VERRY GOOD
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.