 |
Doctor Deploy: software deployment, - distribution, repackaging, msi, windows installer, client management, installation, setup : forum - discussion boards
|
| Author |
Message |
cytrics
Piccolo


Joined: 19 Jul 2006
Posts: 4
|
Posted:
Wed, 19.Jul.2006, 07:41 |
 |
Hy,
weiß jemand, wie man bzw. ob man ein .pcp (z.B. template.pcp) über die Befehlszeile ändern bzw. bearbeiten kann. Mit Orca ist es ja kein Problem, aber ich möchte das ganze wie geagt über die Kommandozeile machen. Orca kann zwar über die CMD aufgerufen werden, aber ändern bzw. eintragen kann ich nichts (zumindest hat es bei mir nicht funktioniert...)
Danke schon mal... |
|
|
  |
 |
Dominik Oberlin
Melchior

Joined: 29 May 2006
Posts: 29
|
Posted:
Thu, 10.Aug.2006, 14:14 |
 |
Hallo cytrix
Du kannst das Patch Creation Property File (.PCP) über das Windows Installer API oder das Automationsmodell bearbeiten, so wie MSI-Dateien auch.
Beispiel via Visual Basic Script:
| Code: |
Dim oDatabase, oInstaller, oEditItem, cFullName, cRow, cField
Const msiOpenDatabaseModeTransact = 1
cFullName = "C:\Template.pcp"
CRow = "PatchOutputPath"
cField = "c:\TEST3.msp"
On Error Resume Next
Set oDataBase = Nothing
Set oInstaller = Wscript.CreateObject("WindowsInstaller.Installer")
Set oDatabase = oInstaller.OpenDatabase(cFullName, msiOpenDatabaseModeTransact)
On Error goto 0
if oDatabase Is Nothing then
msgbox cFullName & " ist zurzeit geöffnet oder nicht vorhanden und kann nicht bearbeitet werden!"
wscript.quit()
end if
' Bspl. Löschen und Setzen einer Zeile
Set oEditItem = oDatabase.OpenView("DELETE FROM Properties WHERE Name='PatchOutputPath'")
oEditItem.Execute
Set oEditItem = oDatabase.OpenView("INSERT INTO Properties (Name,Value) VALUES ('" & cRow & "','" & cField & "')")
oEditItem.Execute
oDatabase.Commit
msgbox cFullName & " erfolgreich gepatched." |
|
|
|
  |
 |
|
|
|
|
|
View next topic
View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Service provided by flatbyte.com
::
Powered by phpBB
:: FI Theme
:: Imprint ::
All times are GMT + 1 Hour
| |