Computer Hope

Microsoft => Microsoft Windows => Windows XP => Topic started by: Osman on December 06, 2007, 06:45:22 AM

Title: How to share a folder in command line?
Post by: Osman on December 06, 2007, 06:45:22 AM
Hello,

How can I share a folder in Documents And Settings with full permission via XP command line? 
Why do I need this? Because, I will have a batch file to install a program, which must be under Documents and Settings directory.

C:\NET SHARE myfolder=C:\myfolder           <-  This works.

But when I try to share a folder in Documents And Settings directory, the folder doesn't have writing permission but reading. I can't write in it.

My command is :
C:\NET SHARE myfolder=C:\Docume~1\myfolder    (Documents And Setting\myfolder)

Or, is there a way to make a reg file to share a folder with full permission?

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\lanmanserver\Shares]

Thank you,

Osman
Title: Re: How to share a folder in command line?
Post by: TheManFrom on December 06, 2007, 07:03:28 AM
Try using the runas command to run this command as an administrator