Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-22-2014, 09:32 AM
HippyCraig HippyCraig is offline
Registered User
 
Join Date: 07-27-2006
Location: Philly
Posts: 211
Programmatically creating an action

I am creating a script to modify multiple scripts. I have a loop function that goes in and cycles through all our script files and tries to create a "Write Registry" step in the script, I have the index figured out so its really an issue with recreating the steps through vbscript. I have the following so far:

'Create Sub Call
Option Explicit

Dim objApp, objStep, iNewIndex

Set iNewIndex = Application.Macros(vbldMacroTemporary).Item("TMP_N EW_INDEX")

' create VisBuildPro app object
Set objApp = CreateObject("VisBuildSvr8.Application")
objApp.Project.Load "%PROCFILES_FULLPATH%"

Set objStep = objApp.Project.Steps(vbldStepMain).Add("Write Registry", iNewIndex)
objStep.Name = "VS2013 MSI Project Update"
objStep.Indent = 3
objStep.Checked = False
objStep.Property("RootKey") = -2147483647
objStep.Property("SubKey") = "Software\Microsoft\VisualStudio\12.0_Config\MSBui ld"
objStep.Property("ValueData") = 0
objStep.Property("ValueName") = "EnableOutOfProcBuild"
objStep.Property("ValueType") = 4

objApp.Project.Save

Here is the XML from the Step I am trying to recreate
<step action='Write Registry'>
<RootKey type='3'>-2147483647</RootKey>
<SubKey>Software\Microsoft\VisualStudio\12.0_Confi g\MSBuild</SubKey>
<ValueData>0</ValueData>
<ValueName>EnableOutOfProcBuild</ValueName>
<ValueType type='3'>4</ValueType>
<buildfailsteps type='11'>0</buildfailsteps>
<indent type='3'>2</indent>
<name>VS2013 MSI Project Update</name>
</step>

My question is around RootKey, ValueType, and indent, how do I set the Type paramater and the actual value in my script sample above.

PS using VB 8.7
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 12:25 PM.


Copyright © 1999-2023 Kinook Software, Inc.