Sign in to follow this  
Followers 0
rexx

Get special folders' CLSID from FileSelectFolder()

7 posts in this topic

Hi,

Can I get the CLSIDs of special folders (Computer, Control Panel...etc.) from FileSelectFolder()?

In the doc it's possible to set root of FileSelectFolder() by CLSIDs, but when I select a special folder, I'll get name of it instead of CLSID.

Is it possible?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

You mean this?

$MyDocsFolder = "::{450D8FBA-AD25-11D0-98A8-0800361B1103}"
FileSelectFolder("Select",$MyDocsFolder)
Edited by Andreik

When the words fail... music speaks

Share this post


Link to post
Share on other sites

No, I mean

$var = FileSelectFolder("Select","")

and selecting a special folder, $var gets its name (e.g. My Document), instead of its CLSID.

My question is how to get the CLSID of the selected special folder.

Share this post


Link to post
Share on other sites

Thanks.

But there are some special folders not in the table.

For example, "Control Panel" in Windows 7 is "::{26EE0668-A00A-44D7-9371-BEB064C98683}"

It's not in the appendix.

Can I get it from the system?

Share this post


Link to post
Share on other sites

Thanks.

But there are some special folders not in the table.

For example, "Control Panel" in Windows 7 is "::{26EE0668-A00A-44D7-9371-BEB064C98683}"

It's not in the appendix.

Can I get it from the system?

Maybe this could be helpful.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Answering myself: Use COM

Local $oShell = ObjCreate("Shell.Application")
Local $oFolder = $oShell.BrowseForFolder(0, "Select Folder", 0)
if IsObj($oFolder) then
    Local $sName = $oFolder.Self.Name
    Local $sPath = $oFolder.Self.Path
    MsgBox(0, "Select Folder", "Name:   " & $sName & @CRLF & "Path: " & $sPath)
endif

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0