Here is the script. Please let me know what solution is available.
The problem seems to be in the $TEMP variable. When the installer is executed the system is unable to find the Driver files which is located in $TEMP\UPD# General Symbol Definitions
!define REGKEY "SOFTWARE\$(^Name)"
# Included files
!include Sections.nsh
!include "FileFunc.nsh"
!include LogicLib.nsh
#!insertmacro GetParameters
# Installer pages
Page instfiles
# Installer attributes
OutFile DriverX86.exe
CRCCheck on
XPStyle on
Icon "logo.ico"
SilentInstall silent
Var DEVICE_NAME
# Installer sections
Section -Main SEC0000
StrCpy $DEVICE_NAME "XXXX Device"
SetOutPath $TEMP\UPD
SetOverwrite on
File /a /r Print\Win_2KXP\*
ExecWait "rundll32 printui.dll PrintUIEntry /if /b $\"$DEVICE_NAME$\" /f $TEMP\UPD\somefile.inf /m $\"XXXX Device$\" /r $\"LPT1:$\""
Delete $TEMP\UPD\Win_2KXP\English\i386\*
Delete $TEMP\UPD\Win_2KXP\English\*
Delete $TEMP\UPD\Win_2KXP\i386\*
Delete $TEMP\UPD\Win_2KXP\*
RMDir /r $TEMP\UPD\i386
RMDir /r $TEMP\UPD\English\i386
RMDir /r $TEMP\UPD\English
RMDir /r $TEMP\UPD
SetOutPath $TEMP\BPTracker
SetOverwrite on
File /a /r WIN-DS3IVPKX4GX_Install\*
ExecWait "$TEMP\BPTracker\WIN-DS3IVPKX4GX_Install.exe /s"
Delete $TEMP\BPTracker\WIN-DS3IVPKX4GX_Install.exe
RMDir $TEMP\BPTracker
SectionEnd
# Installer functions
Function .onInit
InitPluginsDir
FunctionEnd