none
VBScript not working under system context RRS feed

  • Question

  • Hi, I've created a script for IE to set our company website as default homepage in the Start Menu. It works fine locally but doesn't work when pushed through Kace (distribution system that runs applicatins under sytem context). I'm running it on windows 7 and the path to the start menu is: C:\Users\Atifmir\AppData\Roaming\Microsoft\Windows\Start Menu\Programs.  Any help wouldbe greatly appreciated.

    Here's the Script:

    Set objshell = createobject("wscript.shell")
    strPath = objShell.SpecialFolders("StartMenu")

    strHomePage = "https://portal.nblenergy.com/portal/page?_pageid=58,1&_dad=portal&_schema=PORTAL"

    Set objShortcut = objShell.CreateShortcut(strPath & "\Programs\Internet Explorer.lnk")
    objShortcut.Save

    objshell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page", strHomePage
    objshell.RegWrite "HKLM\Software\Microsoft\Internet Explorer\Main\Start Page", strHomePage

    Tuesday, January 8, 2013 5:31 PM

Answers