Can anyone tell me how to kick off a custom inventory using the Command Script that returns a single value and kicks off the inventory process so it creates the NSE file?
Just to be clear, there are no Symantec documents describing how to create custom inventory Tasks in any other language than VBS. The sample is the only one and it is in VBS and provided with a default NS7+ install. http://www.symantec.com/docs/HOWTO50036
To create the NSE you require a language that can access the Altiris Component Object Model to invoke the methods for constructing the XML and calling NSE.send. If you can construct an array then re format the COM process that constructs the XML, finds the SMP then copy the file to the Event Queue, then i'm sure you can do it in DOS. It is not expected that you do since the COM was provided to do that for you.
The last time we used DOS for starting custom inventory was for calling the command line in NS6.0 which eventually just ran a different language anyway. I've done it with Autoit, others have examples with other languages, but DOS 7 is a no go. Additionally, DOS is is a language that runs every line and moves on to the next when complete, there is no runwait unless you start pinging yourself or some other workaround.
Hopefully the confusion stems from the legacy instructions.
I'm having difficulty with the vb command because its a DSGet command with is long and complicated and when I try and use the objshell.run option on the command it simply runs it and moves on before it returns a value.
Run Method (Windows Script Host)
http://msdn.microsoft.com/en-us/library/d5fk67ky(v=vs.84).aspx
You need to change the objShell.Run line to have the additional parameter for the bWaitOnReturn value which is a Boolean
object
.Run(strCommand, [intWindowStyle], [bWaitOnReturn])
As a side, calling command lines from VBS is usually fraught for the reason you first suggested and they start popups, user interaction and so on. I would recommend studying the DSget equivalents. http://www.rlmueller.net/ADOSearchTips.htm is a good starting place.