Hi,
I am trying to create a shortcut in the 'Start' tile list of Windows 8.1 through advanced installer. I have added the shortcut to 'Start Menu' and 'Start Menu> Programs' under 'Files,Folders and Shortcut' tab. After installation of the setup, the shortcuts are created under the "C:\ProgramData\Microsoft\Windows\Start Menu\Programs" and to the 'Apps' list of Win8.1. But the shortcut is not created to the 'Start' tile list. I tried to pin the shortcut using vbscript, but that also fails.
Here are some sample scripts I used:
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace("C:\ProgramData\Microsoft\Windows\Start Menu\Programs")
Set objFolderItem = objFolder.ParseName("Ammy's shorty.lnk")
objFolderItem.InvokeVerb("P&in to Start")
and also:
Set sa = CreateObject("Shell.Application")
Set objFolder = sa.NameSpace("C:\ProgramData\Microsoft\Windows\Start Menu\Programs\")
'Set lnk = fldr.ParseName("Ammy's shorty.lnk")
Set objFolderItem = objFolder.ParseName("Ammy's shorty.lnk")
Set colVerbs = objFolderItem.Verbs
For Each objVerb in colVerbs
Wscript.Echo objVerb
If objVerb.Name = "Pin to Start" Then
objVerb.DoIt()
msgbox("Success")
end if
Next
and also:
Set sa = CreateObject("Shell.Application")
Set fldr = sa.NameSpace("C:\ProgramData\Microsoft\Windows\Start Menu\Programs")
Set lnk = fldr.ParseName("Ammy's shorty.lnk")
For Each verb In lnk.Verbs
If verb.Name = "Pin to Start" Then
verb.DoIt()
end if
Next
msgbox("Success")
Could anyone please help me out.
FOLLOW US
Get the latest news in Application Packaging