/build/static/layout/Breadcrumb_cap_w.png

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

0 Comments   [ + ] Show comments

Answers (5)

Posted by: pauledavey 20 years ago
Yellow Belt
0
Has anyone got any idea's?? Please?? [:o]
Posted by: bkelly 20 years ago
Red Belt
0
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.
Posted by: Aaron 20 years ago
Senior Yellow Belt
0
An alternative would be to use the Macro Editor and have it run at Compile time to check if the key exists in the registry table. Refer to chapter 18 of the Windows Installer Reference manual for more information about OLE automation and the macro editor.
Posted by: pauledavey 20 years ago
Yellow Belt
0
I have managed to get some things working, but I cant get some very basic functionalty working. IT seems like some vbscript coding just wont work!! Back to the drawing board I guess!!!![:@]
Posted by: jmcfadyen 20 years ago
5th Degree Black Belt
0
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
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