DoctorDeploy.com - Das unabhängige Forum für Installation und Softwareverteilung Your Ad Here    
Doctor Deploy: software deployment, - distribution, repackaging, msi, windows installer, client management, installation, setup : forum - discussion boards 
  Search   •  RSS/Newsletter   •  Shop   •  Register  •  Profile  •  Log in to check your private messages  •  Log in
 .pcp File über Console bearbeiten View next topic
View previous topic
Post new topicReply to topic
Author Message
cytrics
Piccolo
Piccolo


Joined: 19 Jul 2006
Posts: 4

PostPosted: Wed, 19.Jul.2006, 07:41 Back to top

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...
View user's profileSend private message
Dominik Oberlin
Melchior
Melchior


Joined: 29 May 2006
Posts: 29

PostPosted: Thu, 10.Aug.2006, 14:14 Back to top

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 user's profileSend private message
AddThis Social Bookmark Button
Display posts from previous:      
Post new topicReply to topic


 Jump to:   



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