Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: What Windows "magic" invokes a command window as an Administrator window simply by using Control+Shift+Enter versus Enter?

19 views
Skip to first unread message

Arlen George Holder

unread,
Aug 16, 2019, 5:59:29 PM8/16/19
to
On Thu, 15 Aug 2019 16:36:51 -0000 (UTC), Don Kuenz, KB7RPU wrote:

> The process access rights are probably set to PROCESS_ALL_ACCESS when
> the Run dialog calls CreateProcess.
>
> https://docs.microsoft.com/en-us/windows/win32/procthread/process-security-and-access-rights

Hi Don Kuenz,

Maybe that reference explains the "magic", but I didn't get anything from
that which was useful in explaining HOW this "magic" works.

BTW, it works the same with both "cmd" and "powershell" for me anyway...
o Over 250 Start > Run commands (please improve this Start Run commands list)
<https://groups.google.com/forum/#!topic/microsoft.public.windowsxp.general/cc1lGn3ty0E>

From that useful reference, are these two sets of magical commands:

Start > Run > cmd <Enter> (opens a user-level command prompt)
Start > Run > cmd <Ctrl+Shift+Enter> (opens an admin-level command prompt)

Start > Run > powershell <Enter> (opens a user-level powershell)
Start > Run > powershell <Ctrl+Shift+Enter> (opens an admin-level powershell)

What is the Windows 'magic' that makes this work so beautifully?

Jonathan N. Little

unread,
Aug 17, 2019, 11:04:14 AM8/17/19
to
Special powder made from pulverized unicorn horns.

The 'magic' is simply the code some programmer put in while developing
the shell, same as WinKey+R opens the run dialog.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Arlen George Holder

unread,
Aug 17, 2019, 1:00:25 PM8/17/19
to
On Sat, 17 Aug 2019 11:04:10 -0400, Jonathan N. Little wrote:

> Special powder made from pulverized unicorn horns.
>
> The 'magic' is simply the code some programmer put in while developing
> the shell, same as WinKey+R opens the run dialog.

Hi Jonathan,

It's _embarrassing_ that none of us know how Windows works, least of all
me.

However, thanks for that advice but, um, er ... it doesn't really help to
say just give up on trying to learn how it works but I say that in a nice
way ...

Maybe it would help if we knew WHAT the "run" shortcut actually does next?

It's not an executable, for example.
And, even the "Run" shortcut isn't a "normal" shortcut (AFAICT).

It could be any one of these, for all we know:
o SCF (Windows Explorer Command)
o SHS (Shell Scrap Object)
o SHB (Document Shortcut)
o XNK (Exchange Folder Shortcut)
o LNK (File/Folder Shortcut)
o URL (Internet Shortcut)
o PIF (MS-DOS Program Shortcut)
o (many others) <https://ss64.com/nt/superhidden.html>

While I hate to surrender to a search, the ONLY way to pin the Run shortcut
to the taskbar, for example, is to first run a search to find it, and only
then can you pin that Run shortcut to the taskbar.

You can't just go to the location of the shortcut to pin it to the taskbar:
C:\tmp\special\Startup\System Tools\Run
Right clicking on that default "Run" shortcut doesn't tell us much either.
<https://i.postimg.cc/2jtPybp0/run01.jpg>

I wasn't sure if the "Run" shortcut was a PIF or LNK (or other), so I
googled again how to show super hidden extensions (which I had done in the
past so I knew it could be done):
<https://techvedic-tech-support.blogspot.com/2013/09/how-to-show-file-extensions-of_20.html>
<https://www.askvg.com/tip-how-to-show-file-extensions-of-shortcuts-lnk-url-pif-in-windows-explorer/>
<https://h4hacking.wordpress.com/2016/04/07/how-to-show-super-hidden-file-extension-in-windows/>
etc.

I changed the name of these two registry entries:
FROM: [HKEY_CLASSES_ROOT\lnkfile\NeverShowExt]
TO: [HKEY_CLASSES_ROOT\lnkfile\NeverShowExt_]

FROM: [HKEY_CLASSES_ROOT\piffile\NeverShowExt]
TO: [HKEY_CLASSES_ROOT\piffile\NeverShowExt_]

