My program loads and saves registry-entries. You select the file(s), hit APPLY and it writes it to the registry.
Works like a charm, except for one specific machine. OS is the same (Windows 7 64Bit) as on the working ones.
Tested it with 4 Systems, on 3 of them it works, on 1 it does not.
What happens: You klick APPLY and a cmd-window opens with nothing but a blinking underline - waiting forever.
What could possibly be the issue? The relevant part of my code is:
if (listBox1.SelectedIndex > 0)
{
ProcessStartInfo startinfo = new ProcessStartInfo();
// /s Paremeter : copy entry without asking
startinfo.Arguments = " /s " + listBox2.SelectedItem.ToString();
startinfo.FileName = "regedit.exe";
Process.Start(startinfo); MessageBox.Show("Success","",MessageBoxButtons.OK,MessageBoxIcon.Information);
}
Edit/Update: It indeed has to do something with UAC. It seems that it´s waiting for a prompt, but does not actually Show one. But the thing is: Why is that? I used /s Paremeter, which should supress the prompt...
I found the solution: If you use regedit(.exe) /s PATH/FILE.reg it sometimes produces a Dialog (from UAC).
To prevent this, use the following: reg.exe IMPORT PATH/FILE.reg as it does NOT sometimes produce the UAC-Dialog.
Edit/Addition: You do not have to Change anything regarding UAC - with above solution, it´s irrelevant which "Level" your UAC is set to.