Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
i want to open 'my computer properties' dialog box by clicking on a command button from ma project....

System.Diagnostics.Process.Start("sysdm.cpl")

this code works.but d problem is dat this opens system properties dialog box.its ok.but in windows7 if we rightclick 'my computer' and select 'properties' it navigates to the below path.

Control Panel\All Control Panel Items\System

i want to open this window.

In otherwords hw the below path can be opened by clicking a command button from my project.

Control Panel\All Control Panel Items\System

hw i can do this???
Posted
Updated 23-Aug-16 7:44am
v3
Comments
Tejas Vaishnav 20-Mar-14 1:36am    
Your problem is solved or not?

This can be done easily:
First: start the process, "control" that displays the Control Panel.
Second: we define the process to display a "system".

CSS
System.Diagnostics.Process.Start("control", "system");
 
Share this answer
 
VB
System.Diagnostics.Process.Start("sysdm.cpl")
 
Share this answer
 
Look at http://www.thescarms.com/VBasic/rundll.aspx, which should give you some ideas of the programs you can open. Also, I searched my C:\Windows\System32 folder for "*.cpl" files, and this is what I came up with (though my computer is Windows XP):
access.cpl
appwiz.cpl
bthprops.cpl
desk.cpl
firewall.cpl
hdwwiz.cpl
inetcpl.cpl
infocardcpl.cpl
intl.cpl
irprops.cpl
javacpl.cpl
joy.cpl
main.cpl
mmsys.cpl
ncpa.cpl
netsetup.cpl
nusrmgr.cpl
nvcpl.cpl
nvtuicpl.cpl
odbccp32.cpl
powercfg.cpl
sysdm.cpl
telephon.cpl
timedate.cpl
wscui.cpl
wuaucpl.cpl
 
Share this answer
 
Process Monitor is a free program that monitors all access to your file system and registry. Run that when you launch the system properties dialog you are looking for, then pause it and review the files/registry entries accessed. Among them should be the program you are looking for. Heck, maybe sysdm.cpl is the right one and you just have to pass the correct command line arguments to it. If that is the case, then you just need to search Google for the command line arguments it accepts (if any). You may also want to pass command line arguments to the control panel. For example, if type the following into a command prompt, I get the "Computer Name" tab of system properties:
control sysdm.cpl,,1

You can read more about those options here. Also note that you can pass command line arguments to a program when launching it using one of the overloads for Process.Start.

If you figure out the exact answer, post the answer back here. I'd love to help, but I don't have Windows 7, so I can't do any testing.
 
Share this answer
 
Based upon Solution 5 I determined that you can execute
control system

from Start->Run... and this correctly pulls up the Windows 7 System Properties screen like you would get if you use the WindowsKey+Pause keyboard shortcut or right-click on Computer and selected Properties.

This screen says View basic information about your computer at the top.
You can also get there by placing Control Panel\All Control Panel Items\System in the address bar of any Windows Explorer window.

Interestingly, and I'm not sure why, but using Control Panel\All Control Panel Items\System in the Address Bar does not seem to work if you are currently viewing the system32 folder.
 
Share this answer
 
Can you try out this code...


C#
ProcessStartInfo sp = new ProcessStartInfo();
sp.CreateNoWindow = true;
sp.FileName = "control.exe";
sp.Arguments = "/name Microsoft.System";
Process.Start(sp);
 
Share this answer
 
Not sure if you found it yet, but the command you are looking for is below.

control.exe /name Microsoft.System
 
Share this answer
 
Comments
SoMad 20-Mar-14 0:35am    
I sure hope the OP is not still stuck on this 4 years after asking this question...

Soren Madsen

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900