Jump to content

Problem with FileSelectFolder


Recommended Posts

I have a script I am using where I would like to allow the user to select a remote computer and have that input in my gui. The problem is that the user must select a folder on the remote computer instead of the computer itself for the function to return anything besides a blank.

FileSelectFolder("Please select a system to connect to:", "::{208D2C60-3AEA-1069-A2D7-08002B30309D}")

The problem is that if you select a computer as in the following screenshot, it returns blank.

[i had to block out the names for security]

Who else would I be?
Link to comment
Share on other sites

Mr. Wizard you have brought up a very good point. I didnt even think about that.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

The reason I need it is to SELECT a computername, not to select a folder that is shared on the computer. If this is not at all possible, I can accept defeat, but I would think it should be possible.

<{POST_SNAPBACK}>

See how ezzetabi is doing it...

Strange. I have no problems in both ways (My network places or \\computername).

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

I don't think this is a bug, is it?  The point of it is to select a folder, and a computer isn't a folder...

<{POST_SNAPBACK}>

Perhaps you are right.

Alternative: Select a shared folder and extract the name.

(Here, you need select a shared folder)

$sharedF= FileSelectFolder("Please select a system to connect to:", "::{208D2C60-3AEA-1069-A2D7-08002B30309D}")
If NOT @error Then MsgBox(0, "", StringLeft( $sharedF, StringInStr($sharedF, '\', -1, 3) - 1 ))
Link to comment
Share on other sites

Yea, I am already using a similar workaround, selecting a share. The problem is that if all the shares are hidden, (ie. c$, admin$) then the share cannot be selected. Therefore, I need to be able to simply select the computer name.

Who else would I be?
Link to comment
Share on other sites

Yea, I am already using a similar workaround, selecting a share. The problem is that if all the shares are hidden, (ie. c$, admin$) then the share cannot be selected. Therefore, I need to be able to simply select the computer name.

<{POST_SNAPBACK}>

I understand. I hope there's a solution for this.

Maybe something has to chnage internaly to the function.

I'll Google some. Maybe I can find something.

If the BIF_RETURNONLYFSDIRS flag is set in the ulFlags member of the BROWSEINFO structure, the OK button will remain enabled for "\\server" items, as well as "\\server\share" and directory items. However, if the user selects a "\\server" item, passing the returned PIDL to SHGetPathFromIDList fails.

Converts an item identifier list to a file system path.

Remarks

If the location specified by the pidl parameter is not part of the file system, this function will fail.

If the pidl parameter specifies a shortcut, the pszPath will contain the path to the shortcut, not to the shortcut's target.

Edited by SlimShady
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...