Hi all,
I'm not very good with vbs, and I found a script that will work for me.. It checks to see if a registry setting is set if not it writes in the values needed. But I need to do this in different areas within the registry. Is there an easier way to write this in one script instead of having 5 separate vbs files.. Basically I need this script to change the default IE setting in 5 different places within the registry...
Sub AWASetIE_HKCU_Start()
' Test and set IE to standard
Set WshShell = Wscript.CreateObject("Wscript.Shell"
If Not WshShell.RegRead("HKCU\Software\Microsoft\Internet Explorer\Main\Start Page"
=" then
WSHShell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page","End If
End Sub
Call AWASetIE_HKCU_Start()
Sub AWASetIE_HKU_Start()
Set WshShell = Wscript.CreateObject("Wscript.Shell"
If Not Wshshell.RegRead("HKU\.DEFAULT\Software\Microsoft\Internet Explorer\Main\Start Page"
=" then
WSHShell.RegWrite "HKU\.DEFAULT\Software\Microsoft\Internet Explorer\Main\Start Page","End If
End Sub
Call AWASetIE_HKU_Start()
Sub AWASetIE_HKU_Default()
Set WshShell = Wscript.CreateObject("Wscript.Shell"
If Not Wshshell.RegRead("HKU\.DEFAULT\Software\Microsoft\Internet Explorer\Main\Default_Page_URL"
=" then
WSHShell.RegWrite "HKU\.DEFAULT\Software\Microsoft\Internet Explorer\Main\Default_Page_URL","End If
End Sub
Call AWASetIE_HKU_Default()
Sub AWASetIE_HKLM_Start()
Set WshShell = Wscript.CreateObject("Wscript.Shell"
If Not Wshshell.RegRead("HKLM\Software\Microsoft\Internet Explorer\Main\Start Page"
=" then
WSHShell.RegWrite "HKLM\Software\Microsoft\Internet Explorer\Main\Start Page","End If
End Sub
Call AWASetIE_HKLM_Start()
Sub AWASetIE_HKLM_Default()
Set WshShell = Wscript.CreateObject("Wscript.Shell"
If Not Wshshell.RegRead("HKLM\Software\Microsoft\Internet Explorer\Main\Default_Page_URL"
=" then
WSHShell.RegWrite "HKLM\Software\Microsoft\Internet Explorer\Main\Default_Page_URL","End If
End Sub
Call AWASetIE_HKLM_Default()
I'm not very good with vbs, and I found a script that will work for me.. It checks to see if a registry setting is set if not it writes in the values needed. But I need to do this in different areas within the registry. Is there an easier way to write this in one script instead of having 5 separate vbs files.. Basically I need this script to change the default IE setting in 5 different places within the registry...
Sub AWASetIE_HKCU_Start()
' Test and set IE to standard
Set WshShell = Wscript.CreateObject("Wscript.Shell"
If Not WshShell.RegRead("HKCU\Software\Microsoft\Internet Explorer\Main\Start Page"
WSHShell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page","End If
End Sub
Call AWASetIE_HKCU_Start()
Sub AWASetIE_HKU_Start()
Set WshShell = Wscript.CreateObject("Wscript.Shell"
If Not Wshshell.RegRead("HKU\.DEFAULT\Software\Microsoft\Internet Explorer\Main\Start Page"
WSHShell.RegWrite "HKU\.DEFAULT\Software\Microsoft\Internet Explorer\Main\Start Page","End If
End Sub
Call AWASetIE_HKU_Start()
Sub AWASetIE_HKU_Default()
Set WshShell = Wscript.CreateObject("Wscript.Shell"
If Not Wshshell.RegRead("HKU\.DEFAULT\Software\Microsoft\Internet Explorer\Main\Default_Page_URL"
WSHShell.RegWrite "HKU\.DEFAULT\Software\Microsoft\Internet Explorer\Main\Default_Page_URL","End If
End Sub
Call AWASetIE_HKU_Default()
Sub AWASetIE_HKLM_Start()
Set WshShell = Wscript.CreateObject("Wscript.Shell"
If Not Wshshell.RegRead("HKLM\Software\Microsoft\Internet Explorer\Main\Start Page"
WSHShell.RegWrite "HKLM\Software\Microsoft\Internet Explorer\Main\Start Page","End If
End Sub
Call AWASetIE_HKLM_Start()
Sub AWASetIE_HKLM_Default()
Set WshShell = Wscript.CreateObject("Wscript.Shell"
If Not Wshshell.RegRead("HKLM\Software\Microsoft\Internet Explorer\Main\Default_Page_URL"
WSHShell.RegWrite "HKLM\Software\Microsoft\Internet Explorer\Main\Default_Page_URL","End If
End Sub
Call AWASetIE_HKLM_Default()