0

I need install driver into system32\drivers, but if i'm using default install from rundll32 from c#, driver is installing into syswow64. That is my code:

            ProcessStartInfo startInfo = new ProcessStartInfo();
            startInfo.Verb = "RunAs";
            startInfo.FileName = "cmd";
            startInfo.Arguments = @"/C rundll32.exe SETUPAPI.DLL,InstallHinfSection DefaultInstall 132 " + file;
            var process = Process.Start(startInfo);
            process.WaitForExit();

How can i run this process like 64bit process?

Alexander Mashin
  • 693
  • 3
  • 14
  • 34
  • 1
    possible duplicate of [How to start a 64-bit process from a 32-bit process](http://stackoverflow.com/questions/2003573/how-to-start-a-64-bit-process-from-a-32-bit-process) – Sinatr Jul 27 '15 at 12:53
  • Yuck, Wow64DisableWow64FsRedirection() is a very ugly answer, very unsafe in a .NET app. Use sysnative or just plain let your program run as a 64-bit process by removing the jitter forcing. Which is the best way, you need to obtain UAC elevation so using a little helper process with the correct manifest is often needed anyway. – Hans Passant Jul 27 '15 at 13:40

0 Answers0