Run Control Panel Icon from Command Prompt

  • Thread starter Thread starter Dennis W. Bulgrien
  • Start date Start date
D

Dennis W. Bulgrien

Running "CONTROL USERPASSWORDS2" starts Control Panel's "User Accounts" window.
How do I find the other parameters to give to CONTROL to open the other Control
Panel items?
 
When these commands are put in a batch file, how can they be made to run
asynchronously (single-file) instead of running the next before the first is
closed? The following has no effect.

start /b /wait control userpasswords
start /b /wait control color

Running "CONTROL USERPASSWORDS2" starts Control Panel's "User Accounts" window.
How do I find the other parameters to give to CONTROL to open the other Control
Panel items?
 
When in a batch file cmd.exe waits 13 seconds and then goes on to the next line
in the batch file without waiting for the program started on the current line to
end.
 
Like "control.exe <cpl app>,<applet>,<page>" runs specific applets or goes to
specific tabs, how can nusrmgr.cpl (User Accounts) run a specific hyperlink
(Change an account, Create a new account, etc)?
 
Dennis said:
When in a batch file cmd.exe waits 13 seconds and then goes on to the next line
in the batch file without waiting for the program started on the current line to
end.

If it is a windows program being invoked, the bat file just launches it
and proceeds. You need to launch it with the start command in the file,
and use the /w switch to wait for it to exit before proceeding

start /w prog.exe parameters
 
Tried that. It does not work with Control.exe as it does with other .exes,
maybe because control.exe starts its own sub-executable and then terminates
itself. So start.exe /w thinks it can stop waiting even though the
sub-executable is still running.

....You need to launch it with the start command in the file,
and use the /w switch to wait for it to exit before proceeding
....
 
Correction, control.exe waits about 13 seconds. When a .exe is run from a batch
file, even if it is a graphical program, the batch file does not advance to the
next instruction until the .exe ends. When control runs, it starts whatever it
was asked to run immediately, but then waits the 13 seconds before ending, and
it ends regardless of whether what it started has ended or not. If the window
is closed sooner than 13 seconds, the batch file appears to hang for the rest of
that time. So, to gate a batch file to control.exe windows and yet to allow the
batch file to continue as quick as the user, the following can be done.
However, it does require extra keypresses.

start control.exe applet1...
pause
start control.exe applet2...
pause

When in a batch file cmd.exe waits 13 seconds...
 
Unlike other .cpl's with tabs, control.exe powercfg.cpl,,n doesn't seem to have
any effect.
control.exe powercfg.cpl,,1
control.exe powercfg.cpl,,2
control.exe powercfg.cpl,,etc
does not open the different tabs, always the first. Know why or how?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top