Remotely change IE8 Homepage

Home Forums Scripting Windows Script Host Remotely change IE8 Homepage

This topic contains 4 replies, has 4 voices, and was last updated by Avatar zainulpatel 6 years, 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • Avatar
    GTTDi
    Member
    #160839

    Hi everyone, i was wondering if it possible to remotely change the IE8 homepage of a Windows 7 PC for all users who would login to it.

    What i got so far is

    Quote:
    Dim objShell, RegLocate
    ‘ Create Variable to store inputted PC name
    Dim PcNameInput

    PcNameInput = InputBox(“What is the full PC name that you wish to change the IE Homepage of”)

    On Error Resume Next

    ‘This is the registry path to home page of internet explorer 8 running Windows 7
    RegLocate = ”HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMainStart Page”
    ‘ Write to reg key
    objShell.RegWrite RegLocate,”websitename”,”REG_SZ”
    ‘Display this window when script is run
    WScript.Echo ”Done, the homepage is now set to websitename”
    Quit the script
    WScript.Quit ’

    I’m not sure how i get to connect to the reg of the inputted PC name now.

    Any help would be appreciated.

    Avatar
    joeqwerty
    Moderator
    #303969

    Re: Remotely change IE8 Homepage

    If the Windows 7 computer is joined to an Active Directory domain you can set the home page via Group Policy.

    Avatar
    zainulpatel
    Member
    #387641

    Re: Remotely change IE8 Homepage

    I would like to do it with VBScript if possible ;)

    Avatar
    zainulpatel
    Member
    #387642

    Re: Remotely change IE8 Homepage

    Ok, so i have done more research and am getting closer to what i want but i get an error on line 13 of the script:
    objRegistry.SetStringValue HKEY_CURRENT_USER, strKeyPath, strValueName, strValue[/CODE]Not sure what the problem is with it, so any help appreciated.

    Thanks.

    Here is the latest version:

    [QUOTE]Const HKEY_CURRENT_USER = &H80000001

    Dim objRegistry, ComputerName, strKeyPath, strValueName, strValue

    ComputerName = InputBox(“What is the PC name that you wish to change the IE Homepage of”)

    Set objRegistry = GetObject(“winmgmts:\” & ComputerName & “rootdefault:StdRegProv”)

    strKeyPath = “SoftwareMicrosoftInternet ExplorerMain”
    strValueName = “Start Page”
    strValue = “WebSiteAddress”

    objRegistry.SetStringValue HKEY_CURRENT_USER, strKeyPath, strValueName, strValue

    ‘Display this window when script is run
    WScript.Echo “Done, the homepage is now set to ” & strValue

    ‘Quit the script
    WScript.Quit [/QUOTE][CODE]objRegistry.SetStringValue HKEY_CURRENT_USER, strKeyPath, strValueName, strValue[/CODE]Not sure what the problem is with it, so any help appreciated.

    Thanks.

    Here is the latest version:

    Quote:
    Const HKEY_CURRENT_USER = &H80000001

    Dim objRegistry, ComputerName, strKeyPath, strValueName, strValue

    ComputerName = InputBox(“What is the PC name that you wish to change the IE Homepage of”)

    Set objRegistry = GetObject(“winmgmts:\” & ComputerName & “rootdefault:StdRegProv”)

    strKeyPath = “SoftwareMicrosoftInternet ExplorerMain”
    strValueName = “Start Page”
    strValue = “WebSiteAddress”

    objRegistry.SetStringValue HKEY_CURRENT_USER, strKeyPath, strValueName, strValue

    ‘Display this window when script is run
    WScript.Echo “Done, the homepage is now set to ” & strValue

    ‘Quit the script
    WScript.Quit

    Avatar
    Dumber
    Participant
    #202055

    Re: Remotely change IE8 Homepage

    It was nice if you posted the source of your script:
    http://www.codeproject.com/Articles/20292/How-to-change-the-home-page-of-Internet-Explorer-u

    Why not using GPO or running the script as logon script?

    If you persist on using the current method, change to HKey Users instead of Hkey Current user.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.