The key here is a little program called "snetcfg" which allows you to add or remove services to the windows networking system. I'm assuming snetcfg stands for "service net configurator" or something like that. Now, this program in itself can't actually check that little box that we've been discussing rather we are going to leverage some of windows' default behaviors against it.
When windows installs a service it enables it by default, what we will be accomplishing with snetcfg is that we will be uninstalling the File and Printer Sharing service and then re-installing it. Once Windows has re-installed the service it enables it by default.
Here's how we do it:
- Grab snetcfg.zip
- The command line to uninstall Win2K File and Printer Sharing Service is:
- snetcfg.exe -v -u MS_Server
- The command line to re-install Win2K File and Printer Sharing Service is:
- snetcfg.exe -l %windir%\Inf\NETSERV.INF -c s -i MS_Server
No comments:
Post a Comment