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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot install Microsoft Network File and Print Sharing 1

Status
Not open for further replies.

grittyminder

IS-IT--Management
Oct 18, 2005
53
JP
Hi there,

I'm trying to write a script that automatically installs/enables Microsoft Network File and Print Sharing using snetcfg.

I was able to get the uninstall component to work (i.e. snetcfg.exe -v -u MS_Server). NOTE: in order to able to enable File/Print Sharing apparently you first need to uninstall it. However, was unable complete the re-install (i.e. snetcfg.exe -v -l %windir%\Inf\NETSERV.INF -c s -i MS_Server). When I run the above command I get an access denied error message, even when logged in as a local administrator user.

When I try to install the File/Print Sharing service via network connections I get a similar access denied error message, even if I browse and manually locate the NETSERV.INF file. NTFS permissions on C:/Windows indicate nothing out of the ordinary (e.g. administrators and SYSTEM users have full control, etc).

I'm not sure what to do next... any ideas?
 
programantically enable file sharing - why doesn't snetcfg.exe work?

This talks about AutoKey and Autoit among other things.
Using NCPA.CPL to access Local Area Conn. properties
thread779-1344954

A problem you might be experiencing could concern Registry Access Permissions?
 
Thank you for your reply. For the time being I've given up on writing a script to automatically install file/print sharing (wasn't really necessary anyways). I just want to install file/print sharing on my local computer again! Programatically, manually, any way is okay with me. So clearly something is wonky with permissions someplace. So you think that I should look at Registry Access Permissions? That sounds like a good start--how do I look at the registry access permisions?
 
Is File and Print Sharing enabled in your LAN Properties? What is happening when you manually try to enable it? Are any security type programs preventing you from doing this? Try it from "Safe Mode with Networking"

Any settings coming in to play from "Network Connections" in Group Policy?

Disable File and Print Sharing in network via Registry.

Make sure the necessary Services are Started and running, this site will help you with that. Look at Services like, Computer Browser, Workstation, and Server, all should be Started and set to Automatic.

 
Thank you for your reply.

> Is File and Print Sharing enabled in your LAN
> Properties? What is happening when you manually try to
> enable it?

File and Print Sharing does not exist (its been uninstalled). When I try to reinstallit via LAN Properties I get a permissions error.

> Are any security type programs preventing you from doing
> this? Try it from "Safe Mode with Networking"

I'm not aware of any security programs that would prevent me from installing File and Print Sharing. I suppose I could try Safe Mode if it came down to it...

> Any settings coming in to play from "Network Connections"
> in Group Policy?

There is a firewall policy in place to allow firewall exceptions for File and Print Sharing. I don't know if this could be interfering with the reinstall in some way. I'll give it a look...

> Disable File and Print Sharing in network via Registry.
>
I looked for the registry entry described in the above link but could find none (probably thanks to me having uninstalled File and Print Sharing!).

> Make sure the necessary Services are Started and running,
> this site will help you with that. Look at Services
> like, Computer Browser, Workstation, and Server, all
> should be Started and set to Automatic.
>
The Server service does not appear to exist (possibly because I uninstalled File and Print Sharing? I'm not sure if the Server service is a File/Print sharing component.)

ADDED: It seems that I cannot install _any_ new network related components via LAN Properties (e.g. NetWare Client Service, TCP/IP V6, etc.). Whoa. How do I check the user permissions for configuring LAN Properties?
 
> Any settings coming in to play from "Network Connections"
> in Group Policy?

Okay, at your suggestion I decided to investigate Group Policy a bit more. I found something a bit suspicious with the device driver load/unload local policy security setting. I can't do anything to change it right now, but I'll find out later if the setting is indeed the culprit...
 
Just a note on Registry Permissions, it is pretty much the same as File Access Permissions, you just right-click on the Key name and then click on Permissions and then set them appropriately.

I'm a bit worried that you don't have the Server Service running.

This thread looks at failure of the Server Service and ties it in with that Snetcfg.exe you mentioned earlier and asks this relevant question, "See if the file srvsvc.dll is present in %SystemRoot%\System32\ folder?".

Unable to browse network.
thread779-1259718

That BlackViper site linked to earlier has files to download that contain the default services that can be merged into the Registry. They may be worth considering.
 
It turns out that the problem was related to group policy. Specifically, Administrators had been accidentally removed from the device driver load/unload security setting. Once Administrators was added back the policy, I was able to reinstall file/print sharing.

Also, as it turned out, once I reinstalled file/print sharing the Server service reappeared in the services list. What a relief!

linney, thank you for your help.
 
You're welcome, glad it is now all working for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top