How to pin a website shortcut to the Startmenu in Windows7
Hi team,
I am tryinig to put a website shortcut to the pinned Startmenu.
I have written a script for the same.but it is not working..
I tried changing the extension from .url to .lnk..but I am getting the error " objFolderItem couldnot be found"
Windows7 will only take .exe shortcuts..?
I am tryinig to put a website shortcut to the pinned Startmenu.
I have written a script for the same.but it is not working..
Set oShell = CreateObject("WScript.shell")
Set sh = WScript.CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
sFullPath = fso.GetParentFolderName(WScript.ScriptFullName) & "\NL-Banking Universe.url"
target = "C:\ProgramData\Microsoft\Windows\Caches\"
fso.CopyFile sFullPath, target
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\ProgramData\Microsoft\Windows\Caches")
Set objFolderItem = objFolder.ParseName("NL-Banking Universe.url")
Set colVerbs = objFolderItem.Verbs
'objFolderItem.InvokeVerb("P&in to Start Menu") 'Tried this command, but not working"
For Each objVerb In colVerbs
If Replace(objVerb.name, "&", "") = "Pin to Start Menu" Then objVerb.DoIt
Next
I tried changing the extension from .url to .lnk..but I am getting the error " objFolderItem couldnot be found"
Windows7 will only take .exe shortcuts..?
0 Comments
[ + ] Show comments
Answers (4)
Please log in to answer
Posted by:
mahendraKumar
12 years ago
when you right click the file you will come to know whether we can Pin the file to taskbar or not.
URL shortcut does not supports it as far i checked ... sorry if am wrong...
I have tried your script for lnk shortcut.
the error in your script was
If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt - "Pin to Taskbar" not "Pin to Start Menu" - Case Sensitive
this key word can vary depending on OS.
For WIn 7 - Pin to Taskbar
For Vista -Pin to Start Menu
so you can right click and check what is the option to pin to taskbar.
URL shortcut does not supports it as far i checked ... sorry if am wrong...
I have tried your script for lnk shortcut.
the error in your script was
If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt - "Pin to Taskbar" not "Pin to Start Menu" - Case Sensitive
this key word can vary depending on OS.
For WIn 7 - Pin to Taskbar
For Vista -Pin to Start Menu
so you can right click and check what is the option to pin to taskbar.
Posted by:
anphi
12 years ago
Hi Mahendra,
Even in the Windows7 that script worked earlier...but it was a shortcut for an exe file..
When I informed the client the same..he sent a screenshot back, in which the website shortcut was pinned to his start menu..:)
[:D]
I tried with the Pin to Taskbar...but the same result....
Even in the Windows7 that script worked earlier...but it was a shortcut for an exe file..
When I informed the client the same..he sent a screenshot back, in which the website shortcut was pinned to his start menu..:)
[:D]
I tried with the Pin to Taskbar...but the same result....
shortcut does not supports it as far i checked ... sorry if am wrong...
I have
Posted by:
pjgeutjens
12 years ago
How about making a shortcut to iexplore.exe and adding the target website as a parameter, like
"C:\Program Files\Internet Explorer\iexplore.exe" www.appdeploy.com
not browser independent, but you can pin this to the taskbar. I suppose you could even look to see what the default browser is in
HKEY_LOCAL_MACHINE\Software\Clients\StartMenuInternet\ and set the shortcut accordingly.
PJ
"C:\Program Files\Internet Explorer\iexplore.exe" www.appdeploy.com
not browser independent, but you can pin this to the taskbar. I suppose you could even look to see what the default browser is in
HKEY_LOCAL_MACHINE\Software\Clients\StartMenuInternet\ and set the shortcut accordingly.
PJ
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.