We have a simple application with a button that opens the event viewer using the start of the process.
public static void OpenWindowsEventViewer(
string computerDnsName,
string userName,
SecureString password,
string domain)
{
Process.Start("eventvwr.exe", computerDnsName, userName, password, domain);
}
When we run our tool from the registry using HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Run, it starts normally, but the "eventvwr.exe" process does not start with the error: 'Invalid directory name.
Starting our tool using the startup folder (Start-> Programs-> Autostart) works fine.
What is the difference between these two ways, and can I do something to make it work, starting from the registry?
Edit: uninstalling SecureString makes it work ...
source
share