Is there a way to "recompile" an MSI from the command line? We have a script we want to put into every OSD file, but then you have to open the SPRJ file in the sequencer and hit save (with the create MSI box checked), otherwise the MSI has the old OSD file.

Is there a quicker way to do this? Can I modify the base OSD template to include my script?

here is a link to the sequencer command line:

http://technet.microsoft.com/en-us/library/cc843675.aspx

thanks for your help

Mike
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
App-V support files are invariably in XML format so you could use the MS XML Parser object (which every system with XP and above should have) in script. There are a myriad of sample scripts around that will show you how to add elements and attributes to an XML using the parser.
Answered 02/19/2010 by: VBScab
Red Belt

Please log in to comment
0
Try using OSD Editor from Login consultant whcih is free tool and helps a lot. And for detail try http://www.tmurgent.com/OSD_Illustrated.aspx
Answered 03/12/2010 by: srini
Yellow Belt

Please log in to comment
0
I swore some lesser known programer made an OSD Search and Replace type tool but I cannot find it. I have some code that can show you how to use the XML parser via vbscript but it is supplied as is and is a little ugly too as this was written many years ago and I don't think this was the final code we used.

Set xmlDoc = CreateObject("MSXML2.DOMDocument")
OsdPath = InputBox("i.e. \\softgridserver\content\SoftgridTest\WinZip.osd", "Please enter UNC Path to OSD", "\\softseq001\content\SoftgridTest\WinZip.osd")

'Check that the file is available and ready for writing.
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set File = objFSO.OpenTextFile(OsdPath, 8)
File.Close


'Load the doc supplied
xmlDoc.Load (OsdPath)

'Check the XML formatting
If xmlDoc.parseError.errorCode <> 0 Then
MsgBox("Parse Error line " & xmlDoc.parseError.line & ", character " & _
xmlDoc.parseError.linePos & vbCrLf & xmlDoc.parseError.srcText)
End If


'Get some OSD info
Set RootObj = xmlDoc.selectSingleNode("//CODEBASE")
Set RTSPPath = RootObj.getElementsByTagName("HREF")

'Prep the strings for some checks later on.
Realpath = RootObj.getAttribute("HREF")
WScript.Echo Realpath
RTSPCheckArr = Split(Realpath, ":554/", 2)
WScript.Echo RTSPCheckArr(0)
WScript.Echo RTSPCheckArr(1)

'Check the server name
If RTSPCheckArr(0) = "rtsp://softseq001" Then
WScript.Echo "It's Good!"
Else
WScript.Echo RTSPCheckArr(0) & " is wrong!"
End If

'Convert the necessary strings for some checks with the OSD.
FolderCheck = Split(OsdPath, "\content\", 2)
WScript.Echo FolderCheck(1)
FolderCheckConvOSD = Replace(FolderCheck(1), "\", "/")
FolderCheckConvSFT = Replace(FolderCheckConvOSD, ".osd", ".sft")
WScript.Echo "Folderconv: " & FolderCheckConvSFT
WScript.Echo "FromOSD: " & RTSPCheckArr(1)

If FolderCheckConvSFT = RTSPCheckArr(1) Then
WScript.Echo "Folder path matches!"
Else
WScript.Echo "Content folder does not match."
End If
Answered 03/15/2010 by: kkaminsk
Ninth Degree Black Belt

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