Kinook Software Forum

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

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 04-18-2004, 09:30 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,027
You could use WMI to retrieve this (the text below can be copied/pasted into VBP). It will retrieve the entire command-line, including the executable.

<step action='Run Script' type='0'>
<Language>VBScript</Language>
<Script><![CDATA[Builder.LogMessage "VisBuildCmd command-line = '" & GetCommandLine & "'"

' use WMI to retrieve the command-line of the VisBuildCmd.exe
' process on the current machine (assumes only one running instance)
' see http://msdn.microsoft.com/library/en...32_process.asp
' for more details
Function GetCommandLine()

Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonat e}!\\.\root\cimv2")

Set colProcesses = objWMIService.ExecQuery("Select * from Win32_Process Where Name = 'VisBuildCmd.exe'")

For Each objProcess in colProcesses

GetCommandLine = objProcess.CommandLine
Exit Function
Next

End Function
]]></Script>
<indent type='3'>1</indent>
<name>New Step</name>
</step>
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 04:43 AM.


Copyright © 1999-2023 Kinook Software, Inc.