Iceman7329 Posted July 11, 2006 Share Posted July 11, 2006 Hello, I'm trying to update the MSI summary of an standard msi package we use. We used to change it with an vbscript function wich works perfect. But when i try to use is in autoit it somehow doesn't work I can read the summary properties but can't seem to update them! Maybe I'm doing something wrong?? I've been searching the forums and googled my brains out!! but can't find the problem. Here is the vbscript function Function WriteSummary (strFilename,ByVal strPackageCodeValue) 'On Error Resume Next Dim installer : Set installer = Nothing Set installer = WScript.CreateObject("WindowsInstaller.installer") Dim sumInfo : Set sumInfo = installer.SummaryInformation (strFilename,1) 'msgbox sumInfo.property(9) sumInfo.property(9) = strPackageCodeValue sumInfo.Persist 'msgbox sumInfo.property(9) Set installer = Nothing Set sumInfo = Nothing End Function And here is the same function i rewrote in autoit Func WriteSummary ($strFilename, $strPackageCodeValue) ;option explicit dim $oinstaller, $osuminfo, $odatabase $oinstaller = ObjCreate("WindowsInstaller.Installer") $odatabase = $oinstaller.opendatabase($strFilename, 1) $osuminfo = $odatabase.SummaryInformation (99) MsgBox (4096, "AppID!!", $osumInfo.property(9)) $osuminfo.Property(9) = $strPackageCodeValue $osuminfo.Persist $odatabase.Commit EndFunc Can anyone tell me what i'm doing wrong???? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now