Wise Package Validation Tool
Hi, I am in need of some help, so I can stop banging my head against a brick wall.
I am adding a key in to the HKLM\Software\Companyname\Application\Appname\Appver in the registry in my msi package. This is all working ok etc
I want to use the Wise Package Validation tool in Wise Studio Professional V4 to check the package and ensure that the key exists.
I want to do this in vbscript.
The problem I have is that I am unsure where to start with this, as the Wise documentation doesnt really extend as far as discussing custom cub files.
Can someone please provide me with an example vbscript to do this so I can see how this is done please? I am unsure how to get the vbscript to check the path, and I am unsure how to return a code back to the package validater tool, to flag an error if it does not exist.
Can anyone please help, I would be most greatful.
Many thanks
Paul E Davey
I am adding a key in to the HKLM\Software\Companyname\Application\Appname\Appver in the registry in my msi package. This is all working ok etc
I want to use the Wise Package Validation tool in Wise Studio Professional V4 to check the package and ensure that the key exists.
I want to do this in vbscript.
The problem I have is that I am unsure where to start with this, as the Wise documentation doesnt really extend as far as discussing custom cub files.
Can someone please provide me with an example vbscript to do this so I can see how this is done please? I am unsure how to get the vbscript to check the path, and I am unsure how to return a code back to the package validater tool, to flag an error if it does not exist.
Can anyone please help, I would be most greatful.
Many thanks
Paul E Davey
0 Comments
[ + ] Show comments
Answers (5)
Please log in to answer
Posted by:
bkelly
20 years ago
I don't know of anyone who has had a requirement to build their own CUB and documentation seems a bit sketchy. Check here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/building_an_ice_database.asp
If you have not already, there is an example CUB that may give you a good starting point.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/building_an_ice_database.asp
If you have not already, there is an example CUB that may give you a good starting point.
Posted by:
Aaron
20 years ago
Posted by:
pauledavey
20 years ago
Posted by:
jmcfadyen
20 years ago
are you just trying to add a tag into the registry ?
this is rather easy using the macro editor.
heres an example.
Sub subCreateReg(szRegistry,szRoot,szKey,szName,szValue,szComponent)
'Written by John McFadyen
'huckey@mindless.com
Dim szKeyExists
Dim rowRegistry
szkeyexists = 0
For Each rowRegistry In tblRegistry.WRows
If rowRegistry("Registry") = szRegistry Then
szkeyexists = 1
Exit For
End If
Next
If szkeyexists = 1 Then
rowRegistry("Root") = szRoot
rowRegistry("Key") = szKey
rowRegistry("Name") = szName
rowRegistry("Value") = szValue
rowRegistry("Component_") = szComponent
' objlogfile.writeline "EXISTING Registry"
' objlogfile.writeline " ,Registry:" & szRegistry
' objlogfile.writeline " ,Root:" & szRoot
' objlogfile.writeline " ,Key:" & szKey
' objlogfile.writeline " ,Name:" & szName
' objlogfile.writeline " ,Value:" & szValue
' objlogfile.writeline " ,Component_:" & szComponent
' objlogfile.writeline ""
Else
Set rowNew = tblRegistry.NewWRow(True)
rowNew("Registry") = szRegistry
rowNew("Root") = szRoot
rowNew("Key") = szKey
rowNew("Name") = szName
rowNew("Value") = szValue
rowNew("Component_") = szComponent
' objlogfile.writeline "Creating Registry,"
' objlogfile.writeline " ,Registry:" & szRegistry
' objlogfile.writeline " ,Root:" & szRoot
' objlogfile.writeline " ,Key:" & szKey
' objlogfile.writeline " ,Name:" & szName
' objlogfile.writeline " ,Value:" & szValue
' objlogfile.writeline " ,Component_:" & szComponent
' objlogfile.writeline ""
End If
Set szKeyExists = Nothing
Set rowRegistry = Nothing
End Sub
subCreateReg(szRegistry1,szRoot1,szKey1,szName1,szValue1,szComponent1)
subCreateReg(szRegistry2,szRoot2,szKey2,szName2,szValue2,szComponent2)
subCreateReg(szRegistry3,szRoot3,szKey3,szName3,szValue3,szComponent3)
do the same for all other tables you want to add things into.
ps huckey@mindless.com
this is rather easy using the macro editor.
heres an example.
Sub subCreateReg(szRegistry,szRoot,szKey,szName,szValue,szComponent)
'Written by John McFadyen
'huckey@mindless.com
Dim szKeyExists
Dim rowRegistry
szkeyexists = 0
For Each rowRegistry In tblRegistry.WRows
If rowRegistry("Registry") = szRegistry Then
szkeyexists = 1
Exit For
End If
Next
If szkeyexists = 1 Then
rowRegistry("Root") = szRoot
rowRegistry("Key") = szKey
rowRegistry("Name") = szName
rowRegistry("Value") = szValue
rowRegistry("Component_") = szComponent
' objlogfile.writeline "EXISTING Registry"
' objlogfile.writeline " ,Registry:" & szRegistry
' objlogfile.writeline " ,Root:" & szRoot
' objlogfile.writeline " ,Key:" & szKey
' objlogfile.writeline " ,Name:" & szName
' objlogfile.writeline " ,Value:" & szValue
' objlogfile.writeline " ,Component_:" & szComponent
' objlogfile.writeline ""
Else
Set rowNew = tblRegistry.NewWRow(True)
rowNew("Registry") = szRegistry
rowNew("Root") = szRoot
rowNew("Key") = szKey
rowNew("Name") = szName
rowNew("Value") = szValue
rowNew("Component_") = szComponent
' objlogfile.writeline "Creating Registry,"
' objlogfile.writeline " ,Registry:" & szRegistry
' objlogfile.writeline " ,Root:" & szRoot
' objlogfile.writeline " ,Key:" & szKey
' objlogfile.writeline " ,Name:" & szName
' objlogfile.writeline " ,Value:" & szValue
' objlogfile.writeline " ,Component_:" & szComponent
' objlogfile.writeline ""
End If
Set szKeyExists = Nothing
Set rowRegistry = Nothing
End Sub
subCreateReg(szRegistry1,szRoot1,szKey1,szName1,szValue1,szComponent1)
subCreateReg(szRegistry2,szRoot2,szKey2,szName2,szValue2,szComponent2)
subCreateReg(szRegistry3,szRoot3,szKey3,szName3,szValue3,szComponent3)
do the same for all other tables you want to add things into.
ps huckey@mindless.com
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.