Sign in to follow this  
Followers 0
Bokkie

Is It Possible To Create A Shared Folder?

6 posts in this topic

I can use

DirCreate
to create a folder but I'd like to be able to enable sharing on it after I've created it. Does anyone know if that's possible to do?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

; Probably requires Windows 2000 or XP

$dirPath = DirCreate("c:\something\whatever")

Run("cmd /c net share MYSHARE=" & $dirPath)

Here's the ref: http://www.microsoft.com/resources/documen...e.mspx?mfr=true

Edited by CyberSlug

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I'm curious about the folder icon. If I share a folder like this: net share Temp:C:\Temp I can right-click the properties after I've shared and see that it has done so. I then unshared and then did the share using the right-click route in the Explorer. The sharing property tab is seemingly identical in content as net share configures it but only when I do the share via the Explorer do I get the hand icon appearing under the folder icon.

I can't see anything in the help for net share that enables the icon but does anyone know how I can do that? This would be important and gives the SA visual confirmation that there has been a share applied to the folder.

Edit: I also noticed that if I run net share Temp /delete the share is removed but it does not remove the hand icon. I'm getting the idea that net share makes no difference to the icon under any condition?

Edited by Peter Hamilton-Scott

Share this post


Link to post
Share on other sites

in my testing it just takes a little time and the hand shows up


[u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

I just reshared it with net share. It's now 21:40 my time and there's no hand icon as yet. I will report back in a little while...

Edit: I'm running XP SP2 if that makes any difference.

Edit: It's now 21:51 and the hand icon has now appeared! Last time I looked there was no sign of it after five minutes. Perhaps I need to reboot...

Edited by Peter Hamilton-Scott

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