And killed & restarted C:\Windows\explorer.exe and then found that "Run"
was "Run.lnk" (so it's a 'normal' shortcut, at least based on the naming.

But even so, I couldn't find out where this "Run.lnk" shortcut goes.
<https://i.postimg.cc/JhwzLhY0/run02.jpg>o

What does clicking on this "Run.lnk" shortcut actually "do" next?

Arlen George Holder

unread,
Aug 17, 2019, 1:10:58 PM8/17/19
to
On Sat, 17 Aug 2019 17:00:25 -0000 (UTC), Arlen George Holder wrote:

> And killed & restarted C:\Windows\explorer.exe and then found that "Run"
> was "Run.lnk" (so it's a 'normal' shortcut, at least based on the naming.
>
> But even so, I couldn't find out where this "Run.lnk" shortcut goes.
> <https://i.postimg.cc/JhwzLhY0/run02.jpg>

BTW, killing explorer.exe outside the task manager is easy:
C:\Windows\System32\taskkill.exe /im "explorer.exe" /t /f

But starting it back up _required_ the Task Manager:
Three-finger salute > Task Manager > File > Run new task > explorer.exe

It's interesting to note that the WinKey+R was disabled when "explorer.exe"
wasn't running.

Is there another way of bringing up the Run box when explorer.exe is dead?

T. Ment

unread,
Aug 17, 2019, 1:20:45 PM8/17/19
to
On Sat, 17 Aug 2019 17:00:25 -0000 (UTC), Arlen George Holder wrote:

> It's _embarrassing_ that none of us know how Windows works

Proprietary closed source is like drugs. Just say no.


Jonathan N. Little

unread,
Aug 17, 2019, 6:30:44 PM8/17/19
to
Arlen George Holder wrote:
> Hi Jonathan,
>
> It's _embarrassing_ that none of us know how Windows works, least of all
> me.

That's the nature of proprietary software. The alternative is open
source. This is why this is my only and last Winbox. All others I have a
Linux.

Unknown

unread,
Aug 17, 2019, 10:08:52 PM8/17/19
to
In alt.comp.os.windows-10 T. Ment <t.m...@protocol.invalid> wrote:
> On Sat, 17 Aug 2019 17:00:25 -0000 (UTC), Arlen George Holder wrote:
>
>> It's _embarrassing_ that none of us know how Windows works

"If you could see your way, sir, to confining your remarks to your own
peculiarities, you would find that you had an ample field for comment."

> Proprietary closed source is like drugs. Just say no.

As a BSD aficionado, Jonathan and your sympathies are certainly shared
by me. Be that as it may, it's far too late for the likes of us. The
Windows pandemic took hold decades ago.


Windows provides several ways to invoke its Run Dialog. Here's how the
Task Manager ultimately spawned a new process back in the day:

/* Try to exec 'szCommandLine'. */

/*changed order, since wPendINstance is a 32b HANDLE, and ret is WORD*/
if (!lpP)
lpP = TEXT("");

wsprintf(lpReserved, lpReservedFormat, 0, 0);

ret = (WORD)RealShellExecute(ghwndDialog, NULL, lpszPath, lpP,
lpDir, NULL, lpTitle, lpReserved,
(WORD)SW_SHOWNORMAL, &hProcess);

RealShellExecute is most likely a wrapper for the API CreateProcess
function shown below. (It's too much work for me to investigate this any
further for curiosity's sake.)
Inet searches indicate that some people seem to get some mileage out
of calling CreateProcess from within PowerShell. C's my native language
so don't ask me how to do this in PowerShell.

CreateProcess

The CreateProcess function creates a new process and its
primary thread. The new process runs the specified executable
file in the security context of the calling process.

If the calling process is impersonating another user, the new
process uses the token for the calling process, not the
impersonation token. To run the new process in the security
context of the user represented by the impersonation token,
use the CreateProcessAsUser or CreateProcessWithLogonW function.


BOOL CreateProcess(
LPCTSTR lpApplicationName,
LPTSTR lpCommandLine,
LPSECURITY_ATTRIBUTES lpProcessAttributes,
LPSECURITY_ATTRIBUTES lpThreadAttributes,
BOOL bInheritHandles,
DWORD dwCreationFlags,
LPVOID lpEnvironment,
LPCTSTR lpCurrentDirectory,
LPSTARTUPINFO lpStartupInfo,
LPPROCESS_INFORMATION lpProcessInformation
);

Thank you, 73,

--
Don Kuenz KB7RPU
There was a young lady named Bright Whose speed was far faster than light;
She set out one day In a relative way And returned on the previous night.


J. P. Gilliver (John)

unread,
Aug 18, 2019, 1:51:05 AM8/18/19
to
In message <qj9v6g$rrb$1...@dont-email.me>, Jonathan N. Little
<lws...@gmail.com> writes:
>Arlen George Holder wrote:
>> Hi Jonathan,
>>
>> It's _embarrassing_ that none of us know how Windows works, least of all
>> me.

While it's a truism that none of us knows how _all_ of Windows works,
there _are_ people who know how sections of it do - and taken as a
whole, we _do_. And by now, there are probably enough who are now
outside Microsoft that we - _as a whole_ - do know how it works, with
the exception of those bits that are to do with licencing/activation
etcetera.

I don't think it's _embarrassing_ as such, that no single individual
knows how all of it works: it's no different to any other complex
entity, such as a power station or even, these days, a car.
>
>That's the nature of proprietary software. The alternative is open
>source. This is why this is my only and last Winbox. All others I have a
>Linux.
>
I'm curious: given that Windows has now been around significantly longer
than the average or even extended life of a machine, as has Linux: if
"this" is your current machine, given your stated view of proprietary
software, why did you buy it when you did (alternatives would have been
available)?
--
J. P. Gilliver. UMRA: 1960/<1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf

The voices of Radio 4 continuity and newsreading have been keeping me right
for as long as I can remember. I can call on a million different information
sources, but it doesn't make sense unti I've heard it from Peter, Harriet,
Charlotte and the rest.- Eddie Mair in Radio Times 10-16 November 2012

T. Ment

unread,
Aug 18, 2019, 2:48:20 AM8/18/19
to
On Sun, 18 Aug 2019 02:08:44 -0000 (UTC), Don Kuenz wrote:

>> Proprietary closed source is like drugs. Just say no.

> As a BSD aficionado, Jonathan and your sympathies are certainly shared
> by me. Be that as it may, it's far too late for the likes of us. The
> Windows pandemic took hold decades ago.

Empires rise, empires fall. It's only a matter of time.


Rabid Robot

unread,
Aug 18, 2019, 10:56:41 AM8/18/19
to
On 2019-08-18 1:49 a.m., J. P. Gilliver (John) wrote:
> In message <qj9v6g$rrb$1...@dont-email.me>, Jonathan N. Little
> <lws...@gmail.com> writes:
>> Arlen George Holder wrote:
>>> Hi Jonathan,
>>>
>>> It's _embarrassing_ that none of us know how Windows works, least of all
>>> me.
>
> While it's a truism that none of us knows how _all_ of Windows works,
> there _are_ people who know how sections of it do - and taken as a
> whole, we _do_. And by now, there are probably enough who are now
> outside Microsoft that we - _as a whole_ - do know how it works, with
> the exception of those bits that are to do with licencing/activation
> etcetera.
>
> I don't think it's _embarrassing_ as such, that no single individual
> knows how all of it works: it's no different to any other complex
> entity, such as a power station or even, these days, a car.

I commend you for mentioning power stations in this context. I'm sure
that Anatoly Dyatlov, in Chernobyl, was quite knowledgeable about how
the power station worked back on the 26th of April, 1986.

>> That's the nature of proprietary software. The alternative is open
>> source. This is why this is my only and last Winbox. All others I have a
>> Linux.
>>
> I'm curious: given that Windows has now been around significantly longer
> than the average or even extended life of a machine, as has Linux: if
> "this" is your current machine, given your stated view of proprietary
> software, why did you buy it when you did (alternatives would have been
> available)?

The problem with any machine purchased today is that open-source
software won't properly support it until three or four years from now.
Unless you purchase a machine which was explicitly built with hardware
that already has good driver support in Linux, it's not likely that your
experience will be any good. My laptop only recently got properly
supported by Ubuntu 19.04 and even then, the ACPI functionality is a
complete mess.

T. Ment

unread,
Aug 18, 2019, 11:13:53 AM8/18/19
to
On Sun, 18 Aug 2019 10:56:27 -0400, Rabid Robot wrote:

> The problem with any machine purchased today is that open-source
> software won't properly support it until three or four years from now.

I wonder why people pay showroom price for brand new. Like cars, in a
few years they lose most of their value. Rich people aren't rich because
they spend a lot of money.


Jonathan N. Little

unread,
Aug 18, 2019, 12:13:38 PM8/18/19
to
J. P. Gilliver (John) wrote:
>>
> I'm curious: given that Windows has now been around significantly longer
> than the average or even extended life of a machine, as has Linux: if
> "this" is your current machine, given your stated view of proprietary
> software, why did you buy it when you did (alternatives would have been
> available)?

1) I build it, as nearly all my computers for over 20 years.
2) Started with Windows.
3) For business used CorelDraw back then. Only pro graphics software for
Windows. [could not do #1 with a Mac]
4) Been using Linux for servers @ 18 years ago
5) Been using Linux on all other systems for 12 years
6) Still need CorelDraw for business and no Linux port
7) Inkscape is good, but missing essential features that CD has, but do
use Inkscape to fix CD's bad SVG export.
8) When Windows becomes subscription only I'll have to find a way to
make Inkscape work for everything, or find some better alternative.

Jonathan N. Little

unread,
Aug 18, 2019, 12:21:58 PM8/18/19
to
Rabid Robot wrote:
> The problem with any machine purchased today is that open-source
> software won't properly support it until three or four years from now.
> Unless you purchase a machine which was explicitly built with hardware
> that already has good driver support in Linux, it's not likely that your
> experience will be any good. My laptop only recently got properly
> supported by Ubuntu 19.04 and even then, the ACPI functionality is a
> complete mess.

Not been my experience. Been installing Ubuntu 16.04 on brand-spank'n
new systems with 8 generation Intel CPUs where the CPU predates the OS
release by 2 years and no problem. Haven't encountered a 9th gen yet.

Arlen Holder

unread,
Aug 4, 2020, 5:49:05 PM8/4/20
to
UPDATE:

Windows 10:
o Win+R > cmd {Enter} <== this opens a "user" command window
o Win+R > cmd {Ctrl+Shift+Enter} <== this opens an "admin" command window

And, not surprisingly...
o Win+R > wsl {Enter} <== pwd shows the cwd is /mnt/c/Users/{user}/
o Win+R > wsl {Ctrl+Shift+Enter} <== cwd is set to /mnt/c/WINDOWS/system32/

Yet... paradoxically...
o Win+R > wsl {Enter} <== a "whoami" shows this to be a "user" window
o Win+R > wsl {Ctrl+Shift+Enter} <== this is _still_ a "user" window

