0

I want to create a batch file that will open "Control Panel\System and Security\System"

I'm using Windows 10 and the "This PC" is not searchable in cortana, I often check system archetecture by right clicking This PC>properties but I want to do it in Batch (.bat file) and it does'nt work

Batch Command: start "" "Control Panel\System and Security\System" & exit

A prompt pops up: "Windows cannot find 'Control Panel\System and Security\System'. make sure you typed the name correctly, and try again."

  • 1
    This is not a programming question. Ask on https://superuser.com. Traditional control panel items are `*.cpl` in `system32`. So typing `sysdm.cpl` will start it. – Noodles May 02 '19 at 00:00
  • @Noodles `sysdm.cpl` (at least on Windows 10) opens the System Properties, not Control Panel\System and Security\System. IMO this is on topic for Stack Overflow. – BDM May 02 '19 at 00:04
  • I've been wondering why control panels haven't caught up with ms-settings. I saw an app that added protocol handlers for control panels to support deep linking... guess it depends how much work you want to do. – Micromuncher May 02 '19 at 19:23

3 Answers3

4

What you're after is the control command. You can find more info Here

Try control /name Microsoft.System.

BDM
  • 3,760
  • 3
  • 19
  • 27
0

You can get the Operating Systems architecture, directly in a batch file without opening up a GUI box:

You can either use the built in system variables, to retrieve either, x86 or x64:

@Set "OSA=x%PROCESSOR_ARCHITECTURE:~-2%"
@If %OSA%==x86 If Defined PROCESSOR_ARCHITEW6432 Set "OSA=x64"
@Echo %OSA%&Pause

Or if you wanted just 32 or 64

@If %PROCESSOR_ARCHITECTURE:~-2% Equ 86 (If Defined PROCESSOR_ARCHITEW6432 (Set "OSA=64")Else Set "OSA=32")Else Set "OSA=64"
@Echo %OSA%&Pause

You could even just view it in a , (Command Prompt), window with:

If %PROCESSOR_ARCHITECTURE:~-2% Equ 86 (If Defined PROCESSOR_ARCHITEW6432 (Echo 64-bit)Else Echo 32-bit)Else Echo 64-bit

You could also use a built in tool, like , to retrieve either, 32 or 64:

@For /F %%A In ('WMIC OS Get OSArchitecture')Do Set /A "OSA=%%A" 2>Nul
@Echo %OSA%&Pause
Compo
  • 36,585
  • 5
  • 27
  • 39
  • This is a good info! This will be a good addition to my batch.. it prints desired result just I wanted.. Thanks! – Jules Ivan Garay May 03 '19 at 06:06
  • @JulesIvanGaray, is it not what you would consider a more suitable solution to "check system archetecture"..."but I want to do it in Batch (.bat file)" than `control /name Microsoft.System` – Compo May 03 '19 at 07:02
  • @JulesIvanGaray, please consider revising your choice of accepted answer. – Compo May 03 '19 at 13:58
0

i have a similar question and found a partial answer; in cmd, type "start ms-settings:" this starts the Settings app in Win10. What if I'm trying to open a specific page within the Settings app, specifically the "Accounts"? i tried typing "control /name Microsoft.System" into cmd and this returned the older version of the app.

Kuei
  • 33
  • 1
  • 5
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 17 '22 at 07:54