How to cd a protected directory in "one step"?

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
yyang
Member
Member
Posts: 155
Joined: 2007-03-27, 11:41 UTC
Location: China

How to cd a protected directory in "one step"?

Post by *yyang »

Let's try to enter "C:\Program Files\WindowsApps". If we paste the path into the address bar and hit Enter, a UAC prompt appears. That's good and expected.

If we need a custom menu item, "cd C:\Program Files\WindowsApps\" doesn't work as expected. The WindowsApps directory is located (if hidden files are visible), and an extra Enter is required to get the UAC prompt. The WindowsApps directory won't be located if hidden files are not visible, leaving more work to the user.

The question is: how to cd such a protected directory in "one step" (not counting the UAC routine)? I guess tcmadmin may help, but don't know how to invoke it. Thanks a lot!
#147523
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3854
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Re: How to cd a protected directory in "one step"?

Post by *sqa_wizard »

The UAC prompt pops up because you have enabled UAC, which is the default.
The UAC prompt is displayed in a separate "security layer" where no other app can read, write or send any command to.
This means, there is no chance to automatically answer the prompt.
#5767 Personal license
User avatar
yyang
Member
Member
Posts: 155
Joined: 2007-03-27, 11:41 UTC
Location: China

Re: How to cd a protected directory in "one step"?

Post by *yyang »

Thanks for your reply! But my question is NOT about answering UAC automatically. The quoted "one step" excludes the UAC routine, as explained in the 3rd paragraph of my original post. I just want to get the same effect of editing the address bar using the cd command, possibly with the help of tcmadmin.
Last edited by yyang on 2018-12-04, 05:12 UTC, edited 1 time in total.
#147523
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: How to cd a protected directory in "one step"?

Post by *Hacker »

yyang,
The WindowsApps directory is located (if hidden files are visible), and an extra Enter is required to get the UAC prompt.
Can you please describe this in more detail? What do you by "located"? What additional step is added so that you need the extra Enter?

TIA
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Re: How to cd a protected directory in "one step"?

Post by *ts4242 »

2Hacker

Test with this button

Code: Select all

TOTALCMD#BAR#DATA
cd "C:\Program Files\WindowsApps"

%COMMANDER_PATH%\Totalcmd.exe,1



-1
TC just put the cursor on the folder and you have to press <Enter> manually.
User avatar
yyang
Member
Member
Posts: 155
Joined: 2007-03-27, 11:41 UTC
Location: China

Re: How to cd a protected directory in "one step"?

Post by *yyang »

To ts4242
TC just put the cursor on the folder and you have to press <Enter> manually.
Exactly, thank you! I think this extra Enter is boring, especially when the WindowsApps directory is invisible (in this case "C:\Program Files" will be opened and the cursor is moved to the top).
#147523
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: How to cd a protected directory in "one step"?

Post by *MVV »

I think TC should enter such folder anyway and show some pseudo-contents like it does for inaccessible network folders now and update folder contents on confirming UAC request.
User avatar
yyang
Member
Member
Posts: 155
Joined: 2007-03-27, 11:41 UTC
Location: China

Re: How to cd a protected directory in "one step"?

Post by *yyang »

I think TC should enter such folder anyway and show some pseudo-contents like it does for inaccessible network folders now and update folder contents on confirming UAC request.
Indeed. There should be no UX difference between pasting a path into the address bar followed by Enter and cd'ing such a path.

Besides, there is a tiny inconsistency when pasting the path of a protected directory. Using "C:\Program Files\WindowsApps\" tries to enter it and triggers the UAC prompt, but using "C:\Program Files\WindowsApps" (without the trailing backslash) just enters "C:\Program Files" (and selects the WindowsApps folder if it's visible). For a regular directory path, using either style enters the specified directory.
#147523
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: How to cd a protected directory in "one step"?

Post by *Hacker »

ts4242,
Test with this button
For me it enters the folder and I see a <Read error!> pseudo-file. To enter the folder I have to press Enter twice, not once.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Re: How to cd a protected directory in "one step"?

Post by *ts4242 »

Hacker wrote: 2018-12-04, 19:22 UTC ts4242,
Test with this button
For me it enters the folder and I see a <Read error!> pseudo-file. To enter the folder I have to press Enter twice, not once.

Roman
What's your OS & TC version?
I have tested under Windows 10 Version 1803 (OS Build 17134.285) and TC 9.21a (x32 & x64)
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: How to cd a protected directory in "one step"?

Post by *Hacker »

ts4242,
W10 x64 17134.407 and TC 9.21a x64.
IgnoreDirErrors=1

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Re: How to cd a protected directory in "one step"?

Post by *ts4242 »

Hacker wrote: 2018-12-04, 21:31 UTCIgnoreDirErrors=1
Yes, it makes a difference!
User avatar
yyang
Member
Member
Posts: 155
Joined: 2007-03-27, 11:41 UTC
Location: China

Re: How to cd a protected directory in "one step"?

Post by *yyang »

So... the conclusion is it needs a slight improvement? :)
#147523
Post Reply