Click here to Skip to main content
15,887,175 members
Home / Discussions / C#
   

C#

 
GeneralRe: Error 404 Pin
Dan Neely4-Jun-07 11:25
Dan Neely4-Jun-07 11:25 
GeneralRe: Error 404 Pin
vunhat4-Jun-07 11:29
vunhat4-Jun-07 11:29 
GeneralRe: Error 404 Pin
Jasmine25014-Jun-07 11:35
Jasmine25014-Jun-07 11:35 
QuestionHTML Parsing question Pin
bs99994-Jun-07 7:02
bs99994-Jun-07 7:02 
AnswerRe: HTML Parsing question Pin
Jasmine25014-Jun-07 7:44
Jasmine25014-Jun-07 7:44 
QuestionMaking DTS Package in C#? Pin
Gul_#4-Jun-07 6:09
Gul_#4-Jun-07 6:09 
QuestionFTP Upload, problem to close stream Pin
wojti4-Jun-07 6:05
wojti4-Jun-07 6:05 
QuestionDeleting log file using WMI ? Pin
Software_Specialist4-Jun-07 5:36
Software_Specialist4-Jun-07 5:36 
hi well i have written a code to connect to remote machine and stop a particular service so that i could delete its log file.I am able to connect to remote machine and stop the service but i am not getting the exact command to delete the log file.
Pls look at the code below...
<br />
using System.Management; <br />
----- <br />
               connOptions = new ConnectionOptions(); <br />
               connOptions.Impersonation = ImpersonationLevel.Impersonate; <br />
               connOptions.EnablePrivileges = true; <br />
               myScope = new ManagementScope("\\\\" + SelectedComputer + "\\ROOT\\CIMV2", connOptions); <br />
               object[] arrParams ={ "Del /q C:\\WINDOWS\\system32\\CCM\\Logs\\execmgr.log" }; //net stop ccmexec //net start ccmexec<br />
               try <br />
               { <br />
                   manageClass =new ManagementClass(myScope, new ManagementPath("Win32_Process"), new ObjectGetOptions()); <br />
                   manageClass.InvokeMethod("Create", arrParams); <br />
<br />
               } <br />
               catch <br />
               { <br />
                   MessageBox.Show("Access Denied or System couldn't be contacted!"); <br />
               } <br />


If you ll look at this particular line
<br />
object[] arrParams ={ "Del /q C:\\WINDOWS\\system32\\CCM\\Logs\\execmgr.log" }; //net stop ccmexec //net start ccmexec<br />

I am trying to delete this log like via this command but it isnt working where as i can start and stop the service of the remote machine via "net start ccmexec" and "net stop ccmexec"

I have tried this in local machine aswell and i am unable to delete the file..I guess there is something to do with delete command...????

Could anyone please shed some light over it...

Thanks a lot
QuestionnUnit & C# express Pin
Justin Perez4-Jun-07 4:25
Justin Perez4-Jun-07 4:25 
AnswerRe: nUnit & C# express Pin
Bekjong4-Jun-07 4:32
Bekjong4-Jun-07 4:32 
AnswerRe: nUnit & C# express Pin
Paul Conrad4-Jun-07 6:05
professionalPaul Conrad4-Jun-07 6:05 
Questionxml serialization problem in c# Pin
ksrs4-Jun-07 4:15
ksrs4-Jun-07 4:15 
AnswerRe: xml serialization problem in c# Pin
Sathesh Sakthivel4-Jun-07 4:22
Sathesh Sakthivel4-Jun-07 4:22 
GeneralRe: xml serialization problem in c# Pin
ksrs4-Jun-07 5:03
ksrs4-Jun-07 5:03 
GeneralRe: xml serialization problem in c# Pin
Sathesh Sakthivel4-Jun-07 5:54
Sathesh Sakthivel4-Jun-07 5:54 
QuestionRe: xml serialization problem in c# Pin
ksrs5-Jun-07 5:08
ksrs5-Jun-07 5:08 
AnswerRe: xml serialization problem in c# Pin
Sathesh Sakthivel5-Jun-07 15:21
Sathesh Sakthivel5-Jun-07 15:21 
AnswerRe: xml serialization problem in c# Pin
Jaiprakash M Bankolli4-Jun-07 7:16
Jaiprakash M Bankolli4-Jun-07 7:16 
QuestionRe: xml serialization problem in c# Pin
ksrs5-Jun-07 5:17
ksrs5-Jun-07 5:17 
Questionmultiple form indows application in C# Pin
sanki7794-Jun-07 3:09
sanki7794-Jun-07 3:09 
AnswerRe: multiple form Windows application in C# Pin
sanki7794-Jun-07 3:09
sanki7794-Jun-07 3:09 
AnswerRe: multiple form indows application in C# Pin
Colin Angus Mackay4-Jun-07 3:18
Colin Angus Mackay4-Jun-07 3:18 
GeneralRe: multiple form indows application in C# Pin
sanki7794-Jun-07 3:40
sanki7794-Jun-07 3:40 
QuestionWorking with the MS Office Interop Assemblies --- Need help Pin
Xprt4-Jun-07 2:03
Xprt4-Jun-07 2:03 
AnswerRe: Working with the MS Office Interop Assemblies --- Need help Pin
kubben4-Jun-07 2:22
kubben4-Jun-07 2:22 

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.