; The name of the installer
Name "BlueTooth On"

; The file to write
OutFile "BlueToothOn.exe"

;Icon
Icon "icons\BlueTooth.ico"

;removing the Nullsoft brand
BrandingText " "

;Silent Installing - no windows
SilentInstall silent

; hide the "show details" box
ShowInstDetails nevershow

; automatically close the installer when done.
AutoCloseWindow true

; Request application privileges for Windows Vista
RequestExecutionLevel user


Section ""
;overwrite if files are newer
;SetOverwrite ifnewer

;ioperm.exe looks for ioperm.sys in c:\cygwin\bin instead of the local folder
;we copy (and not remove) the sys file only
ReadEnvStr $R0 SYSTEMDRIVE
CreateDirectory "$R0\cygwin\bin"
CopyFiles "$EXEDIR\ioperm.sys" "$R0\cygwin\bin"

;Executing the Application
nsExec::Exec "$EXEDIR\ioperm.exe -i"
nsExec::Exec "$EXEDIR\hsect2.exe -B 1"
;nsExec::Exec "$EXEDIR\ioperm.exe -u"

SectionEnd