3
0
I have noticed a strange behavior running a setup on Windows 10 that I can't understand. The setup creates a directory structure and, at a certain point, it renames one of the subdirectories it has created. What happened is explained below:
When I right-clicked the
setup.exe
in the Windows Explorer and selected "Run as administrator", the setup eventually failed because of a bad permission issue when trying to rename the subdirectory.When I right-clicked on
cmd.exe
, run it as administrator and spawned thesetup.exe
from the command line, the setup completed successfully.
What was going on here? What's the difference between spawning an application from the Windows Explorer as administrator and spawning it from cmd.exe
as administrator?
Thank you.
EDIT
The root directory created by the setup is
c:\personal
. The initial subdirectory's path is:c:\personal\platform\db
, and the renamed subdirectory should be:c:\personal\platform\database
The user account running the setup belongs to the Administrators group and the setup process owner was this user in both cases.
1When I right-clicked .. the setup eventually failed .... It creates this subdirectory successfully, and immediately after this it cannot rename this created directory, is it? – Akina – 2019-05-15T10:24:44.810
@Akina, exactly, it's like this. – Claudix – 2019-05-15T10:25:21.240
1Show full pathname of this directory please. Is it posessed in Program files or similar? – Akina – 2019-05-15T10:25:47.070
@Akina, the root directory created by the setup is
c:\personal
. The initial subdirectory's path is:c:\personal\platform\db
, and the renamed subdirectory should be:c:\personal\platform\database
– Claudix – 2019-05-15T10:29:36.9671Does your CURRENT account have administrative permissions (is a member of Administrators group)? Load ProcessExplorer, enable User Name column output, then start setup.exe both via right-click and via runas.exe, and compare account names shown. – Akina – 2019-05-15T10:43:58.767
@Akina, the current account is indeed a member of Administrators group. The setup (in both cases, running from Explorer and running from the command line) was being executed under the current account. This, actually, drove me nuts since everything was the same in terms of the user owning the process. – Claudix – 2019-05-15T10:49:16.857
1One difference is what the current active directory is in each case for the started process. If any of the paths is a relative path, then there could be a problem. – MC ND – 2019-05-18T15:56:31.447
What are the permissions on the 'db' folder that cannot be renamed? Run
icacls db
from the personal folder and post the output in your question. Please ping me afterward. – I say Reinstate Monica – 2019-05-27T01:38:35.823