2

I am trying to play a YouTube video in Firefox (portable), but when I run it as follows, the UAC appears for the flash player asking if you want this program to make changes to the computer. When I run it from the commandline, it does not do this. How can I prevent this from happening? I probably should ask this as separate question, but can somebody tell why it never minimizes.

Process proc = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo(@"C:\FirefoxPortable\FirefoxPortable.exe",    @"http://www.youtube.com/watch?v=1pSyYhRYeIM");
startInfo.WindowStyle = ProcessWindowStyle.Minimized;
proc.StartInfo = startInfo;
proc.Start();
2
  • From what commandline does the UAC prompt not appear? Are you saying that if you changed the code to start "cmd.exe", and then used that command prompt to start firefox, that there would be no prompt?
    – Ben Voigt
    Dec 18, 2010 at 20:45
  • I meant to say it works when I open a Command Prompt and execute this: C:\FirefoxPortable\FirefoxPortable.exe youtube.com/watch?v=1pSyYhRYeIM. I am wondering why it executes differently when I do it through code. Dec 19, 2010 at 4:34

1 Answer 1

1

Try running your application as administrator.

also, i love the video thanks for that +1

1
  • Just tried running as administrator and now I see why the UAC is showing. It wants to install the flash player, but I already have it installed. Arggg. Dec 19, 2010 at 4:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.