Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;#################################
- !include "UMUI.nsh" # Modern UI version 2
- !include "x64.nsh" # x64 specific commands
- !include "LogicLib.nsh" #LogicLib
- !define APPNAME "TESTAPP"
- !define COMPANYNAME "TESTCOMPANY"
- ; Define the full name of the program
- Name "${APPNAME}"
- ; Define the installation directory
- InstallDir "$PROGRAMFILES\${COMPANYNAME}\${APPNAME}"
- ; The name of the file to write when you compile this script
- OutFile "${APPNAME}x64.exe"
- ;#################################
- ;General
- ;#################################
- RequestExecutionLevel admin
- SetFont "Comic Sans MS" 8
- !define UMUI_SKIN "blue"
- ######################################
- ;Pages
- ######################################
- !insertmacro MUI_PAGE_COMPONENTS
- !insertmacro MUI_PAGE_DIRECTORY
- !insertmacro MUI_PAGE_INSTFILES
- !insertmacro MUI_UNPAGE_CONFIRM
- !insertmacro MUI_UNPAGE_INSTFILES
- !insertmacro MUI_LANGUAGE "English"
- ######################################
- ;Sections
- ######################################
- Section "ODBC" SecODBC
- ExecWait '"C:\Windows\System32\odbcconf.exe" CONFIGSYSDSN "iSeries Access ODBC Driver" "DSN=TEST DSN ENTRY|System=${Server_State}|DefaultLibraries=${Company_State}DATA|SSL=0|Description=TEST ODBC ENTRY|QueryTimeout=0"'
- SectionEnd
- !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
- !insertmacro MUI_DESCRIPTION_TEXT ${SecODBC} $(DESC_SecODBC)
- !insertmacro MUI_FUNCTION_DESCRIPTION_END
- ; Language strings for ODBC Section
- LangString DESC_SecODBC ${LANG_ENGLISH} "This will install the ODBC iSeries for Windows."
- ;#################################
- ;Functions
- ;#################################
- Function .onInit
- Var /GLOBAL Server_State
- Var /GLOBAL Company_State
- readINIStr $0 "$EXEDIR\setup.ini" Settings Server
- readINIStr $1 "$EXEDIR\setup.ini" Settings Company
- StrCpy $Server_State $0
- StrCpy $Company_State $1
- MessageBox MB_OK $Server_State
- MessageBox MB_OK $Company_State
- FunctionEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement