Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enable File&Print Sharing on multiple machines

Status
Not open for further replies.

insanity1

Technical User
Nov 30, 2004
40
CA
Is there a way to enable file and print sharing on a machine using a registry hack or through group policy?

We have a couple hudred XP machines that were rolled out with file and print sharing disabled... and now we need to re-enable it in order to manage VirusScanning with ePolicy Orchestrator.

A registry hack would work well... we could then roll it out in a matter of minutes with our remote software distribution tool. Group Policy would be even better.

Thanks in advance for any input. Until then, I'll continue with my searching...
 
The following commands should do it, provided that the user account that the script is being run under has Administrator level access to the machine (required to change service status):

sc config lanmanserver start= auto
sc config lanmanworkstation start= auto
net start server
net start "Computer Browser"

Note the space between the = symbol and auto in the first two lines, this is necessary.
The first line sets the status to auto start at next reboot for the server service, the second does it for the computer browser. The last two lines start them running (alternatively leave them off and wait for the machines to reboot).

John
 
Thank you,

I have executed the commands that you specified (with admin priviledges). This did not enable file and print sharing on my computer... any other ideas?

 
What do you mean "disabled?" My code above will enable the server and computer browser services (which effectively are the file and printer sharing for microsoft networks and client for microsoft networks respectively).

Has the file and printer sharing for Microsoft networks been unbound from the network connection properties (if you go start -> network and dialup connections -> local area connection and choose Properties, the "File and Printer Sharing for Microsoft networks" is unticked?)

John
 
Yes, it is 'unticked'. This is what I was wanting to enable on multiple machines through a script.

I have since come up with a resolution:

**Remove the Server service from the PC:
snetcfg_wxp -u MS_Server

**Install the Server service to the PC:
snetcfg_wxp -l %windir%\inf\netserv.inf -c s -i MS_Server

This will enable File and Print sharing by default. We have scripted this and pushed it down to all of the machines requiring the setting to be enabled for remote administration.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top