Deployment Solution

 View Only

AClient x64 Installer 

Sep 22, 2008 03:46 PM

I have written an AClient installer that can be used instead of AClients built-in installer. This installer is a fifth the size, so it transfers much faster over the network and uses less bandwidth, and it is easily modifiable to fit your needs.

To compile the installer, create a project directory and copy AClient.exe into this directory as AClientX64.exe. Then create a new text file named AClientX64.nsi and copy-and-paste the following into this text file:

;**************************AClient Settings***************************
; This installer will only allow you to specify how to connect to
; Deployment Server and which directory to install to.
; For all other settings, use the "Force new agents to take these
; default settings" option.
;*********************************************************************

;---------------------------------------------------------------------
; TransportUse is used to decide whether to use Multicasting or
; TCP to connect to Deployment Server.
; Use TRANSPORT_USE 0 for Multicasting
; Use TRANSPORT_USE 1 for TCP
;---------------------------------------------------------------------
!define TRANSPORT_USE 1

;---------------------------------------------------------------------
; MCAST_ADDR is the multicast group address to be used to find the
;  Deployment Server (optional)
; MCAST_PORT is the port number to use while multicasting (optional)
; TTL is the maximum number of hops to multicast through (optional)
; SERVER_NAME is the computer name of the server (optional)
;---------------------------------------------------------------------
!define MCAST_ADDR "225.1.2.3"
!define MCAST_PORT "402"
!define TTL "32"
!define SERVER_NAME ""

;---------------------------------------------------------------------
; TcpAddr is the IP address of the Deployment Server to connect to
;	(optional)
; TcpPort is the IP port number of the Deployment Server listening for
;  requests (optional)
; Note: Specifying these parameters will switch the AClient to use
;  TCP to connect to the server.
;---------------------------------------------------------------------
!define TCP_ADDR "10.0.0.1"
!define TCP_PORT "402"

;---------------------------------------------------------------------
; SleepTime specifies how many seconds to wait after the AClient
; service starts before attempting to connect to Deployment Server
;---------------------------------------------------------------------
!define SLEEP_TIME 0

;---------------------------------------------------------------------
; InstallDir parameter indicates the full pathname to the directory
;  where AClient should be installed to. (required)
;---------------------------------------------------------------------
InstallDir "$PROGRAMFILES64\Altiris\AClient"


;***************************AClient Install***************************
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "AClient"
!define PRODUCT_PUBLISHER "Altiris, Inc."
!define PRODUCT_WEB_SITE "http://www.altiris.com"

SetCompressor lzma

; MUI 1.67 compatible ------
!include "MUI.nsh"

; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"

; Welcome page
!insertmacro MUI_PAGE_WELCOME
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!insertmacro MUI_PAGE_FINISH

; Language files
!insertmacro MUI_LANGUAGE "English"

; Reserve files
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS

; MUI end ------

SilentInstall silent
Name "${PRODUCT_NAME}"
OutFile "altiris-aclient-6.8.378.X64.exe"
ShowInstDetails show

; Called before anything else as installer initialises
Function .onInit
 SetRegView 64
 ReadRegStr $0 HKLM "SOFTWARE\Altiris\Client Service" "InstallDir"
 IfErrors +2 0
  StrCpy $INSTDIR $0
FunctionEnd

Section "MainSection" SEC01
 ExecWait 'sc.exe stop AClient'
 Delete "$INSTDIR\AClient.DeleteMe"
 Rename "$INSTDIR\AClient.exe" "$INSTDIR\AClient.DeleteMe"
 WriteRegStr HKLM "SOFTWARE\Altiris\Client Service" "InstallDir" "$INSTDIR"
 WriteRegDWORD HKLM "SOFTWARE\Altiris\Client Service" "UseMCast" "${TRANSPORT_USE}"
 WriteRegStr HKLM "SOFTWARE\Altiris\Client Service" "MCastAddr" "${MCAST_ADDR}"
 WriteRegStr HKLM "SOFTWARE\Altiris\Client Service" "MCastPort" "${MCAST_PORT}"
 WriteRegStr HKLM "SOFTWARE\Altiris\Client Service" "TTL" "${TTL}"
 WriteRegStr HKLM "SOFTWARE\Altiris\Client Service" "ConsoleName" "${SERVER_NAME}"
 WriteRegStr HKLM "SOFTWARE\Altiris\Client Service" "TcpAddr" "${TCP_ADDR}"
 WriteRegStr HKLM "SOFTWARE\Altiris\Client Service" "TcpPort" "${TCP_PORT}"
 WriteRegDWORD HKLM "SOFTWARE\Altiris\Client Service" "SleepTime" "${SLEEP_TIME}"
 SetOutPath "$INSTDIR"
 SetOverwrite on
 File "AClientX64.exe"
 ExecWait 'sc.exe delete AClient'
 ExecWait 'sc.exe stop AClient'
 ExecWait 'sc.exe create AClient binPath= "$INSTDIR\AClient.exe -service" type= own type= interact start= auto DisplayName= "Altiris Client Service"'
 ExecWait 'sc.exe start AClient'
 Delete "$INSTDIR\AClient.DeleteMe"
SectionEnd

Next, modify the AClient Settings section of your new .nsi file with the information required to connect to your Deployment Server. For the rest of your preferred AClient settings to be applied, you will need to apply the "Force new agents to take these default settings" option in the Deployment Server Console under Tools > Options > Agent Settings.

Last, use NSIS to build the installer. You can download the latest version of NSIS at http://nsis.sourceforge.net/Download. Download and run the installer, accepting all the defaults. When the installer says that it has completed, uncheck both "Run NSIS" and "Show release notes" and click Finish.

Now that NSIS is installed, right-click the .nsi file and choose "Compile NSIS Script". When NSIS has finished compiling, you will now have a file named "altiris-aclient-6.8.378.X64.exe" rename it so that it matches the version of AClient you used as the source file for the installer.

If you want to push this installer using the Remote Agent Installer, follow these instructions.

  1. Create a new directory named rcinstall.
  2. Copy rcinstall.exe, rcinstall_EN.dll, and RemoteInstall.dll from your eXpress share into the rcinstall directory.
  3. Create a directory named Agents in this rcinstall directory and then create a directory named AClient in the Agents directory.
  4. Copy altiris-aclient-*.X86.exe, altiris-aclient-*.IA64.exe, dagent.msi, dagent_ia64.msi, and dagent_x64.msi (where * represents the latest version of those files) from your eXpress share under Agents\AClient into the rcinstall directory under Agents\AClient.
  5. Copy the altiris-aclient-*.X64.exe you just built into the rcinstall directory under Agents\AClient.
  6. Run rcinstall.exe from the rcinstall directory and follow the instructions as usual.

I wish this installer would work with AClient auto-update, this would drastically decrease the engine's work load just after an upgrade, but AClient checks a file hash and does not attempt to load the file. But in all other aspects, this installer seems to work great.

License:AJSL
By clicking the download link below, you agree to the terms and conditions in the Altiris Juice Software License
Support:User-contributed tools on the Juice are not supported by Altiris Technical Support. If you have questions about a tool, please communicate directly with the author by visiting their profile page and clicking the 'contact' tab.

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

Nov 04, 2008 09:51 AM

Can't you just install the aclient from a UNC path and/or mapped drive? Also it seems like recompiling would be a alot of extra work for a 5mb file. Also you could use something like 7zip to make a self extracting file and this might shrink the installer slightly.

Related Entries and Links

No Related Resource entered.