Click here to Skip to main content
15,897,518 members
Home / Discussions / C#
   

C#

 
AnswerRe: Windows Services Related Pin
musefan14-Jan-09 2:57
musefan14-Jan-09 2:57 
AnswerRe: Windows Services Related Pin
PIEBALDconsult14-Jan-09 4:52
mvePIEBALDconsult14-Jan-09 4:52 
QuestionDisplaying Image and text together in a single cell of datagridview Pin
Lijo Rajan14-Jan-09 2:08
Lijo Rajan14-Jan-09 2:08 
AnswerRe: Displaying Image and text together in a single cell of datagridview Pin
Dave Kreskowiak14-Jan-09 3:46
mveDave Kreskowiak14-Jan-09 3:46 
GeneralRe: Displaying Image and text together in a single cell of datagridview Pin
nelsonpaixao15-Jan-09 6:39
nelsonpaixao15-Jan-09 6:39 
GeneralRe: Displaying Image and text together in a single cell of datagridview Pin
Lijo Rajan16-Jan-09 18:02
Lijo Rajan16-Jan-09 18:02 
GeneralRe: Displaying Image and text together in a single cell of datagridview Pin
nelsonpaixao17-Jan-09 3:26
nelsonpaixao17-Jan-09 3:26 
QuestionNo GUI when I create process on remote PC Pin
Programm3r14-Jan-09 1:56
Programm3r14-Jan-09 1:56 
Hi all,

Currently I'm creating a process on a remote PC, the problem is that there is no UI that appears when the process starts. When I navigate to the task manager I can see the process in the process list, but nothing with regards to the UI.

I am make use of the following code:
ConnectionOptions options = new ConnectionOptions();
options.EnablePrivileges = true;
options.Authentication = AuthenticationLevel.Connect;
options.Impersonation = ImpersonationLevel.Impersonate;
//options.Password = "password";
//options.Username = @"user";

string SystemName = "PC_NAME";
string Path = string.Format(@"\\{0}\root\cimv2", SystemName);

ManagementScope ms = new ManagementScope(Path);
ms.Connect();

ManagementPath processMgmtpath = new ManagementPath("Win32_Process");
ManagementClass processClass = new ManagementClass(ms, processMgmtpath, null);
ManagementPath processStartupMgmtpath = new ManagementPath("Win32_ProcessStartup");
ManagementClass processStartup = new ManagementClass(ms, processStartupMgmtpath, null);

ManagementBaseObject inParams = processClass.GetMethodParameters("Create");
inParams["CommandLine"] = @"c:\Application.exe";
inParams["CurrentDirectory"] = @"c:\";
inParams["ProcessStartupInformation"] = null;
ManagementBaseObject ReturnObj = processClass.InvokeMethod("Create", inParams, null);
Console.WriteLine("RC={0}", ReturnObj["returnValue"].ToString());


Many thanks in advance
Kind regards,


The only programmers that are better those C# programmers are those who code in 1's and 0's Green Alien | [Alien]



Smile | :) Programm3r

My Blog: ^_^

AnswerRe: No GUI when I create process on remote PC Pin
Christian Graus14-Jan-09 2:26
protectorChristian Graus14-Jan-09 2:26 
GeneralRe: No GUI when I create process on remote PC Pin
Programm3r14-Jan-09 2:40
Programm3r14-Jan-09 2:40 
GeneralRe: No GUI when I create process on remote PC Pin
Christian Graus14-Jan-09 3:05
protectorChristian Graus14-Jan-09 3:05 
GeneralRe: No GUI when I create process on remote PC Pin
Programm3r14-Jan-09 3:14
Programm3r14-Jan-09 3:14 
GeneralRe: No GUI when I create process on remote PC Pin
Programm3r14-Jan-09 2:54
Programm3r14-Jan-09 2:54 
GeneralRe: No GUI when I create process on remote PC Pin
Programm3r14-Jan-09 3:17
Programm3r14-Jan-09 3:17 
AnswerRe: No GUI when I create process on remote PC Pin
Dave Kreskowiak14-Jan-09 3:44
mveDave Kreskowiak14-Jan-09 3:44 
Questionadapter.fill method Catch and Finally block do not execute Pin
mpavas14-Jan-09 1:56
mpavas14-Jan-09 1:56 
AnswerRe: adapter.fill method Catch and Finally block do not execute Pin
Colin Angus Mackay14-Jan-09 2:04
Colin Angus Mackay14-Jan-09 2:04 
AnswerRe: adapter.fill method Catch and Finally block do not execute Pin
Christian Graus14-Jan-09 2:27
protectorChristian Graus14-Jan-09 2:27 
QuestionDefault character sets for fonts and foreign characters Pin
tim_gunning14-Jan-09 1:55
tim_gunning14-Jan-09 1:55 
QuestionDataGridView and DataSet , Update and AccpetChanges Pin
half-life14-Jan-09 1:52
half-life14-Jan-09 1:52 
QuestionPlease Can any one Help Pin
Member 284246814-Jan-09 1:24
Member 284246814-Jan-09 1:24 
AnswerRe: Please Can any one Help Pin
musefan14-Jan-09 1:39
musefan14-Jan-09 1:39 
AnswerRe: Please Can any one Help Pin
musefan14-Jan-09 1:46
musefan14-Jan-09 1:46 
AnswerRe: Please Can any one Help Pin
Colin Angus Mackay14-Jan-09 2:15
Colin Angus Mackay14-Jan-09 2:15 
AnswerRe: Please Can any one Help Pin
Member 284246814-Jan-09 2:53
Member 284246814-Jan-09 2:53 

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.