We have INF file which installs one .sys file to windows drivers folder. Scenario is as follows:
1) Installing the INF from File Explorer. Right click on INF file and click on Install. In this scenario .sys file gets copy under Windows\System32\drivers folder.
2) Created console application to install using RunDll32 / CMD under process object and install the INF file. In this scenario .sys file gets copy under Windows\System32\drivers folder.
3) Created x86 installer program having installer class to install using RunDll32 / CMD under process object and install the INF file. In this scenario .sys file gets copy under Windows\SysWOW64\drivers.
Our objective is to copy .sys file under Windows\System32\drivers folder irrespective of 32/64 bit flavor windows operating systems like WinXP, Windows7, Windiows 8/8.1/10.