Archive: Problem in installing device driver


Problem in installing device driver
I am facing a strange problem ......

M installing the device drivers using sysSetupCopyOEMInf

well this works fine with NSIS 2.31 but when I run the same script file
in unicode NSIS(nsis-05-Sep-2007.cvs-unicode-setup.exe) unable to install the drivers ?
The code to install device driver is as follws:

Function InstallUpgradeDriver

Pop $R0 ; HID

Pop $R1 ; INFPATH

Pop $R2 ; INFDIR


Call GetWindowsVersion

Pop $R3 ; Windows Version

;DetailPrint 'Windows Version: $R3'

; Pre-install the driver

System::Get '${sysSetupCopyOEMInf}'

Pop $0

StrCmp $0 'error' lbl_inoapi

DetailPrint "Installing the driver..."


System::Call '${sysSetupCopyOEMInf}?e (R1, 0, ${SPOST_PATH}, ${SP_COPY_NOOVERWRITE}, 0, ${NSIS_MAX_STRLEN}, 0, 0) .r0'


Pop $1 ; last error

IntCmp $0 1 lbl_nodriver

DetailPrint 'Driver pre-installation failed'

Goto lbl_done

lbl_inoapi:

DetailPrint "Your Windows doesn't support driver pre-installation."

lbl_nodriver:

lbl_done:

FunctionEnd


Try calling SetupCopyOEMInfW instead of SetupCopyOEMInfA.


Tried didn work I get error Invalid Parameter