New
#11
The /e switch doesn't actually change it to details view if the folder was last closed in a different view.
The following script will open in list view. Copy the code to a text file, change the bold text to the correct values and save as filename.vbs. It's not via the cmd line but it's the only option I know of.
I did try to open in details view and send CTRL + Numpad Plus and I could send CTRL + Plus Sign but it did not work, I couldn't find a way to send the correct Numpad Plus.Code:Dim WshShell Set WshShell = WScript.CreateObject("WScript.Shell") 'Set the String to run and run it. WshShell.run """X:\folder\sub folder""" 'Wait until the application has loaded - Check every second While WshShell.AppActivate("folder name") = FALSE wscript.sleep 1000 Wend 'Bring the application to the foreground and wait 1 second WshShell.AppActivate "folder name" WScript.Sleep 1000 'Send ALT+V then the L key to bring down the view menu and change 'to list view then wait half a second WshShell.SendKeys "%VL" WScript.Sleep 500 'Cleanup Set WshShell = Nothing
I did post the question on a different forum so if I get an answer I update here but it looks like it may not be possible.
EDIT: You can then put this script into your Start Menu startup folder. If you find this isn't working it might be because on startup other programs that are loading are taking focus away from the Explorer window. You can try to counteract that by adding a new line "wscript.sleep 60000" as the first line to wait 1min before running the rest then reduce the wait until it no longer works and fine tune it with 5-10sec longer for the odd slower startup.