I am trying to set up a ASP web page to automatically show the Current version and Date of an MSI package that I uploaded to my web site.
The code works in VB.NET but when I try to convert it to ASP, I get an error on the OpenView. Any idea?
Code:<% dim f, wi, fs, db, vu, fmt, full, sql full = Server.MapPath("./pkg.msi") set wi = Server.CreateObject("WindowsInstaller.Installer") set fs = Server.CreateObject("Scripting.FileSystemObject") sql = "SELECT * FROM property WHERE Property='ProductVersion'" if fs.FileExists(full) = True then set db = wi.OpenDatabase(full, 0) set vu = db.Openview(sql) vu.execute() Response.Write("Version=" & VU.fetch) vu.close() set f = fs.GetFile(full) dt = f.DateLastModified fmt = Year(dt) & "/" & right(100+Month(Dt),2) & "/" & right(100+Day(dt),2) & " " & right(100+Hour(dt),2) & ":" & right(100+Minute(dt),2) & ":" & right(100+Second(dt),2) Response.Write("Date=" & fmt) end if %>




Reply With Quote