Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove Shortcuts - Windows Start Menu - Windows 10

Status
Not open for further replies.

TollaFTW

Technical User
Jan 23, 2020
1
0
0
US
Hello,

I'm trying to figure out a VBScript to remove Internet Explorer from our start menu's on Windows 10.
Basically, the start menu is shut down pretty tight via GPO, but something has happened and now only "internet explorer" for whatever reason is now the only thing pinned to start.

I was hoping to throw a VBScript in the startup to by-pass this.

I am completely new to scripting so - sorry in advance for the ignorance...

Here is what I've pulled together...and it's probably pretty rough..

I am receiving an "Object required: 'objectFold' error.

Any help would be greatly appreciated!


#################################

Dim strFolder, strExecutable

strFolder = "C:\Users\%userprofile%\"
strExecutable = "internet explorer.lnk"

Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(strFolder)
Set objFolderItem = objFolder.ParseName(strExecutable)

'Collect Applications verbs
Set colVerbs = objFolderItem.Verbs

'Loop through the verbs and if UNPIN is found then 'DoIt' (execute)
blnOptionFound = False
For Each objVerb In colVerbs
If Replace(objVerb.name, "&", "") = "Unpin from Start" Then
objVerb.DoIt
blnOptionFound = True
WScript.Echo "The application '" & strExecutable & "' was just Unpinned from the Start Menu."
End If
Next

if blnOptionFound = false then
WScript.Echo "The application '" & strExecutable & "' failed to be unpinned from the Start Menu (may not be present)."
end if
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top