Closed RunkelTh closed 4 years ago
Seems that I've been to optimistic regarding my changes... I think I've to rethink that solution. Seems that it is indeeed necessary that the link is somewhere within the startmenu
I think there are two workarounds for restricted environments:
In all cases, restricted users must have at least read access to the start menu shortcut.
I think there are two workarounds for restricted environments:
1. Create the start menu shortcut via an installer that also sets the app id property. 2. Manually create the shortcut for all users and one-time start the program and its wintoast initializer as administrator. This should update the properties of the shortcut, so on later program starts no properties must be changed.
In all cases, restricted users must have at least read access to the start menu shortcut.
Hi Christin, thx for your fast reply. Adjusting our installer is what I'll check next. But I still see 2 problems, that could be solved using a customShellLinkPath:
%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\<PROGRAME_SUITE>\\<PROGRAM>\\PROGRAM.lnk
.
In that case I'll get duplicate links within my Startmenu because wintoastlib doesn't check subfolders%APPDATA%\Microsoft\Windows\Start Menu\Programs\
and forces us to use %AllUsersProfile%
Kind regard, Thomas
I think WinToast should check all lnk files in all directories inside the start menu folder of the current user and the all user's folder because IIRC both directories are merged into the displayed start menu of the current user.
Of course a custom path would be a nice extension, but is a normal user in a restricted environment permitted to write into the all users profile? I think they should only be able to write into their appdata?
At the moment the wintoast lib tries to find / create an.lnk in %APPDATA%\Microsoft\Windows\Start Menu\Programs\.
We found out that this could lead to problems in enterprise environments with strongly restricted rights for user. In our special case the Programs folder (within the Start Menu) doesn't exist at all.
So I added a function to set the folder, where to create the.lnk.
--> WinToast::setCustomShellLinkPath()
e.g.
WinToast::setCustomShellLinkPath(L"%APPDATA%\\<MyApplication>\\");
If the customShellLinkPath is not set, the default path is used instead.
Besides this I added some debug messages to
validateShellLinkHelper
andcreateShellLinkHelper
.