How hta Changed the Way I Deliver Builds - Part 8 - Dev Build hta

As I've mentioned before, I run 2 different builds. One build is for testing and development and the other is the active main build. NOTHING is live tested, everything is testing in the dev build first before deploying. 

As such I also run a different hta file for the dev build. The main guts of the file run the same as we have looked at in the articles to date, but with a few subtle differences. The first of these is that I add an extra set of buttons so I can debug the build. To do the debug requires a subtle change to the code we used for application start: 

Sub StartV8bug 
objFSO.CopyFile SitePath + "MS85\Standards\data\std_appl.cfg" , "C:\Program Files (x86)\Bentley2004\Program\MicroStation\config\appl\", OverwriteExisting 

WshShell.Run """C:\Program Files (x86)\Bentley2004\Program\MicroStation\ustation.exe"" -debug=4" 

End Sub 

Take note of where the debug string sits at the end of the run string. This can be modified for any Bentley vertical application: 

Sub StartV8BSbug 
objFSO.CopyFile SitePath + "MS85\Standards\data\std_appl.cfg" , "C:\Program Files (x86)\Bentley2004\Program\MicroStation\config\appl\", OverwriteExisting 

WshShell.run """C:\Program Files (x86)\Bentley2004\Program\MicroStation\ustation.exe"" -wc""C:\Program Files (x86)\Bentley2004\Program\TriForma\config\stflocal.cfg"" -debug=4" 
End Sub 

To finish it all off I then have a final set of buttons to open the msdebug files. I already have these associated with notepad++, but you could have them open in what ever suits. This code could also be added to the end of the run command for the debug, but you may need to tweak timing to have it run once the debug is completed: 

Sub startmsdebug 
Set objShell = CreateObject("Wscript.Shell") 
Set oShell = CreateObject("Wscript.Shell") 
Dim strDirectory, strFile, strText, strUserProfile, fso, file 

strUserProfile = oShell.ExpandEnvironmentStrings("%USERPROFILE%") 
strPath = strUserProfile + "\Local Settings\Temp" 
strFile = "\msdebug.txt" 
strLoad = strPath + strFile 

objShell.Run("notepad++ " & strLoad) 

End Sub 

Sub startmsdebug2 
Set objShell = CreateObject("Wscript.Shell") 
Set oShell = CreateObject("Wscript.Shell") 
Dim strDirectory, strFile, strText, DevPath, fso, file 

DevPath = "R:\_CADDdev\Bentley" 
strPath = DevPath + "\Site\Batch" 
strFile = "\msdebug.txt" 
strLoad = strPath + strFile 

objShell.Run("notepad++ " & strLoad) 

End Sub 

Note that the subs have been modified to suit the location where each version of MicroStation saves the debug file. SS3 MicroStation allows you to set where YOU want the debug file to go, a good addition. 

More soon.

Anonymous