Computing.Net > Forums > Windows XP > Create a Simple file share from command line

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Create a Simple file share from command line

Reply to Message Icon

Name: gtzpower
Date: June 1, 2009 at 15:09:15 Pacific
OS: Windows XP
Subcategory: General
Comment:

Does anyone know the command to make a simple file share at the command prompt? I need the share to be accessible by all, just as if I had opened file sharing on a particular folder and choose "just enable file sharing" (e.g. http://www.practicallynetworked.com... but from a command prompt. I am a programmer, so if there is a particular registry key i can change to accomplish this or something of that nature, that would be welcome information too, though command line option is preferred. Thanks!



Sponsored Link
Ads by Google

Response Number 1
Name: wanderer
Date: June 1, 2009 at 15:37:09 Pacific
Reply:

Investigate commands
net share
net use


0

Response Number 2
Name: gtzpower
Date: June 1, 2009 at 16:08:31 Pacific
Reply:

been trying that for the last 4 hours. I've even tried getting rmtshare.exe from the windows resource kit. I cannot get any of these to create a SIMPLE share that does not require authentication. :(


0

Response Number 3
Name: wanderer
Date: June 1, 2009 at 16:25:21 Pacific
Reply:

"that does not require authentication"

Good luck with that as in isn't going to happen.

It is a requirement to authenicate before you can access a share. Part of authenication is what rights/what groups you belong to and what level of access you are granted at each level.

You can set the share to be to everyone with full control. That is complete and open access.

You then have to authenicate either as Guest [if enabled] or User [logon account] to then gain access to the share.

Windows 9x days are long gone.


0

Response Number 4
Name: gtzpower
Date: June 2, 2009 at 06:45:45 Pacific
Reply:

I CAN do what I want in XP. In my first post, I gave a link for an example of what I want to recreate. I can go into the folders properties, enable file sharing, and then go to another machine and open the share right up with no prompt for credentials.

Its "Simple File Sharing" with level 5 access
http://support.microsoft.com/kb/304040

If I follow the GUI method to setup the share, anything with an ip in the same network can get right in with no credentials prompt. This is the type of a share I need.

Any idea how to do it from a command line or program?


0

Response Number 5
Name: gtzpower
Date: June 2, 2009 at 08:08:04 Pacific
Reply:

Ok, the command below appears to make everything in the gui look right, but I get access denied errors on the share until I go into folder properties -> Sharing tab, change ANYTHING and change it back (so the apply button will enable), then hit apply and only then can I access the share. This is so frustrating :(

rmtshare \\PCCHIPS\share="C:\Program Files\Microsoft SQL Server" /grant everyone:f


0

Related Posts

See More



Response Number 6
Name: gtzpower
Date: June 2, 2009 at 08:37:17 Pacific
Reply:

Edit: Well, this is only part of the solution. it doesn't work on machines that don't have simple file sharing enabled already. Gotta figure that out still, but will post back :(

FINALLY ! :)


If i first run:
rmtshare \\PCCHIPS\movieMaker="C:\Program Files\Movie Maker" /grant everyone:f

Then run (exe from http://setacl.sourceforge.net/):
SetACL.exe -on "\\PCCHIPS\movieMaker" -ot file -actn ace -a
ce "n:S-1-1-0;p:full;s:y"

I get the share I need without any prompt for permissions now. Basically, were creating the share giving everyone full permissions, then using SetACL to rewrite the permissions? Not sure why I need to do it this way, but it works! :)

Thanks for reading and replying wanderer.

EDIT:
As an alternative to using rmtshare, I did find that net share works in combination with SetACL.exe just as well:

net share movieMaker="C:\Program Files\Movie Maker"


0

Sponsored Link
Ads by Google
Reply to Message Icon

Chrome browser Applications not running.



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: Create a Simple file share from command line

Simple file sharing - not! www.computing.net/answers/windows-xp/simple-file-sharing-not/81357.html

Simple file sharing won't stay off www.computing.net/answers/windows-xp/simple-file-sharing-wont-stay-off/111836.html

Need help creating a batch file www.computing.net/answers/windows-xp/need-help-creating-a-batch-file/172372.html