Click here to Skip to main content
15,906,645 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to convert this into c# Pin
Guffa6-Jun-08 2:54
Guffa6-Jun-08 2:54 
GeneralRe: how to convert this into c# Pin
Vasudevan Deepak Kumar6-Jun-08 3:36
Vasudevan Deepak Kumar6-Jun-08 3:36 
GeneralRe: how to convert this into c# Pin
Gareth H6-Jun-08 3:41
Gareth H6-Jun-08 3:41 
GeneralRe: how to convert this into c# Pin
Brady Kelly6-Jun-08 4:12
Brady Kelly6-Jun-08 4:12 
GeneralRe: how to convert this into c# Pin
CPallini6-Jun-08 3:49
mveCPallini6-Jun-08 3:49 
AnswerRe: how to convert this into c# Pin
Pete O'Hanlon6-Jun-08 3:49
mvePete O'Hanlon6-Jun-08 3:49 
Questionsending remainder mail at regular intervals Pin
fakeer4uever6-Jun-08 2:02
fakeer4uever6-Jun-08 2:02 
AnswerRe: sending remainder mail at regular intervals Pin
Ashfield6-Jun-08 2:27
Ashfield6-Jun-08 2:27 
AnswerRe: sending remainder mail at regular intervals Pin
Russell Jones6-Jun-08 2:52
Russell Jones6-Jun-08 2:52 
AnswerRe: sending remainder mail at regular intervals Pin
Gareth H6-Jun-08 3:20
Gareth H6-Jun-08 3:20 
AnswerRe: sending remainder mail at regular intervals Pin
Vasudevan Deepak Kumar6-Jun-08 3:40
Vasudevan Deepak Kumar6-Jun-08 3:40 
AnswerRe: sending remainder mail at regular intervals Pin
#realJSOP6-Jun-08 3:44
professional#realJSOP6-Jun-08 3:44 
QuestionTransmission of Video File Pin
DeepOceans6-Jun-08 1:24
DeepOceans6-Jun-08 1:24 
AnswerRe: Transmission of Video File Pin
#realJSOP6-Jun-08 1:41
professional#realJSOP6-Jun-08 1:41 
Questionusing Microsoft.Office.Interop.Word.Document Pin
ShimnaMukundan6-Jun-08 1:24
ShimnaMukundan6-Jun-08 1:24 
QuestionStart Window Services Pin
Tejal Bhavsar6-Jun-08 1:08
Tejal Bhavsar6-Jun-08 1:08 
AnswerRe: Start Window Services Pin
Programm3r6-Jun-08 1:32
Programm3r6-Jun-08 1:32 
GeneralRe: Start Window Services Pin
Tejal Bhavsar6-Jun-08 1:56
Tejal Bhavsar6-Jun-08 1:56 
AnswerRe: Start Window Services Pin
#realJSOP6-Jun-08 1:42
professional#realJSOP6-Jun-08 1:42 
GeneralRe: Start Window Services Pin
Tejal Bhavsar6-Jun-08 2:17
Tejal Bhavsar6-Jun-08 2:17 
i have start my service via this code
System.ServiceProcess.ServiceController serviceController = new System.ServiceProcess.ServiceController(svcName);
            
            if (serviceController.Status == ServiceControllerStatus.Stopped)
            {
                serviceController.MachineName = Environment.MachineName;
               
                serviceController.ServiceName = svcName;

                ConnectionOptions coOptions = new ConnectionOptions();
                coOptions.Impersonation = ImpersonationLevel.Impersonate;

                ManagementScope mgmtScope = new System.Management.ManagementScope(@"\\" + Environment.MachineName + @"\root\CIMV2", coOptions);
                mgmtScope.Connect();

                ManagementObject wmiService = new ManagementObject("Win32_Service.Name='" + svcName + "'");

                ManagementBaseObject InParam = wmiService.GetMethodParameters("Change");
                InParam["DesktopInteract"] = true;

                ManagementBaseObject OutParam = wmiService.InvokeMethod("Change", InParam, null);

                serviceController.Start();
            }



and at last line i got error like this

Cannot start service Kerverus on computer 'PC3'.

and i am installing my service via administrator
GeneralRe: Start Window Services Pin
#realJSOP6-Jun-08 3:48
professional#realJSOP6-Jun-08 3:48 
QuestionCustom protocol handler Pin
asma_panjabi6-Jun-08 0:49
asma_panjabi6-Jun-08 0:49 
QuestionHow to know nbr of pages to print Pin
Kr_Chandan5-Jun-08 23:49
Kr_Chandan5-Jun-08 23:49 
AnswerRe: How to know nbr of pages to print Pin
Pete O'Hanlon6-Jun-08 1:45
mvePete O'Hanlon6-Jun-08 1:45 
GeneralRe: How to know nbr of pages to print Pin
Kr_Chandan6-Jun-08 2:34
Kr_Chandan6-Jun-08 2:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.