Seite 1 von 1

Problem with localboot software deployment

Verfasst: 17 Jul 2012, 09:06
von carles
Hello,

I'm newbie with opsi but i'm really enjoying with it, I have a server configured and some clients with the agent, the predefined opsi localboot packages are being installed without problems but when i try to define my own software products I'm receiving an error, here you have the error log, maybe somebody know whats this issue, I don't have experience with windows scripting methodologies

instlog

[4] [7/16/2012 23:09:57] Warning: file not found :p:\7zip\setup -retrying
[4] [7/16/2012 23:09:57] Warning: file not found :p:\7zip\setup -retrying
[4] [7/16/2012 23:09:57] Warning: file not found :p:\7zip\setup -retrying
[4] [7/16/2012 23:09:58] Warning: file not found :p:\7zip\setup -retrying
[4] [7/16/2012 23:09:58] Warning: file not found :p:\7zip\setup -retrying
[4] [7/16/2012 23:09:59] Warning: file not found :p:\7zip\setup -retrying
[4] [7/16/2012 23:09:59] Warning: file not found :p:\7zip\setup -retrying
[4] [7/16/2012 23:10:00] Warning: file not found :p:\7zip\setup -retrying
[4] [7/16/2012 23:10:00] Warning: file not found :p:\7zip\setup -retrying
[4] [7/16/2012 23:10:00] Warning: file not found :p:\7zip\setup -retrying
[4] [7/16/2012 23:10:01] Warning: file not found :p:\7zip\setup - giving up
[4] [7/16/2012 23:10:01] Script p:\7zip\setup not found File Err. No. 2 (The system cannot find the file specified.
) - retrying
[4] [7/16/2012 23:10:02] Warning: file not found :p:\7zip\setup -retrying
[4] [7/16/2012 23:10:02] Warning: file not found :p:\7zip\setup -retrying
[4] [7/16/2012 23:10:03] Warning: file not found :p:\7zip\setup -retrying
[4] [7/16/2012 23:10:03] Warning: file not found :p:\7zip\setup -retrying
[4] [7/16/2012 23:10:03] Warning: file not found :p:\7zip\setup -retrying
[4] [7/16/2012 23:10:04] Warning: file not found :p:\7zip\setup -retrying
[4] [7/16/2012 23:10:04] Warning: file not found :p:\7zip\setup -retrying
[4] [7/16/2012 23:10:05] Warning: file not found :p:\7zip\setup -retrying
[4] [7/16/2012 23:10:05] Warning: file not found :p:\7zip\setup -retrying
[4] [7/16/2012 23:10:05] Warning: file not found :p:\7zip\setup -retrying
[4] [7/16/2012 23:10:06] Warning: file not found :p:\7zip\setup - giving up
[3] [7/16/2012 23:10:06] Script p:\7zip\setup not found File Err. No. 2 (The system cannot find the file specified.
) - giving up
[5] [7/16/2012 23:10:06] Error level set to fatal
[6] [7/16/2012 23:10:06] JSON service request https://172.20.180.28:4447/rpc setProductActionRequest
[1] [7/16/2012 23:10:06] product "7zip set to update
[1] [7/16/2012 23:10:06] Update script name:
[5] [7/16/2012 23:10:06] no script file name given
[1] [7/16/2012 23:10:06] we have no update script
[6] [7/16/2012 23:10:06] JSON service request https://172.20.180.28:4447/rpc productOnClient_updateObject
[6] [7/16/2012 23:10:06] Registry key [HKLM\SOFTWARE\opsi.org\winst] opened
[6] [7/16/2012 23:10:06] Variable "RebootRequested" is keeping its value "0"
[6] [7/16/2012 23:10:06] Variable "LastLogFilename" is keeping its value "c:\tmp\instlog.txt"
[6] [7/16/2012 23:10:06] Variable "ContinueLogFile" is keeping its value "0"
[6] [7/16/2012 23:10:06] Variable "NumberOfErrors" not found. Code: 2
[6] [7/16/2012 23:10:06] Key flushed
[6] [7/16/2012 23:10:06] Key closed
[6] [7/16/2012 23:10:08] JSON service request https://172.20.180.28:4447/rpc backend_exit
[1] [7/16/2012 23:10:08] ============ winst Version 4.11.2.9 WIN32 is regularly exiting. Time 2012-07-16 23:10:08 .

