Start menu entries have insufficient rights in Windows 7 RC
Moderators: Hacker, petermad, Stefan2, white
Start menu entries have insufficient rights in Windows 7 RC
Install TC7.5b5 on newly installed W7RC as default (admin) user an add another user to W7RC (doesn't matter whether admin or not). Log in as that new user and check start menu: no "Total Commander" entry visible.
It has been created in "C:\users\<default user>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs" but should be created in "C:\ProgramData\Microsoft\Windows\Start Menu\Programs" instead (for "all users", which should be independent of the setting where shall be INI is saved).
Additionaly, the rights assigned to the "Total Commander" start menu directory are NOT inherited to the three symlinks it contains. So even if one manually moves the start menu directory to the "all users" equivalent of W7 one still has to adapt the symlinks' rights.
It has been created in "C:\users\<default user>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs" but should be created in "C:\ProgramData\Microsoft\Windows\Start Menu\Programs" instead (for "all users", which should be independent of the setting where shall be INI is saved).
Additionaly, the rights assigned to the "Total Commander" start menu directory are NOT inherited to the three symlinks it contains. So even if one manually moves the start menu directory to the "all users" equivalent of W7 one still has to adapt the symlinks' rights.
- ghisler(Author)
- Site Admin
- Posts: 50421
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
The TC installer creates Explorer shortcuts via DDE (dynamic data exchange). I have no influence on where the Explorer creates these shortcuts.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50421
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Unfortunately there seems to be no way to find out the logged-in user from the installer when the installer is started as a different user. Therefore the installer cannot install the links this way in the user's start menu, only in the menu for all users - but that may be not what the user wants.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
There is a way to find the logged-in user, at least for windows xp or higher: Get the username for the process explorer.exe:ghisler(Author) wrote:Unfortunately there seems to be no way to find out the logged-in user from the installer when the installer is started as a different user. Therefore the installer cannot install the links this way in the user's start menu, only in the menu for all users - but that may be not what the user wants.
c++ sample:
Code: Select all
// includes
#include <wtsapi32.h>
#include <psapi.h>
// libs needed or use GetProcAddress():
// Psapi.lib
// Wtsapi32.lib
PWTS_PROCESS_INFO pProcessInfo;
DWORD ProcessCount = 0;
if (WTSEnumerateProcesses(WTS_CURRENT_SERVER_HANDLE, 0, 1, &pProcessInfo, &ProcessCount))
{
for (DWORD CurrentProcess = 0; CurrentProcess < ProcessCount; CurrentProcess++)
{
if (stricmp(pProcessInfo[CurrentProcess].pProcessName, "explorer.exe") == 0 &&
pProcessInfo[CurrentProcess].pUserSid != NULL)
{
SID_NAME_USE snu;
char szUser[_MAX_PATH];
DWORD chUser = _MAX_PATH;
PDWORD pcchUser = &chUser;
char szDomain[_MAX_PATH];
DWORD chDomain = _MAX_PATH;
PDWORD pcchDomain = &chDomain;
if (::LookupAccountSid(NULL, pProcessInfo[CurrentProcess].pUserSid, szUser, pcchUser, szDomain, pcchDomain, &snu))
{
printf("%s\n", szUser);
}
else
{
printf("Unknown\n");
}
}
}
}
CoolWater
Hello, nursoda. Hello, Christian.
Issue:
Startmenu items created inside "%userprofile%\start menu\programs" instead of "%allusersprofile%\start menu\programs".
I can confirm the issue exists. And I can also confirm that the source of the issue seems to be inside Windows itself, because I can reproduce the issue when installing Total Commander, IrfanView and other programmes.
Relevant factor:
The installing user account has not got full administrator privileges.
This will be the case on Vista, Windows7, Server2008 if e.g. an admin user launches the setup without elevated rights.
This will be the case on Windows XP if a power user launches the setup.
Kind regards,
Karl
Issue:
Startmenu items created inside "%userprofile%\start menu\programs" instead of "%allusersprofile%\start menu\programs".
I can confirm the issue exists. And I can also confirm that the source of the issue seems to be inside Windows itself, because I can reproduce the issue when installing Total Commander, IrfanView and other programmes.
Relevant factor:
The installing user account has not got full administrator privileges.
This will be the case on Vista, Windows7, Server2008 if e.g. an admin user launches the setup without elevated rights.
This will be the case on Windows XP if a power user launches the setup.
Kind regards,
Karl
- ghisler(Author)
- Site Admin
- Posts: 50421
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
2CoolWater
That looks very promising, thanks! I'm considering to combine the dialogs for start menu items and desktop icon into one dialog, e.g. like this:
Create icons:
[x] in the start menu
[x] on the desktop
(*) Just for this user [username ]
( ) For all users of this system
And the [username ] field could be changed by the user.
What do you think?
That looks very promising, thanks! I'm considering to combine the dialogs for start menu items and desktop icon into one dialog, e.g. like this:
Create icons:
[x] in the start menu
[x] on the desktop
(*) Just for this user [username ]
( ) For all users of this system
And the [username ] field could be changed by the user.
What do you think?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50421
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I can confirm the problem with Windows 7. The installer will therefore no longer use DDE in the next version to create the start menu icons.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50421
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
The TC 7.5 installer fixes this problem. Since I didn't get any similar reports, I will move this to "fixed bugs" now.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com