CMD Shortcut Properties/Layout Ignored


sudleyplace

Member
Local time
1:25 AM
Posts
4
OS
Windows 11 Pro x64
After installing Win11 yesterday, I found a minor, but annoying nit.

Using an existing shortcut to CMD.EXE, when I double click on it, the window displays near the middle of screen #2. Before Win11, as shown in the window's Properties|Layout, it displayed in the upper left corner of screen #3.

Under Win11, that layout seems to be ignored, along with the window's height & width.

The entire shortcut command line is

C:\Windows\System32\cmd.exe /E:ON /F:ON /T:1E /K C:\UTIL\AUTOEXEC.BAT

FWIW: the checkbox "Let system position window" is unchecked.

Note that when viewing the Layout section of the shortcut's Properties, the "Window Preview" shows the expected layout. Moreover, if I click on any of the Width/Height/Left/Top up/down arrows, the window moves in the expected direction within the Preview. It just seems to be ignored when displaying the actual window on the screen.

I also tried creating everything from scratch using the same Layout properties, and the result was the same.

What am I missing, or is this just a Win11 bug?
 
Windows Build/Version
23H2 22631.4751

My Computer

System One

  • OS
    Windows 11 Pro x64
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Made
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    AMD X570 ATX ROG Crosshair VIII Hero
    Memory
    64GB
    Graphics Card(s)
    NVIDIA GeForce RTX 4060 Ti
    Sound Card
    FANGOR Sound Bar, 60W 16-Inch
    Monitor(s) Displays
    Three LG 27" UHD 4K
    Screen Resolution
    3840 x 2160
    Hard Drives
    Four 2TB, one 1TB, two 500GB, one 256GB
    Keyboard
    Keychron Q6 HE 100%
    Internet Speed
    1Gbps/40Mbps
So Win11 is an Upgrade from Win10? Most times the previous icons will remain but positioning will change. It must be kept in mind that the desktop is not Static like a picture on the wall but Dynamic, always being refreshed/redrawn, not always seen doing it. Programs can cause changes as what is in memory has an affect. Sometimes a third-party software will be needed but can't recommend as I don't use one, have to be able to see what my clients see which usually requires defaults.
 

My Computers

System One System Two

  • OS
    Win11 Pro RTM
    Computer type
    Laptop
    Manufacturer/Model
    Dell Vostro 3400
    CPU
    Intel Core i5 11th Gen. 2.40GHz
    Memory
    12GB
    Hard Drives
    256GB SSD NVMe M.2
  • Operating System
    Windows 11 Pro RTM x64
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Vostro 5890
    CPU
    Intel Core i5 10th Gen. 2.90GHz
    Memory
    16GB
    Graphics card(s)
    Onboard, no VGA, using a DisplayPort-to-VGA adapter
    Monitor(s) Displays
    24" Dell
    Hard Drives
    512GB SSD NVMe, 4TB Seagate HDD
    Browser
    Firefox, Edge
    Antivirus
    Windows Defender/Microsoft Security
Hello,
I can see you have some DOS experience. I wonder what you use the autoexec for.
Anyway, I strongly suggest you use Terminal, which can incorporate Powershell & others.
I find it always repositions the panes correctly.

Screenshot 2025-01-17 233937.webp
Screenshot 2025-01-20 202615.webp