What i'm tryin to do is to execute an exe that comes from a compilation of an AutoIT script with the original exe added to it, the executable works well if I copy it to the client manually.
Here you have the setup.ins file I created modifying the tightVNC script from the Wiki. This is the only file I generated.

[Initial]
LogLevel=9
; Log Errors in Logfile but don't abort:
ExitOnError=false
; Show syntax errors in the script:
ScriptErrorMessages=on
; Dont trace step by step through the script:
TraceMode=off
; let started programs run in front of the winst window
StayOnTop=false


[Actions]
; requiredWinstVersion >= "4.10.8.6"

DefVar $UninstallProgram32$
DefVar $UninstallProgram64$
DefVar $LogDir$
DefVar $ProductId$
DefVar $MinimumSpace$
DefVar $InstallDir32$
DefVar $InstallDir64$
DefVar $ExitCode$
DefVar $LicenseRequired$
DefVar $LicenseKey$
DefVar $LicensePool$
DefVar $INST_SystemType$
DefVar $INST_architecture$
DefVar $Version$
DefVar $Inst_Cmd32$
DefVar $Inst_Cmd64$
DefVar $Inst_Prg$
DefVar $Uninst_Prg$

Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")


Set $LogDir$ = "%SystemDrive%\tmp"

; ----------------------------------------------------------------
; - Please edit the following values -
; ----------------------------------------------------------------
;$ProductId$ should be the name of the product in opsi
; therefore please: only lower letters, no umlauts,
; no white space use '-' as a seperator
Set $ProductId$ = "7zip"
Set $Version$ = "9.20"
Set $MinimumSpace$ = "3 MB"
; the path were we find the product after the installation
Set $InstallDir32$ = "%ProgramFilesDir%\7-Zip"
Set $InstallDir64$ = "%ProgramFilesDir%\7-Zip"
Set $LicenseRequired$ = "false"
Set $LicensePool$ = "p_" + $ProductId$
Set $Inst_Prg$ = "7zip.exe"
; Set $Uninst_Prg$ = "uninstall.exe"
; Set $Inst_Cmd32$ = '/S'
; Set $Inst_Cmd64$ = '/S'
; ----------------------------------------------------------------

if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
isFatalError
; Stop process and set installation status to failed
else
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".jpg" $ProductId$

if FileExists("%ScriptPath%\delsub.ins")
comment "Start uninstall sub section"
Sub "%ScriptPath%\delsub.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
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
endif

endif

[Winbatch_install_32]
%ScriptPath%\$Inst_Prg$ $Inst_Cmd32$
; regedit /S "%ScriptPath%\TightVNC.reg"

[Winbatch_install_64]
%ScriptPath%\$Inst_Prg$ $Inst_Cmd32$
; regedit /S "%ScriptPath%\TightVNC_win7.reg"

