SimpleSi Posted March 5, 2014 Posted March 5, 2014 Up in Lancs we've got to change all our proxy settings and I thought I just knock up a little batch file to do the job (I don't use AD or anything clever) so I did this yesterday REG DELETE "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /f REG DELETE "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /f REG DELETE "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /f and it worked fine on a w2k3 server and win7 laptop. So came to next school today - and it fails on XP with To many command-line parameters. Literal cut and past - To is spelt like that !! Google has got me no-where Anyone had this before and know the workaround? Simon PS Why is it the simple things that fail!!!!!!
andy_b Posted March 5, 2014 Posted March 5, 2014 Just tested it on xp and it seemed to work fine. Not having the quotes around the key will generate "To many command-line parameters", so might be worth double checking that. Alternatively can you import a .reg file with all the keys you no longer want set equal to -, e.g. Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings] "ProxyServer"=-
SimpleSi Posted March 5, 2014 Author Posted March 5, 2014 That code is cut and paste Did you try it inside a .bat file or just straight from command line it works for me from command line but not inside of a batch file. Thanks for alternative solution though Simon
andy_b Posted March 5, 2014 Posted March 5, 2014 Both command line and .bat file worked ok. No real idea why it wouldn't work, sorry Maybe try escaping the quotes with ^ to see if there is something strange going on with them.
Arthur Posted March 5, 2014 Posted March 5, 2014 This works for me on Windows 7... REG DELETE "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "AutoConfigURL" /f REG DELETE "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "ProxyServer" /f REG DELETE "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "ProxyEnable" /f
SimpleSi Posted March 5, 2014 Author Posted March 5, 2014 I just added the import to my wpkg packages and it works on both XP and Win7 64bit I could probably take the batch file bit out but I'm leaving it just in case id="noproxy" name="Set computer to No Proxy" revision="1" reboot="false" priority="100" notify="false" execute="always"> cmd='%COMSPEC% /C "%PACKAGES%\proxy\noproxy.bat"' /> cmd='%COMSPEC% /C REGEDIT.EXE /S "%PACKAGES%\proxy\noproxy.reg"' /> cmd='%COMSPEC% /C "%PACKAGES%\proxy\noproxy.bat"' /> cmd='%COMSPEC% /C REGEDIT.EXE /S "%PACKAGES%\proxy\noproxy.reg"' /> and noproxy.reg Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings] "ProxyEnable"=dword:00000000 "ProxyServer"=- "AutoConfigURL"=- Simon
Arthur Posted March 5, 2014 Posted March 5, 2014 FWIW, if you look at the WPKG page for Skype, you will see that you are missing the double quotes around the registry values. i.e.
SimpleSi Posted March 5, 2014 Author Posted March 5, 2014 (edited) Tried that in the batch file - no diff I could probably run the batch files lines like yoru example - may try that tomorrow But its a strange error Even the error message is an error Simon Edited March 5, 2014 by SimpleSi
SimpleSi Posted March 6, 2014 Author Posted March 6, 2014 decided at 2nd school to do it all via WPKG instead of batch script and it works fine id="noproxy" name="Set computer to No Proxy" revision="1" reboot="false" priority="100" notify="false" execute="always"> cmd='%COMSPEC% /C REG DELETE "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "AutoConfigURL" /f' /> cmd='%COMSPEC% /C REG DELETE "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "ProxyServer" /f' /> cmd='%COMSPEC% /C REG DELETE "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "ProxyEnable" /f' /> cmd='%COMSPEC% /C REG DELETE "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "AutoConfigURL" /f' /> cmd='%COMSPEC% /C REG DELETE "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "ProxyServer" /f' /> cmd='%COMSPEC% /C REG DELETE "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "ProxyEnable" /f' /> Still very strange with that 1st error - I think it is a genuine old bug that no-ones ever sorted Simon
SimpleSi Posted March 28, 2014 Author Posted March 28, 2014 Absolutley bloomin typical 1. This WPKG package isn't working in one of my schools (I just set it to run and didn't check as its worked flawlessly in 5 others!) 2. The school is running fine even without it!!!!! (so thankful for small mercies)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now