Index: opsi/products/bacula/CLIENT_DATA/setup3264.ins
===================================================================
--- opsi/products/bacula/CLIENT_DATA/setup3264.ins	(revision 1022)
+++ opsi/products/bacula/CLIENT_DATA/setup3264.ins	(revision 1023)
@@ -15,4 +15,5 @@
 DefVar $ProductVer$  
 DefVar $MinimumSpace$
+DefVar $InstallDir$
 DefVar $InstallDir32$
 DefVar $InstallDir64$
@@ -24,7 +25,23 @@
 DefVar $INST_architecture$
 
+DefVar $filedaemon_name$
+DefVar $filedaemon_full_name$
+DefVar $filedaemon_full_password$
+DefVar $filedaemon_monitor_name$
+DefVar $filedaemon_monitor_password$
+DefVar $director_name$
+DefVar $director_address$
+DefVar $director_password$
+
+
 Set $INST_SystemType$ = GetSystemType
 set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
 
+set $filedaemon_name$ = GetProductProperty( "filedaemon_name", "" )
+set $filedaemon_full_password$ = GetProductProperty( "filedaemon_full_password", "filedaemon_full_password" )
+set $filedaemon_monitor_password$ = GetProductProperty( "filedaemon_monitor_password", "filedaemon_monitor_password" )
+set $director_name$ = GetProductProperty( "director_name", "director_name" )
+set $director_address$ = GetProductProperty( "director_address", "director_address.example.com" )
+set $director_password$ = GetProductProperty( "director_password", "director_password" )
 
 Set $LogDir$ = "%SystemDrive%\tmp"
@@ -38,8 +55,9 @@
 Set $ProductId$       = "bacula"
 Set $ProductVer$      = "5.2.10"
-Set $MinimumSpace$    = "20 MB"
+Set $MinimumSpace$    = "30 MB"
 ; the path were we find the product after the installation
-Set $InstallDir32$      = "%ProgramFiles32Dir%\<path to the product>"
-Set $InstallDir64$      = "%ProgramFiles64Dir%\<path to the product>"
+Set $InstallDir$        = "%ProgramFilesDir%\Bacula"
+Set $InstallDir32$      = "%ProgramFiles32Dir%\Bacula"
+Set $InstallDir64$      = "%ProgramFiles64Dir%\Bacula"
 Set $LicenseRequired$ = "false"
 Set $LicensePool$     = "p_" + $ProductId$
@@ -50,75 +68,116 @@
 	isFatalError
 	; Stop process and set installation status to failed
+endif
+
+comment "Show product picture"
+ShowBitmap "%ScriptPath%\logo.png" $ProductId$
+
+if FileExists("%ScriptPath%\delsub3264.ins")
+    comment "Start uninstall sub section"
+    Sub "%ScriptPath%\delsub3264.ins"
+endif
+
+;if $LicenseRequired$ = "true"
+;	comment "Licensing required, reserve license and get license key"
+;	Sub_get_licensekey
+;endif
+
+comment "installing"
+
+if $filedaemon_name$ = ""
+  set $filedaemon_full_name$    = "%PCname%-fd"
+  set $filedaemon_monitor_name$ = "%PCname%-mon"
 else
-	comment "Show product picture"
-	ShowBitmap "%ScriptPath%\logo.png" $ProductId$
-	
-	if FileExists("%ScriptPath%\delsub3264.ins")
-		comment "Start uninstall sub section"
-		Sub "%ScriptPath%\delsub3264.ins"
-	endif
-	
-	;if $LicenseRequired$ = "true"
-	;	comment "Licensing required, reserve license and get license key"
-	;	Sub_get_licensekey
-	;endif
-	
-	comment "installing"
-
-	if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
-		Message "Installing " + $ProductId$ + " 32 Bit..."
-		comment "Start setup program"
-		Winbatch_install_32
-		Sub_check_exitcode
-		;comment "Copy files"
-		;Files_install_32 /32Bit
-		;comment "Patch Registry"
-		;Registry_install /32Bit
-		;comment "Create shortcuts"
-		;LinkFolder_install
-	endif
-
-	if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
-		Message "Installing " + $ProductId$ + " 64 Bit..."
-		comment "Start setup program"
-		Winbatch_install_64
-		Sub_check_exitcode
-		;comment "Copy files"
-		;Files_install_64 /64Bit
-		;comment "Patch Registry"
-		;Registry_install /64Bit
-		;comment "Create shortcuts"
-		;LinkFolder_install
-	endif
-	
-endif
+  set $filedaemon_full_name$    = "$filedaemon_name$-fd"
+  set $filedaemon_monitor_name$ = "$filedaemon_name$-mon"
+endif
+
+
+if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
+    Message "Installing " + $ProductId$ + " 32 Bit..."
+    comment "Start setup program"
+    Winbatch_install_32
+    Sub_check_exitcode
+    ;comment "Copy files"
+    ;Files_install_32 /32Bit
+    ;comment "Patch Registry"
+    ;Registry_install /32Bit
+    ;comment "Create shortcuts"
+    ;LinkFolder_install
+endif
+
+if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
+    Message "Installing " + $ProductId$ + " 64 Bit..."
+    comment "Start setup program"
+    Winbatch_install_64
+    Sub_check_exitcode
+    ;comment "Copy files"
+    ;Files_install_64 /64Bit
+    ;comment "Patch Registry"
+    ;Registry_install /64Bit
+    ;comment "Create shortcuts"
+    ;LinkFolder_install
+endif
+
+;Patches_bacula_conf $InstallDir$+"\bacula-fd.conf"
+DosBatch_bacula-fd.conf
+
+;
+; end
+;
+
+
+
+; winbatch installer:
+; /S silent installl
+; /D destination path 
+;       use this, otherwise it installs to "program files" for all languages.
+;       don't use " around argument, otherwise argument is ignored
 
 [Winbatch_install_32]