[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
; informations to exit codes see
; http://msdn.microsoft.com/en-us/library ... S.85).aspx
; http://msdn.microsoft.com/en-us/library/aa368542.aspx
if ($ExitCode$ = "0")
comment "Looks good: setup program gives exitcode zero"
else
comment "Setup program gives a exitcode unequal zero: " + $ExitCode$
if ($ExitCode$ = "1605")
comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed."
comment "Uninstall of a not installed product failed - no problem"
else
if ($ExitCode$ = "1641")
comment "looks good: setup program gives exitcode 1641"
comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success."
else
if ($ExitCode$ = "3010")
comment "looks good: setup program gives exitcode 3010"
comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success."
else
logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
isFatalError
endif
endif
endif
endif

Thank you very much,
Carles Cortes

Re: Problem with localboot software deployment

Verfasst: 17 Jul 2012, 11:14
von d.oertel
Hi,

I think you are not running the script that has posted.
Perhaps you we could see more at the missing starting part of the log.

regards
d.oertel

Re: Problem with localboot software deployment

Verfasst: 17 Jul 2012, 11:31
von carles
First of all, thank you for your fast answer, i'm very grateful

I just rechecked everything to be sure I don't waste your time, here is the full log:

[1] [7/17/2012 2:26:05] opsi-winst 4.11.2.9 started at >>7/17/2012 2:26:04
[1] [7/17/2012 2:26:05] startmessage winst created at CentralForm.FormCreate: 7/17/2012 2:26:04
[1] [7/17/2012 2:26:05] startmessage StartProgramModes and create log: 7/17/2012 2:26:04
[1] [7/17/2012 2:26:05] startmessage start opsi service connection: 7/17/2012 2:26:04
[1] [7/17/2012 2:26:05] startmessage create log: 7/17/2012 2:26:05
[6] [7/17/2012 2:26:05] JSON service request https://172.20.180.28:4447/rpc getDepotId
[6] [7/17/2012 2:26:05] JSON service request https://172.20.180.28:4447/rpc backend_setOptions
[6] [7/17/2012 2:26:05] JSON service request https://172.20.180.28:4447/rpc productOnClient_getObjects
[5] [7/17/2012 2:26:05] Computername:w7fog.etower.pek.mcon.net
[5] [7/17/2012 2:26:05] Computername according to Environment Variable :W7FOG
[5] [7/17/2012 2:26:05] opsi service URL https://172.20.180.28:4447
[5] [7/17/2012 2:26:05] Depot path: p:\
[5] [7/17/2012 2:26:05]
[5] [7/17/2012 2:26:05] bootmode BKSTD
[5] [7/17/2012 2:26:05] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[5] [7/17/2012 2:26:05] Resolved sequence of products (7/17/2012 2:26:05):
[5] [7/17/2012 2:26:05] Product 4 7zip : setup
[5] [7/17/2012 2:26:05] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[6] [7/17/2012 2:26:05] JSON service request https://172.20.180.28:4447/rpc getProductProperties_hash
[6] [7/17/2012 2:26:06] JSON service request https://172.20.180.28:4447/rpc getProduct_hash
[6] [7/17/2012 2:26:06] JSON service request https://172.20.180.28:4447/rpc productOnClient_getObjects
[5] [7/17/2012 2:26:06] scriptname: "setup", special path: "p:\7zip\"
[6] [7/17/2012 2:26:06] JSON service request https://172.20.180.28:4447/rpc productOnClient_updateObject
[4] [7/17/2012 2:26:06] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:06] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:07] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:07] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:08] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:08] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:08] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:09] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:09] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:10] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:10] Warning: file not found :p:\7zip\setup - giving up
[4] [7/17/2012 2:26:10] Script p:\7zip\setup not found File Err. No. 2 (The system cannot find the file specified.
) - retrying
[4] [7/17/2012 2:26:11] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:11] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:12] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:12] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:13] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:13] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:14] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:14] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:14] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:15] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:15] Warning: file not found :p:\7zip\setup - giving up
[4] [7/17/2012 2:26:15] Script p:\7zip\setup not found File Err. No. 2 (The system cannot find the file specified.
) - retrying
[4] [7/17/2012 2:26:16] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:17] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:17] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:18] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:18] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:18] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:19] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:19] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:20] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:20] Warning: file not found :p:\7zip\setup -retrying
[4] [7/17/2012 2:26:20] Warning: file not found :p:\7zip\setup - giving up
[3] [7/17/2012 2:26:20] Script p:\7zip\setup not found File Err. No. 2 (The system cannot find the file specified.
) - giving up
[5] [7/17/2012 2:26:20] Error level set to fatal
[6] [7/17/2012 2:26:20] JSON service request https://172.20.180.28:4447/rpc setProductActionRequest
[1] [7/17/2012 2:26:21] product "7zip set to update
[1] [7/17/2012 2:26:21] Update script name:
[5] [7/17/2012 2:26:21] no script file name given
[1] [7/17/2012 2:26:21] we have no update script
[6] [7/17/2012 2:26:21] JSON service request https://172.20.180.28:4447/rpc productOnClient_updateObject
[6] [7/17/2012 2:26:21] Registry key [HKLM\SOFTWARE\opsi.org\winst] opened
[6] [7/17/2012 2:26:21] Variable "RebootRequested" is keeping its value "0"
[6] [7/17/2012 2:26:21] Variable "LastLogFilename" is keeping its value "c:\tmp\instlog.txt"
[6] [7/17/2012 2:26:21] Variable "ContinueLogFile" is keeping its value "0"
[6] [7/17/2012 2:26:21] Variable "NumberOfErrors" not found. Code: 2
[6] [7/17/2012 2:26:21] Key flushed
[6] [7/17/2012 2:26:21] Key closed
[6] [7/17/2012 2:26:22] JSON service request https://172.20.180.28:4447/rpc backend_exit
[1] [7/17/2012 2:26:22] ============ winst Version 4.11.2.9 WIN32 is regularly exiting. Time 2012-07-17 02:26:22 .

