-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMSISetDefaultProperties.vbs
34 lines (30 loc) · 1.24 KB
/
MSISetDefaultProperties.vbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
set objInstaller = CreateObject("WindowsInstaller.Installer")
set objDatabase = objInstaller.OpenDatabase("LogChipperSetup\Release\LogChipperSetup.msi", 1)
strWQL = "SELECT Property, Value FROM Property Where Property = 'EDITA1'"
Set objMSIView = objDatabase.OpenView(strWQL)
objMSIView.Execute
Set objMSIRecord = objMSIView.Fetch
objMSIRecord.StringData(2) = "C:\Temp\test.log"
objMSIView.Modify 2, objMSIRecord
objDatabase.Commit
strWQL = "SELECT Property, Value FROM Property Where Property = 'EDITA2'"
Set objMSIView = objDatabase.OpenView(strWQL)
objMSIView.Execute
Set objMSIRecord = objMSIView.Fetch
objMSIRecord.StringData(2) = "localhost"
objMSIView.Modify 2, objMSIRecord
objDatabase.Commit
strWQL = "SELECT Property, Value FROM Property Where Property = 'EDITA3'"
Set objMSIView = objDatabase.OpenView(strWQL)
objMSIView.Execute
Set objMSIRecord = objMSIView.Fetch
objMSIRecord.StringData(2) = "514"
objMSIView.Modify 2, objMSIRecord
objDatabase.Commit
strWQL = "SELECT Property, Value FROM Property Where Property = 'EDITA4'"
Set objMSIView = objDatabase.OpenView(strWQL)
objMSIView.Execute
Set objMSIRecord = objMSIView.Fetch
objMSIRecord.StringData(2) = "TCP"
objMSIView.Modify 2, objMSIRecord
objDatabase.Commit