frew Posted September 3, 2019 Posted September 3, 2019 Hello, Can someone please tell me what the path to "This PC" is? I have a script that works fine to open folders with lines like this: ShellExecute("C:\Program Files") ...but I don't know what path (or Macros?) to use to show all the drives at once, like when I click on the "This PC" icon shortcut. Thanks.
alienclone Posted September 3, 2019 Posted September 3, 2019 This PC is not a path. a quick search in AutoIt for "list all drives" gave me the function DriveGetDrive. If @error Then MsgBox(262192, "", @ComputerName & " slaps " & @UserName & " around a bit with a large trout!") EndIf "Yeah yeah yeah patience, how long will that take?" -Ed Gruberman REAL search results | SciTE4AutoIt3 Editor Full Version
Subz Posted September 3, 2019 Posted September 3, 2019 You can use something like: ShellExecute(@WindowsDir & "\explorer.exe", '/e,::{20d04fe0-3aea-1069-a2d8-08002b30309d}')
Gianni Posted September 3, 2019 Posted September 3, 2019 (edited) or also simply ShellExecute("::{20D04FE0-3AEA-1069-A2D8-08002B30309D}") have a look here for other folders : https://www.autoitscript.com/autoit3/docs/appendix/clsid.htm or search for GUID shortcuts on google or (better) on https://duckduckgo.com/ Edited September 3, 2019 by Chimp GUID Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
frew Posted September 3, 2019 Author Posted September 3, 2019 14 hours ago, alienclone said: This PC is not a path. a quick search in AutoIt for "list all drives" gave me the function DriveGetDrive. This does not seem to open the window "This PC". Not sure how to get that to do this.
frew Posted September 3, 2019 Author Posted September 3, 2019 9 hours ago, Subz said: You can use something like: ShellExecute(@WindowsDir & "\explorer.exe", '/e,::{20d04fe0-3aea-1069-a2d8-08002b30309d}') This one does open "This PC" windows, but forces Navigation pane to always be enabled it seems.
frew Posted September 3, 2019 Author Posted September 3, 2019 8 hours ago, Chimp said: or also simply ShellExecute("::{20D04FE0-3AEA-1069-A2D8-08002B30309D}") have a look here for other folders : https://www.autoitscript.com/autoit3/docs/appendix/clsid.htm or search for GUID shortcuts on google or (better) on https://duckduckgo.com/ This does what I want. Opens "This PC" window, and also allows Windows to remember my view settings to have navigation pane disabled. With a search for search for GUID shortcuts I noticed this page: https://www.tenforums.com/tutorials/3123-clsid-key-guid-shortcuts-list-windows-10-a.html Will explore these a bit.
NassauSky Posted October 2, 2021 Posted October 2, 2021 This thread just caught my eye as I'm having the same problem. Anyone have a solution. There was no magic CLSID but I noticed what I think is a quirk. The MY COMPUTER CLSID worked for FolderOpenDialog yet it didn't work for FileOpenDialog. Any other ideas?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now