http://itninja.com/blog/view/use-generic-drive-controller-driver-in-your-image4

He / She talks about the "CA window". I've been searching & searching and the only thing I can come up with is "Custom Actions". But I just don't find it. I'd like to know where I can find this so my package may finally run good and without that 1721 error code.

Thanks!
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Sometimes, I harbour murderous thoughts about idiots who post nonsense like that article.

172x errors mean that the script failed. Setting the CA to ignore the exit code won't make it run properly, it just means that the Windows Installer engine will ignore it!

As ever, a script should be tested outside of the package first. Once it's working, then test it in the CA. It's easy enough to add code to a script so that it runs seamlessly in and out of a CA.

The most common "gotcha" is using 'WScript' directives in the script, e.g. WScript.Echo. WScript invokes the Windows Scripting Host which doesn't exist in the WI engine: it has its own (let's call it) interpreter. Note that this only applies to using WSH properties and methods and NOT to creating objects which use 'WScript' in their class names e.g. WScript.Network or WScript.Shell.

Lastly, note that AppDeploy has a separate forum for Windows Installer Errors here. A moderator may well move the thread there.
Answered 11/19/2009 by: VBScab
Red Belt

Please log in to comment
0
Thank you. I do understand your point.

The script works, that's for sure. It has been tested on several environments.

Personally, in this case, I don't see why they ADD the option to ignore it. If it always results in a failure of your msi, there is no real reason to add that option ...
Answered 11/19/2009 by: Nosfer
Senior Yellow Belt

Please log in to comment
0
The script is the cause of the failure, not the CA. The 'Ignore exit code' option allows packagers to cater for brain-dead developers who return to the OS a non-zero value for success.

EDIT:
Post the script here. Use the CODE tag (click the button marked 'code' or, in older browsers/Firefox, '<%')
Answered 11/19/2009 by: VBScab
Red Belt

Please log in to comment
0
Didn't write the script. My knowledge about scripting is in an infant fase. But this is the one that is included into the MSI by using the scripting editor :




Option Explicit
' this script will add a line to the services-file (if not present yet)
' -----------------------------------------------------------------------------------------
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8
'-------------------------------------------------------------------------------------------

' -----------------------------------------------------------------------------------------
Const LineToAdd = "informix 1525/tcp"
' -----------------------------------------------------------------------------------------
dim Fso, WsShell, WshNetwork
Dim ServicesFileName, System32
Dim bLineInFile, f

' -----------------------------------------------------------------------------------------
Set Fso = wscript.CreateObject("scripting.filesystemobject")
' -----------------------------------------------------------------------------------------

System32 = Fso.GetSpecialFolder(1) 'e.g. c:\windows\System32
ServicesFileName = System32 & "\drivers\etc\Services"
'WScript.Echo ServicesFileName

' first read the line / line and check if the file contains the value... (note : if starts with # : remark....
bLineInFile = CheckIfLineInFile (LineToAdd, "#", ServicesFileName)

'WScript.Echo "Line found : " & bLineInFile

If bLineInFile = False Then
' add line to file...
' --------------------------------------------------------
Set f = Fso.OpenTextFile(ServicesFileName, ForAppending, True)
' add an extra line to be sure the line starts at a new line instead of end of last line
f.Writeline ""
f.WriteLine LineToAdd
set f = Nothing
' --------------------------------------------------------
End if

' *****************************************************************************
Function CheckIfLineInFile(ByVal LineToCheck, ByVal sComment, ByVal FileName)
' *****************************************************************************
Dim oFso, ServFile, line
Dim LineTocheckTrimmed
Dim bLineFound
Set oFso = wscript.CreateObject("scripting.filesystemobject")
bLineFound = False

' remove all spaces to do better comparision
LineTocheckTrimmed = Replace(LineToCheck, " ", "")
' remove comment from the lineToCheck as well
LineTocheckTrimmed = RemoveComment(LineTocheckTrimmed, sComment)

'on Error Resume Next
Set ServFile = oFSO.OpenTextFile( FileName, 1, False)
If Err Then
Err.Clear
CheckIfLineInFile = False
On Error GoTo 0
Exit Function
End if
On Error Goto 0

Do While (not ServFile.AtEndOfStream)
line = ServFile.ReadLine
'WScript.Echo line
line = Trim(line)
'WScript.Echo "Before RemoveComment : " & line

' replace all spaces..
line = Replace(line, " ", "")

' now remove all comments from the string...
line = RemoveComment(line, sComment)
'WScript.Echo "After RemoveComment : " & line

' check if line = line to be checked
If UCase(line) = UCase(LineTocheckTrimmed) then
bLineFound = true
End If

Loop
ServFile.Close
Set oFso = Nothing
CheckIfLineInFile = bLineFound

End Function
' *****************************************************************************

' *****************************************************************************
Function RemoveComment(ByVal LineToCheck, ByVal sComment)
' *****************************************************************************
' this function removes comment from a line...
Dim iWhereCommment
Dim LineModif
LineModif = LineToCheck
iWhereCommment = InStr(1, LineToCheck, sComment)
If iWhereCommment > 0 Then
LineModif = left(LineModif, iWhereCommment - 1)
End If
RemoveComment = LineModif

End Function
' *****************************************************************************

Answered 11/19/2009 by: Nosfer
Senior Yellow Belt

Please log in to comment
0
ORIGINAL: Nosfer

Didn't write the script. My knowledge about scripting is in an infant fase. But this is the one that is included into the MSI by using the scripting editor :





Set Fso = wscript.CreateObject("scripting.filesystemobject")
'





now I am scratching my head. how could that tip by moobear help you in this case
Answered 11/19/2009 by: cygan
Fifth Degree Brown Belt

Please log in to comment
0
You're always welcome to introduce an alternative. Something wrong with that line ?
Answered 11/19/2009 by: Nosfer
Senior Yellow Belt

Please log in to comment
0
Lines 17 and 46 have the 'WScript.' directive I told you about. There are others but they're commented-out so we'll ignore them for now.

Change line 17 fromSet Fso = wscript.CreateObject("scripting.filesystemobject")toSet Fso = CreateObject("scripting.filesystemobject") Line 46 is redundant, since the script has already created an object for the FileSystemObject, so delete line 46 and change line 55 to refer to the already-present FSO object:Set ServFile = oFSO.OpenTextFile( FileName, 1, False)becomesSet ServFile = FSO.OpenTextFile( FileName, 1, False)Delete line 84, or better, move it to line 39 and edit the object from 'oFSO' to simply 'FSO'.
Answered 11/19/2009 by: VBScab
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity