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

C#

 
GeneralRe: algorthim Pin
PIEBALDconsult8-Jan-08 10:06
mvePIEBALDconsult8-Jan-08 10:06 
GeneralRe: algorthim Pin
PIEBALDconsult8-Jan-08 10:10
mvePIEBALDconsult8-Jan-08 10:10 
GeneralCalling Stored Procedure for RDLC Report in C# Pin
salman_syed_018-Jan-08 2:19
salman_syed_018-Jan-08 2:19 
GeneralRe: Calling Stored Procedure for RDLC Report in C# Pin
Justin Perez8-Jan-08 3:54
Justin Perez8-Jan-08 3:54 
Generaldatagridview Pin
SVb.net8-Jan-08 2:17
SVb.net8-Jan-08 2:17 
GeneralRe: datagridview Pin
Justin Perez8-Jan-08 4:00
Justin Perez8-Jan-08 4:00 
QuestionHow to handle special International characters in C#. Pin
MinhajuddinK8-Jan-08 1:39
MinhajuddinK8-Jan-08 1:39 
AnswerRe: How to handle special International characters in C#. Pin
Matthew Butler8-Jan-08 4:00
Matthew Butler8-Jan-08 4:00 
GeneralRe: How to handle special International characters in C#. Pin
MinhajuddinK8-Jan-08 5:34
MinhajuddinK8-Jan-08 5:34 
QuestioniTunes SDK (Cover Art) Pin
MicealG8-Jan-08 1:30
MicealG8-Jan-08 1:30 
Generalstruggling with return type of procedure Pin
tasumisra8-Jan-08 0:53
tasumisra8-Jan-08 0:53 
GeneralRe: struggling with return type of procedure Pin
Mircea Puiu8-Jan-08 1:12
Mircea Puiu8-Jan-08 1:12 
GeneralRe: struggling with return type of procedure Pin
tasumisra8-Jan-08 1:17
tasumisra8-Jan-08 1:17 
GeneralRe: struggling with return type of procedure Pin
Mircea Puiu8-Jan-08 1:24
Mircea Puiu8-Jan-08 1:24 
AnswerRe: struggling with return type of procedure Pin
Guffa8-Jan-08 3:38
Guffa8-Jan-08 3:38 
Generalassembly not found Pin
infi_20078-Jan-08 0:50
infi_20078-Jan-08 0:50 
GeneralRe: assembly not found Pin
Mircea Puiu8-Jan-08 1:07
Mircea Puiu8-Jan-08 1:07 
GeneralWindows Permission Dialog Pin
borjolujo8-Jan-08 0:29
borjolujo8-Jan-08 0:29 
QuestionCrystal Reports CrossTab fields Pin
adi.rusu8-Jan-08 0:03
adi.rusu8-Jan-08 0:03 
QuestionHow to call notepad from windows service Pin
ravindradonkada7-Jan-08 23:56
ravindradonkada7-Jan-08 23:56 
GeneralRe: How to call notepad from windows service Pin
sindhutiwari8-Jan-08 1:17
sindhutiwari8-Jan-08 1:17 
GeneralRe: How to call notepad from windows service Pin
Vasudevan Deepak Kumar8-Jan-08 2:31
Vasudevan Deepak Kumar8-Jan-08 2:31 
QuestionHow to open notepad from windows service Pin
ravindradonkada7-Jan-08 23:55
ravindradonkada7-Jan-08 23:55 
Hi ,
This is ravindra,currently working on Windows Service.
I implemented the following two methods to call notepad.exe from windows
service,but its not working.So,please anybody help to complete my task.

Method1:
=======

STARTUPINFO si = new STARTUPINFO();

PROCESS_INFORMATION pi = new

PROCESS_INFORMATION();



CreateProcess("C:\\WINDOWS\\SYSTEM32\\notepad.exe", null,

IntPtr.Zero, IntPtr.Zero, false, 0, IntPtr.Zero, null,

ref si, out pi);

EventLog.WriteEntry("After notepad");

}

[DllImport("kernel32.dll")]

static extern bool CreateProcess(string lpApplicationName, string
lpCommandLine,
IntPtr lpProcessAttributes, IntPtr lpThreadAttributes, bool
bInheritHandles, uint
dwCreationFlags, IntPtr lpEnvironment, string lpCurrentDirectory, ref
STARTUPINFO
lpStartupInfo, out PROCESS_INFORMATION lpProcessInformation);

}

}


Method2:
========

EventLog.WriteEntry("In the notepad");

ProcessStartInfo psi = new ProcessStartInfo();

psi.FileName = "notepad.exe";

psi.UseShellExecute = false;

psi.Domain = "sys43.";

psi.UserName = "Acer OEM User";

SecureString secure = new SecureString();

string password = "nopassword";

foreach (char c in password)

{ secure.AppendChar(c); }

psi.Password = secure;

Process process = new Process();

process.StartInfo = psi;

process.Start();
GeneralStarting NotePad from C# code Pin
Mircea Puiu8-Jan-08 0:57
Mircea Puiu8-Jan-08 0:57 
GeneralRe: Starting NotePad from C# code Pin
Stu Richardson8-Jan-08 1:18
Stu Richardson8-Jan-08 1:18 

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.