Sign in to follow this  
Followers 0
this-is-me

Problem with FileSelectFolder

14 posts in this topic

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?

Share this post


Link to post
Share on other sites



Just wondering... Should I go ahead and post this to the bugs?


Who else would I be?

Share this post


Link to post
Share on other sites

I'm going to test this tomorrow at work to see if I get this too.

Share this post


Link to post
Share on other sites

Good idea to blank it out.

Share this post


Link to post
Share on other sites

I can confirm. The function returns an empty string when I select a computer.

Share this post


Link to post
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...


I have a catapult. Give me all the money or I will fling an enormous rock at your head.

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

Did you tried pointing it to a \\servername more than a generic My network places?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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.


Who else would I be?

Share this post


Link to post
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)

Share this post


Link to post
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 ))

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

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

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