Reputation: 21
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."
Upvotes: 0
Views: 5249
Reputation: 35
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.
Upvotes: 0
Reputation: 38689
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 cmd, (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 wmic, to retrieve either, 32
or 64
:
@For /F %%A In ('WMIC OS Get OSArchitecture')Do Set /A "OSA=%%A" 2>Nul
@Echo %OSA%&Pause
Upvotes: 0