Thank's It's working to me when I'm running this on my local driver, but if I
run this OutlookChecker.exe (my c# project) on the server I get this error
Error:
An unhandled exception of type 'System.Security.SecurityException' occurred
in OutlookChecker.exe
================= Start Code =================
private void isOutlook()
{
Microsoft.Win32.RegistryKey key =
Microsoft.Win32.Registry.LocalMachine.OpenSubKey(" Software\\microsoft\\windows\\currentversion\\app paths\\OUTLOOK.EXE");
string path = (string)key.GetValue("Path");
if( path != null)
System.Diagnostics.Process.Start("OUTLOOK.EXE");
else
MessageBox.Show("There is no Outlook in this computer!","System
Error",MessageBoxButtons.OK,MessageBoxIcon.Exclama tion);
}
================= End Code =================
I tryed to run only this line, this is running good, seams like RegistryKey
problem??
MessageBox.Show("There is no Outlook in this computer");
Additional information: Request failed.
"Miroslav Stampar [MCSD.NET / Security+]" wrote:
Microsoft.Win32.RegistryKey key =
Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@ "SOFTWARE\Microsoft
\Windows\CurrentVersion\App Paths\OUTLOOK.EXE", false);
string path = (string)key.GetValue("Path");
HTH :)
Yael je napisao/la:
Hi,
I want to check if in this computer have outlook a programe.
If yes -->
System.Diagnostics.Process.Start ("OUTLOOK.EXE");
How to check if no??
if no --some msg...
How can I check it?
How to get OUTLOOK.EXE path and ask:
File.Exists(path)
I'm using vs.net 2003
Thank's,
Yael.