FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


VBS - PART 2 - Shell Control via VBS PART 2





gidevelop
Here is the part two of internet explorer shell control
The script below is good for start-up, you can run it whatever you want. if an user from a corporation screw up the proxy address conect remote to him and run this script.

Insert Proxy Script - IPS

Code:

Dim WshShell,oExec
Set WshShell = WScript.CreateObject ("WScript.SHell")

WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\" & "ProxyEnable",1,"REG_DWORD"
WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\" & "ProxyServer","www-proxy.domain.com:8080","REG_SZ"
WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\" & "ProxyOverride","localhost;127.0.0.1;<local>","REG_SZ"



USAGE

1] - Save this under insert_proxy.vbs
2] - Modify www-proxy.domain.com:8080 to match your requests

MOD 1 - Place it in startup
MOD 2 - Run it remote on client PC
MOD 3 - Place as a shortcut to IE. If you want this MOD add this 2 lines at the end of the code above
Code:
Wshshell.Run ("IEXPLORE.exe")
WScript.Quit 1
gidevelop
Here is a code that is removing the proxy with out need you to go to ie / internet opt's/ etc. etc

Code:


Set WshShell = WScript.CreateObject ("WScript.SHell")

WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\" & "ProxyEnable",0,"REG_DWORD"
WshShell.RegDelete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer"
WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\" & "ProxyOverride","<local>","REG_SZ"

WScript.echo "New status for  PROXY - REMOVED !"



If something goes wrong and the proxy is not responding you can run this little script to remove it

USAGE

1] - Save this under rem_proxy.vbs
2] - Just double click it and the proxy will be gone. No IE page must be open
AftershockVibe
Surely any IT infrastructure who uses a proxy is going to require you to use the proxy to access anything outside of the LAN? In which case, changing the proxy settings is rather pointless.
gidevelop
'ur right but there are a lot of dumb users that really like to stick their noses into places that they are not prepared to manipulate. Is more easy to run this small file then to adjust the settings manualy.
Related topics
Xbox 360 Projected To Outpace Playstation
How do you keep the CD-Drive from making too much noise.
Guy cures asthma and allergies by getting infested hookworm
How to change MX Record on FriHost?
WoW Forum RPG
CVS Repository?
VBS - PART 1 - Computer info
VBS - PART 2 - Shell Control via VBS
Ever heard of controlling air conditioners with cell phones?
VJs?????
China Earthquake
SAVE THE INTERNET -- Net Neutralty on the line
escapeshellcmd seems to blank my user input
Totally bizarre network issue
Reply to topic    Frihost Forum Index -> Computers -> Software

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.