|
-
Dec 28th, 2018, 09:28 AM
#1
Thread Starter
Member
[RESOLVED] StartMenu Shortcuts not Appearing from API
Hi there,
Have this code run through Win 10 (1809):
Code:
StartMenuPath = GetSpecialFolder(CSIDL_STARTMENU)
StartMenuPath = StartMenuPath & "Programs\MyApp\"
fCreateShellLink StartMenuPath & Mid(currentdirectory, ct1 + 1, dirlen - ct1) & ".lnk", App.Path & "\MyApp.exe", currentdirectory, App.Path & "\MyApp.exe", indexoficon, startupmode
The lnk files are created beautifully by the API in the target MyApp subdirectory of StartMenuPath. They don't appear in the LH StartMenu popup, however. Manually created lnks do. Compared the properties of the manual lnks and the script created ones. No difference except the script created ones have text in the comment section.
Something about the way this function is called makes TileDataLayer ignore programmatic changes to the Start Menu folder.
Suspect TileDataLayer relies on Windows Indexing, unless edits are made to the folder via the shell.
If that's the case, then it's a wait for the index to update, unless someone has a super "Index_This_Folder_Now" script handy. 
This PS script also looks interesting, especially for those who like killing explorer- but it won't hurry the indexing!
Edit: But that can't be it, as made a copy of one of the program created links in the Start Menu folder, via the explorer interface. No TileDataLayer update! Copy/pasting any other link in that folder, it works. So there must be something wrong with the lnk file itself then.
It also might be the shell now ignores CSIDL_STARTMENU and looks for the FOLDERID_StartMenu GUID -although there's no indication from MS the CSIDL will fail. If that's the case, then it must be done with another API- any suggestions?
Thanks for reading!
Last edited by lmstearn; Dec 29th, 2018 at 09:43 PM.
Reason: More info
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|