Click here to Skip to main content
15,894,017 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to get distinct items from an array? Pin
mejobloggs19-Jun-06 15:57
mejobloggs19-Jun-06 15:57 
GeneralRe: How to get distinct items from an array? Pin
leppie19-Jun-06 22:07
leppie19-Jun-06 22:07 
GeneralRe: How to get distinct items from an array? Pin
Alexander Wiseman20-Jun-06 5:43
Alexander Wiseman20-Jun-06 5:43 
AnswerRe: How to get distinct items from an array? Pin
Leslie Sanford19-Jun-06 16:43
Leslie Sanford19-Jun-06 16:43 
GeneralRe: How to get distinct items from an array? Pin
mejobloggs19-Jun-06 17:09
mejobloggs19-Jun-06 17:09 
AnswerRe: How to get distinct items from an array? Pin
Judah Gabriel Himango19-Jun-06 18:22
sponsorJudah Gabriel Himango19-Jun-06 18:22 
QuestionProcess.Start() mailto exception - default mail client Pin
stretchtack19-Jun-06 13:11
stretchtack19-Jun-06 13:11 
AnswerRe: Process.Start() mailto exception - default mail client Pin
Alexander Wiseman19-Jun-06 13:54
Alexander Wiseman19-Jun-06 13:54 
Hello Stretch,

I tested out the code you put in your question text: the second version, where you actually create a Process object, and it worked out fine: Thunderbird (my default email client) opened up without a problem, with a new mail addressed to joe.mama@exception.net.

This probably means that the issue you are having is caused by not having a default email client set, or not having one setup properly. The proper handler for the "mailto" keyword is actually defined in the Windows Registry. If you go to Start > Run and then type "regedit" you will be able to view the registry. Open up to "HKEY_LOCAL_MACHINE" and then go to the following path under there "SOFTWARE" > "Clients" > "Mail". Now you should have that registry key open (i.e. selected in the left pane). When that key is selected in the left pane, then in the right pane, you will see a value whose name is "(Default)" and whose value is your default mail client. Mine says "Mozilla Thunderbird". You may not have this set, which could be causing the problem. If it IS set, then continue reading!

Just a phrase like "Mozilla Thunderbird" is not enough to tell Windows what to do if it encounters the "mailto" keyword. Let's look a little deeper into the registry! Open up the key called "Mail" in the left pane and find the sub-key with the same name as the value of the "(Default)" key which you just found. For me, I have a key called "Mozilla Thunderbird". Alright, open that one up. You will probably see a variety of other keys, but the one we are interested in is "protocols" (it does not matter if it is capitalized or not). If you do not have that key, then that should explain your problem - Windows does not know what to do with the "mailto" protocol on your client. If you do have that key, keep reading!

Open up the "protcols" key and under it you should see "mailto". This is the key which will tell Windows how to deal with a mailto command. Open up that key as well, and you should get to a key called "shell". Under "shell" there should be a key called "open" and under that a key called "command". Select "command" in the left pane, and look at the various values in the right pane. There is probably only one listed, another "(Default)" value. Mine has this as the associated data: "C:\PROGRA~1\MOZILL~2\THUNDE~1.EXE -compose %1". This is the command which Windows executes whenever it sees "mailto".

I will quickly recap and you can then try and identify where your problem lies:

1) Inside the key "Clients" > "Mail" You should have the "(Default)" value set to a mail client on your machine.
2) There should be another key with that mail-client's name underneath the "Mail" key.
3) Inside that key, there should be the following set of keys: "protocols" > "mailto" > "shell" > "open" > "command"
4) The value called "(Default)" in the "command" key should be set to a valid executable with some command line parameters, like "-compose".

At each of these four places, you could have an invalid registry key or missing value. Check that and see if it is all in place. Reply to this message with the results of your finding, and then I will try to help you fix it.

Hope that helps start you out in the right direction!

Sincerely,
Alexander Wiseman
GeneralRe: Process.Start() mailto exception - default mail client Pin
stretchtack19-Jun-06 19:20
stretchtack19-Jun-06 19:20 
GeneralSTAThread vs. MTAThread - Process.Start() Pin
stretchtack20-Jun-06 7:28
stretchtack20-Jun-06 7:28 
GeneralRe: STAThread vs. MTAThread - Process.Start() Pin
Alexander Wiseman20-Jun-06 8:46
Alexander Wiseman20-Jun-06 8:46 
QuestionSession State Transfer Pin
Expert Coming19-Jun-06 11:39
Expert Coming19-Jun-06 11:39 
QuestionNeural networks in c# Pin
yasar khan19-Jun-06 10:46
yasar khan19-Jun-06 10:46 
AnswerRe: Neural networks in c# Pin
Colin Angus Mackay19-Jun-06 11:13
Colin Angus Mackay19-Jun-06 11:13 
AnswerRe: Neural networks in c# Pin
Ravi Bhavnani19-Jun-06 11:39
professionalRavi Bhavnani19-Jun-06 11:39 
AnswerRe: Neural networks in c# Pin
User 171649219-Jun-06 13:29
professionalUser 171649219-Jun-06 13:29 
Questionexecting .bat file. Pin
tom laz19-Jun-06 10:29
tom laz19-Jun-06 10:29 
AnswerRe: execting .bat file. Pin
Ed.Poore19-Jun-06 10:33
Ed.Poore19-Jun-06 10:33 
AnswerRe: execting .bat file. Pin
Joshua Lunsford19-Jun-06 10:33
Joshua Lunsford19-Jun-06 10:33 
AnswerRe: execting .bat file. Pin
Spike^Blue^Heaven19-Jun-06 20:13
Spike^Blue^Heaven19-Jun-06 20:13 
GeneralRe: execting .bat file. Pin
tom laz19-Jun-06 10:46
tom laz19-Jun-06 10:46 
GeneralRe: execting .bat file. Pin
tom laz19-Jun-06 10:49
tom laz19-Jun-06 10:49 
GeneralRe: execting .bat file. Pin
Joshua Lunsford19-Jun-06 11:28
Joshua Lunsford19-Jun-06 11:28 
QuestionWindows Service with threading issues Pin
Joshua Lunsford19-Jun-06 10:26
Joshua Lunsford19-Jun-06 10:26 
AnswerRe: Windows Service with threading issues Pin
Tom Delany19-Jun-06 11:47
Tom Delany19-Jun-06 11:47 

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.