-; Choose one of the following examples as basis for your installation
-; You can use $LicenseKey$ var to pass a license key to the installer
-;
-; === Nullsoft Scriptable Install System ================================================================
-; "%ScriptPath%\Setup.exe" /S
-;
-; === MSI package =======================================================================================
-; You may use the parameter PIDKEY=$Licensekey$
-; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress
-;
-; === InstallShield + MSI=====================================================================================
-; Attention: The path to the log file should not contain any whitespaces
-; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=2 REBOOT=ReallySuppress"
-; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress"
-;
-; === InstallShield =====================================================================================
-; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss"
-; "%ScriptPath%\setup.exe" /s /sms /f1"%ScriptPath%\setup.iss" /f2"$LogDir$\$ProductId$.install_log.txt"
-;
-; === Inno Setup ========================================================================================
-; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html
-; You may create setup answer file by: setup.exe /SAVEINF="filename"
-; You may use an answer file by the parameter /LOADINF="filename"
-; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES
-
-"%ScriptPath%\data\bacula-win32-$ProductVer$.exe" /S
+"%ScriptPath%\data\bacula-win32-$ProductVer$.exe" /S /D=$InstallDir32$
+
+[Winbatch_install_64]
+"%ScriptPath%\data\bacula-win64-$ProductVer$.exe" /S /D=$InstallDir64$
+
+[DosBatch_bacula-fd.conf]
+(
+echo # managed by opsi
+echo #
+echo # "Global" File daemon configuration specifications
+echo #
+echo FileDaemon {                            # this is me
+echo   Name = $filedaemon_full_name$
+echo   FDport = 9102                # where we listen for the director
+echo   WorkingDirectory = "$InstallDir32$\\working"
+echo   Pid Directory = "$InstallDir32$\\working"
+echo   Plugin Directory = "$InstallDir32$\\plugins"
+echo   Maximum Concurrent Jobs = 10
+echo }
+;echo 
+echo #
+echo # List Directors who are permitted to contact this File daemon
+echo #
+echo Director {
+echo   Name     = $director_name$
+echo   Password = "$filedaemon_full_password$"
+echo }
+;echo 
+echo #
+echo # Restricted Director, used by tray-monitor to get the
+echo #   status of the file daemon
+echo #
+echo Director {
+echo   Name     = $filedaemon_monitor_name$
+echo   Password = "$filedaemon_monitor_password$"
+echo   Monitor  = yes
+echo }
+;echo 
+echo # Send all messages except skipped files back to Director
+echo Messages {
+echo   Name = Standard
+echo   director = $director_name$ = all, !skipped, !restored
+echo }
+) >> $InstallDir$/bacula-fd.conf
 
 
@@ -128,34 +187,4 @@
 ;
 ; copy -s "%ScriptPath%\files\*.*" "$InstallDir32$"
-
-[Winbatch_install_64]
-; Choose one of the following examples as basis for your installation
-; You can use $LicenseKey$ var to pass a license key to the installer
-;
-; === Nullsoft Scriptable Install System ================================================================
-; "%ScriptPath%\Setup.exe" /S
-;
-; === MSI package =======================================================================================
-; You may use the parameter PIDKEY=$Licensekey$
-; msiexec /i "%ScriptPath%\some.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress
-;
-; === InstallShield + MSI=====================================================================================
-; Attention: The path to the log file should not contain any whitespaces
-; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=2 REBOOT=ReallySuppress"
-; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress"
-;
-; === InstallShield =====================================================================================
-; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss"
-; "%ScriptPath%\setup.exe" /s /sms /f1"%ScriptPath%\setup.iss" /f2"$LogDir$\$ProductId$.install_log.txt"
-;
-; === Inno Setup ========================================================================================
-; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html
-; You may create setup answer file by: setup.exe /SAVEINF="filename"
-; You may use an answer file by the parameter /LOADINF="filename"
-; "%ScriptPath%\setup.exe" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES
-
-"%ScriptPath%\data\bacula-win64-$ProductVer$.exe" /S
-
-
 
 [Files_install_64]
