Install Options HELP
Hi I need some help with having mutiple install options that can be entered as a commandline and be pushed thru group policy the installed installs the files needed they are all msi installers i need to pass thru agruments into the nsis installer that then change the arguements of the msis within the installer i am quite new to nssi coding i have read thru many forums and guides and am lost any help would be appreicated here is the code
all the files are in a folder i can answer any questions thank you
#---------------------------------------------------
# Important Stuff - Checks for Admin
#---------------------------------------------------
Name "Technology One ECM 4.02"
OutFile "Installer.exe"
InstallDir "$PROGRAMFILES\T1\"
#---------------------------------------------------
!include "MUI.nsh"
!define MUI_ICON "techone.ico"
!define MUI_ABORTWARNING
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!define MUI_FINISHPAGE_SHOWREADME $INSTDIR
!insertmacro MUI_LANGUAGE "English"
Function dotnetfx35
IfFileExists "$WINDIR\Microsoft.NET\Framework\v3.5" FOUND
DetailPrint "Could not find .NET 3.5 Installing now"
DetailPrint "--------------------------------------"
ExecWait '"$EXEDIR\files\dotnetfx35.exe" /q'
Goto FINISH
FOUND:
DetailPrint "Found .NET 3.5"
FINISH:
FunctionEnd
Function crystal2008
IfFileExists "$PROGRAMFILES\Business Objects\Common\4.0\*.*" FOUND FINISH
FOUND:
DetailPrint "Found Crystal 2008 Runtime"
DetailPrint "Now Uninstalling"
ExecWait 'msiexec /x "$EXEDIR\files\crruntime_12_1_mlb.msi" /passive'
FINISH:
DetailPrint "Now Installing"
ExecWait 'msiexec /i "$EXEDIR\files\crruntime_12_1_mlb.msi" /passive'
FunctionEnd
Function crystal2008viewer
IfFileExists "$PROGRAMFILES\T1\CrystalViewer\*.*" FOUND FINISH
FOUND:
DetailPrint "Found Crystal 2008 Viewer"
DetailPrint "Now Uninstalling"
ExecWait 'msiexec /x "$EXEDIR\files\t1inscrv.msi" /passive'
FINISH:
DetailPrint "Now Installing"
ExecWait 'msiexec /i "$EXEDIR\files\t1inscrv.msi" /passive'
FunctionEnd
Function xlone
IfFileExists "$PROGRAMFILES\T1\XLOne 6.12\*.*" FOUND FINISH
FOUND:
DetailPrint "Found Crystal XLOne 6.12"
DetailPrint "Now Uninstalling"
ExecWait 'msiexec /x "$EXEDIR\files\xl1setup.msi" /passive'
FINISH:
DetailPrint "Now Installing"
ExecWait 'msiexec /i "$EXEDIR\files\xl1setup.msi" /passive'
FunctionEnd
Function cilinksetup
IfFileExists "$PROGRAMFILES\T1\CiLinkLauncher\*.*" FOUND FINISH
FOUND:
DetailPrint "Found Ci Link Launcher"
DetailPrint "Now Uninstalling"
ExecWait 'msiexec /x "$EXEDIR\files\cilinksetup.msi" /passive'
FINISH:
DetailPrint "Now Installing"
ExecWait 'msiexec /i "$EXEDIR\files\cilinksetup.msi" /passive'
FunctionEnd
Function ssceruntime
IfFileExists "$PROGRAMFILES\Microsoft SQL Server Compact Edition\v3.5\System.Data.SqlServerCe.Entity.dll" FOUND FINISH
FOUND:
DetailPrint "Found SQL Server Compact Edition"
DetailPrint "Now Uninstalling"
ExecWait 'msiexec /x "$EXEDIR\files\ssceruntime-enu-x86.msi" /passive'
FINISH:
DetailPrint "Now Installing"
ExecWait 'msiexec /i "$EXEDIR\files\ssceruntime-enu-x86.msi" /passive'
FunctionEnd
Function trust
DetailPrint "Checking if Repairing or installing is needed"
ExecWait 'msiexec /i "$EXEDIR\files\Trust-t1.msi" /passive'
FunctionEnd
Function pia
Push $R0
Push $R1
StrCpy $R0 ""
StrCpy $R1 ""
ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Office\11.0\Common\InstallRoot" "Path"
strcmp $R1 "" Nine CheckEight
CheckEight:
IfFileExists "$R1\winword.exe" 0 Nine
ExecWait 'msiexec /i "$EXEDIR\files\o2003pia.msi" ALLUSER=1 /qn'
DetailPrint "2003 Found"
Nine:
ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Office\12.0\Common\InstallRoot" "Path"
strcmp $R1 "" None CheckNine
CheckNine:
IfFileExists "$R1\winword.exe" 0
ExecWait 'msiexec /i "$EXEDIR\files\o2007pia.msi" ALLUSER=1 /qn'
DetailPrint "2007 Found"
None:
DetailPrint "Finished installing PIAs"
FunctionEnd
Function vstor
IfFileExists "$PROGRAMFILES\Common Files\microsoft shared\VSTO\8.0\Microsoft Visual Studio 2005 Tools for Office Runtime\*.*" FOUND FINISH
FOUND:
DetailPrint "Found Visual Studio Tools 2005"
DetailPrint "Now Uninstalling"
ExecWait '"$EXEDIR\files\vstor.exe" /qu'
FINISH:
ExecWait '"$EXEDIR\files\vstor.exe" /q'
FunctionEnd
Function ecm
IfFileExists "$PROGRAMFILES\Technology One\ECM - Classic Components\*.*" QUESTION
Goto INSTALL
QUESTION:
MessageBox MB_YESNO "You seem to have a previous copy of the ECM client already installed. Would you like to remove such client and replace it with the latest version?" IDYES UNINSTALL IDNO FINISH
#END QUESTION
UNINSTALL:
DetailPrint "Now uninstalling any traces of ECM 3.08"
ExecWait '"msiexec" /x "$EXEDIR\files\dwclassic308.msi" /passive'
DetailPrint "Now uninstalling any traces of ECM 4.02"
ExecWait '"msiexec" /x "$EXEDIR\files\dwclassic.msi" /passive'
#END UNINSTALL
INSTALL:
ExecWait '"msiexec" /i "$EXEDIR\files\dwclassic.msi" /qf'
DetailPrint "Now installing ECM 4.02"
#END INSTALL
FINISH:
#HERE TO SKIP
#END FINISH
FunctionEnd
#------------------------------------------------------------------------------------------------------------
Section
#---------------------------------------------------
# Important Stuff - Checks for Admin
#---------------------------------------------------
userInfo::getAccountType
pop $2
StrCmp $2 "Admin" +3
MessageBox MB_OK "Please try again as Admin"
Return
SetOutPath $INSTDIR
LogSet on
#---------------------------------------------------
Call dotnetfx35
Call crystal2008
Call crystal2008viewer
Call xlone
Call cilinksetup
Call ssceruntime
Call trust
Call pia
Call vstor
Call ecm
SectionEnd