Go figure.
--
The reason this is important is when you're entering telnet commands, the
Linux telnet has options not necessarily in the Windows telnet, and, more
importantly, the shell in Linux also has nice options (e.g., bang bang).

Arlen Holder

unread,
Aug 4, 2020, 6:01:01 PM8/4/20
to
On Tue, 4 Aug 2020 21:49:02 -0000 (UTC), Arlen Holder wrote:

> o Win+R > wsl {Enter} <== a "whoami" shows this to be a "user" window
> o Win+R > wsl {Ctrl+Shift+Enter} <== this is _still_ a "user" window

Oooooops.

I forgot to mention that you won't have wsl unless you do this:
o Tutorial for setting up Ubuntu as a Windows Subsystem for Linux WSL in Windows 10
<https://groups.google.com/forum/#!topic/alt.comp.freeware/rOT8xBWo9dk>

Note: You won't have telnet in Windows either, unless you do this:
o Tutorial: How to enable the Telnet Client in Windows 10
<https://groups.google.com/forum/#!topic/alt.comp.freeware/pEhuvzzFBTU>

For example:
{me} Win+R > cmd {ctrl+shift+enter} <== optional, admin cmd window
{it} C:\WINDOWS\system32> <== this is the admin $p$g prompt apparently
{me} C:\WINDOWS\system32> telnet
{it} 'telnet' is not recognized as an internal or external command,
{it} operable program or batch file. <== I could "enable" it but screw that
{me} exit

Start over directly with Ubuntu running inside of Windows:
{me} Win+R > wsl <== to get into the Windows subsystem for Linux
{me} $ telnet nntp.aioe.org 119
{me} post
{it} 340 Ok, recommended message-ID <rgbtq6$blf$1...@gioia.aioe.org>
{me} from: Arlen Holder <arlen...@newmachine.com>
{me} newsgroups: comp.mobile.android
{me} subject: Re: Do you use FreedomPop in the USA? If so, what are the details?
{me} message-id: <rgbtq6$blf$1...@gioia.aioe.org>
{me} references: <pv6ei5$bs0$1...@news.mixmin.net>
{me} <blank line>
<control+v doesn't work, but sometimes control+q works here>
{me} .
{me} quit <== exit out of telnet
{me} exit <== exit out of wsl

This is what it looks like, in the flesh (with inevitable gotchas):
o <https://i.postimg.cc/kGG8W31b/telnetnntp01.jpg>
--
Two kinds of people frequent Usenet: those who add value & those who chat.
0 new messages