Help to create Script to create shares - Windows xp or SBS

I have a Windows xp pro pc connected to a Small Business Server 2003 domain.  
There are 5 usb drives connected to the XP Pro machine.
Four of the drives have shares on them.

Each time  this XP pro machine is rebooted, all the shares on the usb drives disappear. I have to manually recreate them and assign the correct permissions.  

I have searched in Experts-Exchange, I cannot find a suitable solution.

I assume some sort of script could perform this task.  I am a script novice.

1.) What commands would I enter into a script to create the share and assign permissions?

2.) What type of script should this be?  (logon script?  local script on the XP machine?  )

3.) What is the best way to invoke this script?

4.)  Perhaps someone has a script they could share?
donpickAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Manjunath SulladTechnical ConsultantCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Seth SimmonsSr. Systems AdministratorCommented:
from the command line, you can use net share

only problem is, the /grant option only became available in windows 7 which means in xp you can't specify share permissions.  by default it will grant everyone full control yet would be superseded by the file system permissions

if you wanted to share f:\foo then you would do net share sharename=f:\foo and just repeat for the shares on the other drives.  you could put those statements in a batch file on the desktop or your own login script.  it's simple but works to the extent xp command allows for; though might not be entirely what you need.  doing net share /? will give you the full syntax.  you could look at the links above if you want to try with powershell or vb script
0
Cris HannaSr IT Support EngineerCommented:
How big are these drives?  The real solution is to move the data onto the SBS sever or a NAS unit
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

ZabagaRCommented:
If you use the net share command as seth2740 suggested, you can kick off that "net use" script through windows scheduled tasks. That way the script will share your folders at the start up of the XP machine. From explorer, go to c:\windows\tasks (or run scheduled tasks from the control panel).
Add a new task. Have it run the batch file that contains your "net share" statements. Choose the option to run it when the computer starts up. Then just 'next' through until you've added the task.
0
Larry Struckmeyer MVPCommented:
Agreeing with CrisHanna_MVP.  Data stored on external USB drives is data loss wating to happen.  And pointing out that scheduled tasks are unnecessary when you can place the net use commands in the logon script in Server /SBS 2003.  Scheduled tasks just complicates it.

But if you have important informatio on external USB drives that are not mirrored and not backed up, you will not be happy when (not if) those drives fail.
0
donpickAuthor Commented:
Thank you all for your help and advice.  It finally occurred to me the shares on the usb drives should not be disappearing after a reboot.  Some procedure or configuration must be wrong.  I checked the boot order on the affected pc.  The C drive was 4th in line.  Stupid me.  I made it first in line and now the problem is solved.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows XP

From novice to tech pro — start learning today.