RE: Checking File and Print Sharing

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Felix Wang (v-felwa_at_online.microsoft.com)
Date: 08/16/04


Date: Mon, 16 Aug 2004 07:29:58 GMT

Hello Jeff,

Thanks for posting. I think basically you are talking about the issue
addressed in the following article:

You Cannot Install MSDE 2000 if the Server Service Is Not Running
http://support.microsoft.com/?id=829386

The key here is that we need to ensure the "Server" service is running,
instead of installing "File and Printer Sharing" feature. We may make use
of the "System.ServiceProcess.ServiceController" class:

         ServiceController sc = new ServiceController("Server");
         Console.WriteLine("The Server service status is currently set to
{0}",
                           sc.Status.ToString());

Or use WMI with VBScript:

Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set colSettings = objWMIService.ExecQuery _
    ("SELECT * FROM Win32_Service WHERE DisplayName='Server'")
For Each objService in colSettings
  MsgBox objService.State
Next

I hope the information is useful to you.

Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.



Relevant Pages

  • Re: Shared files disconnect.
    ... Wouldn't it be the Server Service in this case? ... > To enable/disable the network connection to local computer, ... > administrative tools>services, start/stop server service. ... > This posting is provided "AS IS" with no warranties. ...
    (microsoft.public.windows.server.networking)
  • RE: fail to install MSDE on XP Pro
    ... What do you mean by "When I install MSDE"? ... From command prompt, by running the setup.exe with the ... number/exact error message text received, ... This posting is provided "AS IS" with no warranties, ...
    (microsoft.public.sqlserver.msde)
  • Server Service
    ... My Server service doesn't exist. ... install MSDE and it kept failing and it turns out the ... reason why is that it relies on the Server service. ...
    (microsoft.public.windowsxp.security_admin)
  • Knowledge Base-article - 829386 - Hotfix where to find it ?
    ... I need to find the Hotfix as stated in this artickel Knowledge Base-article - 829386 ... (You Cannot Install MSDE 2000 if the Server Service Is Not Running) ...
    (microsoft.public.sqlserver.msde)