I've created the following script so far...
This script runs without an error and Runs in the UI Interface (immediate), but when I check the Folder, no permissions are set.
Do I overlooked something in my script?
I want to create a MSI template that can be used by co workers, so that they only need to add a property. The rest of the actions will be
applied by the msi CA.
[CODE]'Count GGA_GROUP from property Table
domain = session.property("DOMAIN")
cnt = 1
chk = 0
while chk <> 1
GGA_GRP = "GGA_GROUP_" & cnt
val = session.property (GGA_GRP)
if val = "" then
chk = 1
end if
if val <> "" then
cnt = cnt + 1
end if
wend
cnt = cnt - 1
'Set [INSTALLDIR] lockpermission with GGA_GROUP
Set dbSession = Session.database
Set View = dbSession.OpenView("Select * From LockPermissions")
View.Execute
set Record = View.Fetch
View.Modify 6, Record
View.Close
cnt2 = 0
while cnt2 <> cnt
if cnt2 = 0 then
cnt2 = 1
GGA_GRP = "GGA_GROUP_" & cnt2
val = session.property (GGA_GRP)
GRP_PERM = "GGA_GROUP_PERM_" & cnt2
perm = session.property (GRP_PERM)
if perm = "" then
perm = "537002153"
end if
if perm = "re" then
perm = "537002153"
end if
if perm = "full" then
perm = "1880031743"
end if
addlockperm()
else
cnt2 = cnt2 + 1
GGA_GRP = "GGA_GROUP_" & cnt2
val = session.property (GGA_GRP)
GRP_PERM = "GGA_GROUP_PERM_" & cnt2
perm = session.property (GRP_PERM)
if perm = "" then
perm = "537002153"
end if
if perm = "re" then
perm = "537002153"
end if
if perm = "full" then
perm = "1880031743"
end if
addlockperm()
end if
wend
Function addlockperm()
Set InstSession = Session.Installer
Set View = dbSession.OpenView("Select * From LockPermissions")
View.Execute
Set newRecord = InstSession.CreateRecord(5)
newRecord.StringData(1) = "INSTALLDIR"
newRecord.StringData(2) = "CreateFolder"
newRecord.StringData(3) = domain
newRecord.StringData(4) = val
'newRecord.IntegerData(5) = int(perm)
newRecord.StringData(5) = perm
View.Modify 7, newRecord
View.Execute
view.Close
End Function[/CODE]