programmatically open 'system properties' - windows

How can I open the various windows in system properties from command line or using VBS or JS?
By this I mean windows such as User Profiles, environment variables, performance options, DEP, hardware profiles, windows update settings, remote desktop settings, etc I am using windows XP but it wont let me create a shortcut to these dialogs. Sysdm.cpl cant do it either it seems.
System properties is the window that opnes when you right click my computer and hit properties.

One way to open the edit environment variables of the windows through the command line would be to call the run.exe:
"C:\Windows\system32\rundll32.exe" sysdm.cpl,EditEnvironmentVariables
So there must be something similar for other windows.
You can also open a specific tab of the system properties window by using the control command and the tab number:
control sysdm.cpl,,3

Related

Can I have multiple Powershell Consoles in one window?

So, now I have many open apps, often 3-4 powershell consoles. I'm able to order the powershell windows to watch them together (top left, top right, bottom left, bottom right).
So this means that if I switch to another app, when I switch back I have to restore all multiple powershell windows to see them all again.
What I want is, to create only one 'shared window' for many powershell, because when I need one, I need all of them to see.
Is there a way to do this?
Just to add more details about Windows Terminal approach:
Open a Windows Terminal
Type Alt+Shift+= or Alt+Shift+- to open a new Pane in the same tab
Type Shift+Ctrl+W to close the current Pane
If you need more details or modify the settings, go to next page Panes in Windows Terminal
ConEmu has this option.
You can also configure it to open as much consoles as you want when it starts.
ConEmu website
Enjoy!
VSCode can have Multiple Terminals which is the closest to this I've seen, quoted from documentaion:
You can create multiple terminals open to different locations and easily navigate between them. Terminal instances can be added by hitting the plus icon on the top-right of the TERMINAL panel or by triggering the Ctrl+Shift+` command. This creates another entry in the dropdown list that can be used to switch between them.
You can also split the terminal by triggering the Ctrl+\ command or via the right click context menu
Windows now provides the Windows Terminal.
Windows Terminal can split the terminal into panes and can also run different shells (i.e. cmd, powershell, and bash through the wsl)
You can install Windows Terminal directly from the Windows Store.
Create a virtual machine where you can run your PowerShell sessions uninterrupted. The PowerShell windows are always where I placed them when I come back.
It could be an expensive solution depending on your needs, but I have been doing this a long time. It's a robust solution since the only user processes on the VM are my PowerShell sessions.

Command line option for PuTTY (Windows) to set action of mouse buttons to xterm?

As per the title, I'm looking for a command line option which will have the effect of clicking xterm under "Window > Selection > Control use of mouse" in the PuTTY configuration window.
I can't see anything in the standard command line options in the PuTTY docs and I'm trying to create a batch file for some users to save them having to create a session in PuTTY that requires the middle mouse button to paste behaviour.
My users are on Windows machines at the moment, so it needs to work for PuTTY in Windows.
There are no command-line options for setting advanced GUI settings in PuTTY.
Your only option is to set respective registry keys.
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\MySession]
...
"MouseIsXterm"=dword:00000001
...

How to setup MCR_CACHE_ROOT in Windows

I know this may be an easy question but How can I setup MCR_CACHE_ROOT in Windows? Can you provide me with the detailed steps. And where should I point the path to MCR_CACHE_ROOT to speed up my compiled application startup time?
For Windows 7, you set it as an environment variable as follows:
Click Start then right-click on Computer and choose Properties from the menu.
In the System window, click Advanced system settings in the left panel.
In the System properties dialog, select the Advanced tab and click the Environment variables button.
To add for all users, click New under the System variables window.
For Windows XP it's very similar and is described here.
Then you can enter MCR_CACHE_ROOT as the variable name, and the required path to variable value. Ok everything and it's done.
You can set the path wherever you like, but it's probably better to create a folder e.g. C:\MATLAB Cache and set it there.

Control_RunDLL - Open sequential window?

I don't know if this is even possible, but I thought I'd ask anyway.
I know that you can append ,,tabnumber to the end of a
rundll32.exe shell32.dll,Control_RunDLL
command to open a window on a specified tab, but is there a way to open a further window by programmatically selecting a button on that tab?
For example, I'm using
rundll32.exe shell32.dll,Control_RunDLL inetcpl.cpl,,4
to open Windows' Internet Properties window, but is there a way to programmatically to open the LAN Settings window from there, as LAN Settings doesn't seem to have its own process I can call directly.
(I plan to use this with things other than LAN Settings, if there is a solution, such as "Copy settings..." within the "Administrative" tab on the Region and Language window)
There is no general mechanism for this. You are better off doing whatever you need programmatically instead of trying to drive the UI (which changes from version to version). – Raymond Chen

Windows 7: Set "Copy Settings" programmatically from a batch file

I'm constructing a batch file that will auto-configure Windows 7's regional settings for all users.
So far, I've successfully been able to set (mostly) all of the regional settings for the current user, but I need to be able to apply the same settings to all new users. You can do this via the GUI, by going into Region and Language > Administrative > Copy Settings and selecting both checkboxes. I would like to do this programmatically, though. Does anyone know of a registry key I can set or something that will do this?
Failing that, I'll settle for a way to programmatically open the Region and Language > Administrative > Copy Settings window. I've been able to successfully open the Region and Language > Administrative window with start rundll32.exe shell32.dll,Control_RunDLL intl.cpl,,3, but I would like to eliminate one more step from the process, if possible.
Update
Sorry, I seem to have forgotten to mention how I'm applying these settings. I'm doing this by executing an exported .reg file, that contains the optimal settings, with regedit.exe /s "regional.reg"
How are you applying the settings now? Via the registry?
If you put the settings under HKEY_USERS\.DEFAULT instead of (or in addition to) HKEY_CURRENT_USER, they should be used during profile creation.

Resources