Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
GeneralRe: Trashing the content of managed variables Pin
OriginalGriff15-Jun-09 4:44
mveOriginalGriff15-Jun-09 4:44 
GeneralRe: Trashing the content of managed variables Pin
Rob Philpott15-Jun-09 5:41
Rob Philpott15-Jun-09 5:41 
GeneralRe: Trashing the content of managed variables Pin
OriginalGriff15-Jun-09 5:59
mveOriginalGriff15-Jun-09 5:59 
GeneralRe: Trashing the content of managed variables Pin
led mike15-Jun-09 9:26
led mike15-Jun-09 9:26 
AnswerRe: Trashing the content of managed variables Pin
PIEBALDconsult15-Jun-09 5:47
mvePIEBALDconsult15-Jun-09 5:47 
GeneralRe: Trashing the content of managed variables Pin
OriginalGriff15-Jun-09 5:56
mveOriginalGriff15-Jun-09 5:56 
GeneralRe: Trashing the content of managed variables Pin
PIEBALDconsult15-Jun-09 8:18
mvePIEBALDconsult15-Jun-09 8:18 
QuestionAdd String attrribute to File Pin
hirenkshah15-Jun-09 2:37
hirenkshah15-Jun-09 2:37 
AnswerRe: Add String attrribute to File Pin
Nagy Vilmos15-Jun-09 2:44
professionalNagy Vilmos15-Jun-09 2:44 
AnswerRe: Add String attrribute to File Pin
OriginalGriff15-Jun-09 3:20
mveOriginalGriff15-Jun-09 3:20 
QuestionIs local administrator password is blank or not Pin
priyanka_jns15-Jun-09 2:03
priyanka_jns15-Jun-09 2:03 
AnswerRe: Is local administrator password is blank or not Pin
Simon P Stevens15-Jun-09 5:53
Simon P Stevens15-Jun-09 5:53 
Questionexecute script Pin
arkiboys15-Jun-09 0:24
arkiboys15-Jun-09 0:24 
AnswerRe: execute script Pin
priyanka_jns15-Jun-09 2:08
priyanka_jns15-Jun-09 2:08 
GeneralRe: execute script Pin
arkiboys15-Jun-09 2:28
arkiboys15-Jun-09 2:28 
Hi,
This is what I have now but I am not sure how to tell the code to use the vbscript i.e. Wscript.echo "hello"
Any thoughts please?
Thanks

System.Management.ManagementOperationObserver observer = new System.Management.ManagementOperationObserver();
System.Management.ConnectionOptions conn = new System.Management.ConnectionOptions();

conn.Impersonation = ImpersonationLevel.Impersonate;
conn.EnablePrivileges = true;
conn.Authentication = AuthenticationLevel.Default;
System.Management.ManagementScope ms = new System.Management.ManagementScope(@"\\" + txtTargetMachine.Text + @"\root\cimv2", conn);

ms.Connect();

System.Management.ManagementPath path = new System.Management.ManagementPath("Win32_Process");

ObjectGetOptions objectGetOptions = new ObjectGetOptions();

ManagementClass processClass = null;

processClass = new ManagementClass(ms, path, objectGetOptions);

ManagementBaseObject inParams = processClass.GetMethodParameters("Create");

ManagementBaseObject outParams = processClass.InvokeMethod("Create", inParams, null);

string returnValue = outParams["returnValue"] == null ? string.Empty : outParams["returnValue"].ToString();
GeneralRe: execute script Pin
Nagy Vilmos15-Jun-09 2:56
professionalNagy Vilmos15-Jun-09 2:56 
GeneralRe: execute script Pin
arkiboys15-Jun-09 3:38
arkiboys15-Jun-09 3:38 
GeneralRe: execute script Pin
Nagy Vilmos15-Jun-09 3:55
professionalNagy Vilmos15-Jun-09 3:55 
GeneralRe: execute script Pin
arkiboys15-Jun-09 20:08
arkiboys15-Jun-09 20:08 
Questionhow to clear string memory from heap without using GC Pin
rajeshsha1815-Jun-09 0:02
rajeshsha1815-Jun-09 0:02 
AnswerRe: how to clear string memory from heap without using GC Pin
Pete O'Hanlon15-Jun-09 0:08
mvePete O'Hanlon15-Jun-09 0:08 
AnswerRe: how to clear string memory from heap without using GC Pin
Rob Philpott15-Jun-09 0:48
Rob Philpott15-Jun-09 0:48 
AnswerRe: how to clear string memory from heap without using GC Pin
Simon P Stevens15-Jun-09 5:59
Simon P Stevens15-Jun-09 5:59 
Questionword like editor Pin
Mogaambo14-Jun-09 23:53
Mogaambo14-Jun-09 23:53 
AnswerRe: word like editor Pin
Nagy Vilmos15-Jun-09 2:08
professionalNagy Vilmos15-Jun-09 2:08 

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.