Panopticon
Programmer
Hey folks,
I'm trying to open notepad from a windows service. The service runs as a user with sufficiant privledges and it actually launces a notepad.exe process, however notepad and anyother exe for that matter doesn't appear to initilize. It just sits in the process explorer. From what I can find, .net2 makes things easier, and I could also use an un-managed API.
Is this a bug with windows? or is there a proper way to create a process within a service? I've also tried using the runas commnad however this needs to be all automated and it doesn't seem like there is any easy way to send it a password when it prompts.
code:
thread732-1026106
I'm trying to open notepad from a windows service. The service runs as a user with sufficiant privledges and it actually launces a notepad.exe process, however notepad and anyother exe for that matter doesn't appear to initilize. It just sits in the process explorer. From what I can find, .net2 makes things easier, and I could also use an un-managed API.
Is this a bug with windows? or is there a proper way to create a process within a service? I've also tried using the runas commnad however this needs to be all automated and it doesn't seem like there is any easy way to send it a password when it prompts.
code:
Code:
Process myProc = new Process();
string path = "c:\\winnt\\notepad.exe";
OnStart()
{
myProc.StartInfo.FileName=path;
myProc.Start();
}
thread732-1026106