As you can see, you can even use 4NT, a more powerful cmd.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    Laptop
    Manufacturer/Model
    ASUSTeK COMPUTER INC. TUF Gaming FX705GM
    CPU
    2.20 gigahertz Intel i7-8750H Hyper-threaded 12 cores
    Motherboard
    ASUSTeK COMPUTER INC. FX705GM 1.0
    Memory
    24428 Megabytes
    Graphics Card(s)
    Intel(R) UHD Graphics 630 / NVIDIA GeForce GTX 1060
    Sound Card
    Intel(R) Display Audio / Realtek(R) Audio
    Monitor(s) Displays
    Integrated Monitor (17.3"vis)
    Screen Resolution
    FHD 1920X1080 16:9
    Hard Drives
    2 SSD SATA/NVM Express 1.3
    WDS500G2B0A-00SM50 500.1 GB
    WDCSDAPNUW-1002 256 GB
    PSU
    19V DC 6.32 A 120 W
    Cooling
    Dual Fans
    Mouse
    MS Bluetooth
    Internet Speed
    Fiber 1GB Cox -us & 400MB Orange-fr
    Browser
    Edge Canary- Firefox Nightly-Chrome Dev
    Antivirus
    Windows Defender
    Other Info
    VMs of Windows 11 stable/Beta/Dev/Canary
    VM of XeroLinux- Arch based & Debian 12
  • Operating System
    Windows 11 Insider Canary
    Computer type
    Laptop
    Manufacturer/Model
    ASUS X751BP
    CPU
    AMD Dual Core A6-9220
    Motherboard
    ASUS
    Memory
    8 GB
    Graphics card(s)
    AMD Radeon R5 M420
    Sound Card
    Realtek
    Monitor(s) Displays
    17.3
    Screen Resolution
    1600X900 16:9
    Hard Drives
    1TB 5400RPM
Hello,
I can see you have some DOS experience. I wonder what you use the autoexec for.
Anyway, I strongly suggest you use Terminal, which can incorporate Powershell & others.
I find it always repositions the panes correctly.
Thanks for the suggestion. I created a shortcut to Powershell, right clicked on the icon, selected Properties, and then Layout. Here is where we have the chance to both size the window (Height and Width) as well as position it by setting its Left and Top position. Note when you make significant changes to any of those fields, the image in the Preview pane changes, too. For example, press and hold the mouse on (say) the up arrows in the Left Edit box, and see the Preview image move to the right. Then save the settings and double click on the icon. As with CMD.EXE, regardless of which settings are changed, they have no effect.

This appears to be a problem with shortcut properties and is independent of the underlying program, be it cmd.exe or powershell.exe, etc.
 

My Computer

System One

  • OS
    Windows 11 Pro x64
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Made
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    AMD X570 ATX ROG Crosshair VIII Hero
    Memory
    64GB
    Graphics Card(s)
    NVIDIA GeForce RTX 4060 Ti
    Sound Card
    FANGOR Sound Bar, 60W 16-Inch
    Monitor(s) Displays
    Three LG 27" UHD 4K
    Screen Resolution
    3840 x 2160
    Hard Drives
    Four 2TB, one 1TB, two 500GB, one 256GB
    Keyboard
    Keychron Q6 HE 100%
    Internet Speed
    1Gbps/40Mbps
W11 now defaults to opening a CMD or PS shell inside the Terminal app, instead of the familiar Windows Console (conhost). Whereas the Win32 conhost obeyed the shortcut's options, Terminal does not as an UWP app.

You can choose to switch back to Windows Console, using this tutorial:
 

My Computer

System One

  • OS
    Windows 7
W11 now defaults to opening a CMD or PS shell inside the Terminal app, instead of the familiar Windows Console (conhost). Whereas the Win32 conhost obeyed the shortcut's options, Terminal does not as an UWP app.
Thanks for your suggestion. I created a shortcut to conhost.exe and examined its properties. They do not include a Layout section where I can select window size and position, so I'm still looking for a command line program where I can select the corresponding window size and position.
 

My Computer

System One

  • OS
    Windows 11 Pro x64
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Made
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    AMD X570 ATX ROG Crosshair VIII Hero
    Memory
    64GB
    Graphics Card(s)
    NVIDIA GeForce RTX 4060 Ti
    Sound Card
    FANGOR Sound Bar, 60W 16-Inch
    Monitor(s) Displays
    Three LG 27" UHD 4K
    Screen Resolution
    3840 x 2160
    Hard Drives
    Four 2TB, one 1TB, two 500GB, one 256GB
    Keyboard
    Keychron Q6 HE 100%
    Internet Speed
    1Gbps/40Mbps
Try changing the default to conhost (see link below ) and then test your original batch file shortcuts.
 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer
Try changing the default to conhost (see link below ) and then test your original batch file shortcuts.
Interesting suggestion that almost works. I changed the Default Terminal App to "Windows Console Host", opened my previous shortcut to cmd.exe, and indeed it displayed according to the Layout settings. Hooray!

However, after I changed the Layout settings to where I wanted it, and opened the shortcut, it reverted to displaying in the middle of the 2nd screen, not where I had specified. When I went back to Settings where the default behavior of Terminal App is controlled, Windows had changed it back to "Let Windows decide"!

In fact, as further experiment showed, many of the changes to the window properties (such as setting the font or BG color), triggers reversion to "Let Windows decide".

My workaround is to have the Settings>System>For Developers window open, apply a change to the shortcut properties, change the Terminal app default from Console to Terminal and back to Console, then test my changes. Is this what they call progress?

BTW, at some point in this experiment, Win11 slowed to a glacial crawl requiring a System Reset from the case.
 

My Computer

System One

  • OS
    Windows 11 Pro x64
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Made
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    AMD X570 ATX ROG Crosshair VIII Hero
    Memory
    64GB
    Graphics Card(s)
    NVIDIA GeForce RTX 4060 Ti
    Sound Card
    FANGOR Sound Bar, 60W 16-Inch
    Monitor(s) Displays
    Three LG 27" UHD 4K
    Screen Resolution
    3840 x 2160
    Hard Drives
    Four 2TB, one 1TB, two 500GB, one 256GB
    Keyboard
    Keychron Q6 HE 100%
    Internet Speed
    1Gbps/40Mbps
Interesting suggestion that almost works. I changed the Default Terminal App to "Windows Console Host", opened my previous shortcut to cmd.exe, and indeed it displayed according to the Layout settings. Hooray!
Use autohotkey to create a script to launch ps, Cmd or terminal and assign screen positions at launch for them.
 

My Computer

System One

  • OS
    Windows 11 Pro
Interesting suggestion that almost works. I changed the Default Terminal App to "Windows Console Host", opened my previous shortcut to cmd.exe, and indeed it displayed according to the Layout settings. Hooray!

However, after I changed the Layout settings to where I wanted it, and opened the shortcut, it reverted to displaying in the middle of the 2nd screen, not where I had specified. When I went back to Settings where the default behavior of Terminal App is controlled, Windows had changed it back to "Let Windows decide"!

In fact, as further experiment showed, many of the changes to the window properties (such as setting the font or BG color), triggers reversion to "Let Windows decide".

My workaround is to have the Settings>System>For Developers window open, apply a change to the shortcut properties, change the Terminal app default from Console to Terminal and back to Console, then test my changes. Is this what they call progress?
Issue noted here:
Legacy mode + shortcut propsheet may reset Default Terminal setting · Issue #17053 · microsoft/terminal

Another workaround: Set the layout as you want and then change Target to conhost cmd. The layout tab will disappear, but it will honor your last settings. If you wish to change the layout, temporarily change target back to cmd, click OK, reopen, change layout, and then change target back to conhost cmd.

I'll see if I can find a better fix, like a way to set conhost as the permanent, locked down, don't mess with it, default.
 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer

Latest Support Threads

Back
Top Bottom