When writing to
C:\Program Files\
you will need administrator-permission. Try to write the file the user's documents or a similar place.
Using System.Environment.SpecialFolder you can get the user's documents-folder easily.
string docs = System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
docs += "\\Speech.wav";
Recognizer.SetInputToWaveFile(docs);
Alternatively, but a bad idea, would be to require the user to start the program as administrator.
EDIT
The method
Recognizer.SetInputToWaveFile
is meant to READ from a file. You cannot use it to store anything in a wav-file.
Here you find a tutorial on how to record speech in .NET.