As I said, setup.ins is the only script file i created to generate the packet:

[root@pxe01]: /home/opsiproducts/7zip # tree
.
├── 7zip_1.0-1.opsi
├── CLIENT_DATA
│   ├── 7zip.exe
│   ├── 7zip.jpg
│   └── setup.ins
├── OPSI
│   ├── control
│   ├── postinst
│   └── preinst
└── SERVER_DATA

and here you have the setup.ins file

[Initial]
LogLevel=9
; Log Errors in Logfile but don't abort:
ExitOnError=false
; Show syntax errors in the script:
ScriptErrorMessages=on
; Dont trace step by step through the script:
TraceMode=off
; let started programs run in front of the winst window
StayOnTop=false


[Actions]
; requiredWinstVersion >= "4.10.8.6"

DefVar $UninstallProgram32$
DefVar $UninstallProgram64$
DefVar $LogDir$
DefVar $ProductId$
DefVar $MinimumSpace$
DefVar $InstallDir32$
DefVar $InstallDir64$
DefVar $ExitCode$
DefVar $LicenseRequired$
DefVar $LicenseKey$
DefVar $LicensePool$
DefVar $INST_SystemType$
DefVar $INST_architecture$
DefVar $Version$
DefVar $Inst_Cmd32$
DefVar $Inst_Cmd64$
DefVar $Inst_Prg$
DefVar $Uninst_Prg$

Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")


Set $LogDir$ = "%SystemDrive%\tmp"

; ----------------------------------------------------------------
; - Please edit the following values -
; ----------------------------------------------------------------
;$ProductId$ should be the name of the product in opsi
; therefore please: only lower letters, no umlauts,
; no white space use '-' as a seperator
Set $ProductId$ = "7zip"
Set $Version$ = "9.20"
Set $MinimumSpace$ = "3 MB"
; the path were we find the product after the installation
Set $InstallDir32$ = "%ProgramFilesDir%\7-Zip"
Set $InstallDir64$ = "%ProgramFilesDir%\7-Zip"
Set $LicenseRequired$ = "false"
Set $LicensePool$ = "p_" + $ProductId$
Set $Inst_Prg$ = "7zip.exe"
; Set $Uninst_Prg$ = "uninstall.exe"
; Set $Inst_Cmd32$ = '/S'
; Set $Inst_Cmd64$ = '/S'
; ----------------------------------------------------------------

if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
isFatalError
; Stop process and set installation status to failed
else
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".jpg" $ProductId$

if FileExists("%ScriptPath%\delsub.ins")
comment "Start uninstall sub section"
Sub "%ScriptPath%\delsub.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
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
endif

endif

[Winbatch_install_32]
%ScriptPath%\$Inst_Prg$ $Inst_Cmd32$
regedit /S "%ScriptPath%\TightVNC.reg"

[Winbatch_install_64]
%ScriptPath%\$Inst_Prg$ $Inst_Cmd32$
; regedit /S "%ScriptPath%\TightVNC_win7.reg"

[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
; informations to exit codes see
; http://msdn.microsoft.com/en-us/library ... S.85).aspx
; http://msdn.microsoft.com/en-us/library/aa368542.aspx
if ($ExitCode$ = "0")
comment "Looks good: setup program gives exitcode zero"
else
comment "Setup program gives a exitcode unequal zero: " + $ExitCode$
if ($ExitCode$ = "1605")
comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed."
comment "Uninstall of a not installed product failed - no problem"
else
if ($ExitCode$ = "1641")
comment "looks good: setup program gives exitcode 1641"
comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success."
else
if ($ExitCode$ = "3010")
comment "looks good: setup program gives exitcode 3010"
comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success."
else
logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
isFatalError
endif
endif
endif
endif

Thank you for your help
Carles Cortes

Re: Problem with localboot software deployment

Verfasst: 18 Jul 2012, 05:57
von carles
Hey... I found the error myself, I did a mistake, and a very stupid one:
When I used the opsi-newprod tool, in the place of specify "setup.ins" I just put "setup" there without the extension. Yep... sometimes I don't even understand myself.

Anyway, thank you very much for your help d.oertel.

Carles Cortes