Administrator X Window System32 Cmd Exe

Remove Windows accounts or change PC administrator. Administrator:x: windows system32 cmd.exe Saat Mau. CMD WINDOW IN FEW. According to Microsoft, there are two methods to fix a C:/Windows/system32/cmd.exe error: boot the computer into safe mode, then troubleshoot to determine the cause of the issue, or perform a system restore. C:/Windows/system32/cmd.exe errors are frequently caused by misconfigured system files.

Active3 years, 3 months ago

I am trying to invoke one executable by putting following line on command prompt. (I know I can directly invoke the exe but let's just say I have no other way to do this due to some restriction)

itself It is successfully run. /C is parameter to cmd.exe. But when I do this

Gives me error

Any idea why? And how can I solve this problem? I have to use full path of cmd.exe.

Ganesh SatputeGanesh Satpute
1,0754 gold badges16 silver badges40 bronze badges

5 Answers

Try this instead:

For example:

These work without any problem and both of them output 'Hello World'

SazidSazid
1,9821 gold badge13 silver badges28 bronze badges

As stated by Stephan, the correct way of writing it is some of the following options

The question is Why 'cmd /c' .... works? It works for the way the parser is interpreting the line.

When the line is readed and parsed, 'cmd /c' is converted to

So it is executed as

This substitution can be easily tested

MC NDMC ND
60.9k5 gold badges54 silver badges91 bronze badges

looks for a file named C:WindowsSystem32cmd.exe /C.

Have you ever seen a file with the extension .exe /c?

Correct format is:

StephanStephan
38.9k5 gold badges35 silver badges63 bronze badges

Regarding the additional question of why the extra quotes are needed: this is described in the help returned by cmd /?, specifically

If /C or /K is specified, then the remainder of the command line after the switch is processed as a command line, where the following logic is used to process quote (') characters:

So, if the first (non-whitespace) character of the command is a quote, you need an extra pair of quotes around the entire command.

Additional note: combining MC ND's answer with mine, the first command line in the question is being interpreted like this: we start with

which becomes

due to the rule that replaces cmd ->%ComSpec% combined with the bug/feature that discards the extra quote mark; this then becomes

because of the rule that removes the first and last quote marks when processing /C.

The Win32 file system rules discard the extra backslash, so the executable launched is

and the executable is presumably ignoring the missing close-quote in its argument.

Harry JohnstonHarry Johnston
31k5 gold badges45 silver badges118 bronze badges

Strange it seems :/

This works. Don't know why. May be the double quotes before and after 'C:Program FilesABCxyz.exe' -register='abc' are required. Wish if someone will explain that.

Solomon Ucko
1,1692 gold badges11 silver badges22 bronze badges
Ganesh SatputeWindowsGanesh Satpute
1,0754 gold badges16 silver badges40 bronze badges

Not the answer you're looking for? Browse other questions tagged windowscommand-linecmd or ask your own question.

Active3 years, 4 months ago

Because of Windows 10 security restrictions, I cannot run a software (WirelessModem.exe of D-Link) I used to run easily on Windows 8.1. However, I can run it from a CMD command prompt run under Administrator account. To make it convenient to open the software whenever I need it, I created a shortcut on my desktop, set it to run as administrator, set the target to 'C:WindowsSystem32cmd.exe' and *Start in' to the location where my said software is located, as shown in the following screenshots. Nevertheless when I run this shortcut, UAC prompts for Administrator confirmation and when I hit OK, CMD opens with system32 path, rather than the location I specified earlier in shortcut properties, why?

Please note that creating direct shortcut to wirelessmodem.exe does bring up a pop-up in red notice reading 'This app has been blocked for your protection' so the only hack I know is to run wirelessmodem.exe from an admin CMD window. So, my main concern in this question is to start cmd in the location of the said app, not in Windows' system32.

codezombie
codezombiecodezombie
8265 gold badges16 silver badges33 bronze badges

1 Answer

  1. The Start In: location is where CMD.exe would open, not a file it would execute.

  2. Why not just use a shortcut to D-Link Connection Manager, set to Run as Administrator? Create the shortcut, right-click on it to select Properties, and use Advanced properties settings to set Run as Administrator, as below:

DrMoishe PippikDrMoishe Pippik

X Administrator Windows System32 Commands

11.7k4 gold badges17 silver badges36 bronze badges

Administrator X Windows System32 Cmd.exe Windows 7

Not the answer you're looking for? Browse other questions tagged windows-10 or ask your own question.