Good day,

I have a process that needs to start for every client via citrix. I
created a batch file:

*************************
start "DO NOT CLOSE" /min waveengine.exe --debug "M:\Documents and
Settings\All Users\Application Data"
cd\
cd "M:\Program Files\Twisted Pair Solutions\WAVE\DispatchCommunicator\
WAVEDispatchCommunicator.exe
***************************

When I run the above via citrix, it will open a dos box and then kick
off the application. The problem is that the dos box doesn't go away
"hince "do not close" title bar.

i tried the following script:

****************************
Const HIDDEN_WINDOW = 12

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer &
"\root\cimv2")
Set objStartup = objWMIService.Get("Win32_ProcessStartup")

Set objConfig = objStartup.SpawnInstance_
objConfig.ShowWindow = HIDDEN_WINDOW
Set objProcess = GetObject("winmgmts:root\cimv2:Win32_Process")
errReturn = objProcess.Create("waveengine.exe",null,objconfig,
intProcessID)
*******************************

This looks like its going to work but fails. Reason I believe its
failing is the waveengine.exe needs to look at
--debug "M:\Documents and Settings\All Users\Application Data"
-------see batch file above----

How do I add this line?
Also when the application WAVEDispatchCommunicator.exe
is closed would need waveengine.exe process to stop.

I am so green at this Vb stuff.

Thanks for your time.

Re: Hide Process via VB by Franz

Franz
Fri Nov 10 16:16:11 CST 2006

> This looks like its going to work but fails. Reason I believe its
> failing is the waveengine.exe needs to look at
> --debug "M:\Documents and Settings\All Users\Application Data"
> -------see batch file above----
>
> How do I add this line?

to include the " in a string, you should use the chr()function.

Example:

msgbox "hi all"

will simply display

hi all

but if you add the chr(34) at the beginning/end of
the string like:

msgbox chr(34) & "hi all" & chr(34)

will display

"hi all"

So the line

errReturn = objProcess.Create("waveengine.exe",null,objconfig,intProcessID)

should be:

errReturn = objProcess.Create("waveengine.exe --debug " & chr(34) & "M:\Documents and Settings\All Users\Application Data" &
chr(34),null,objconfig,intProcessID)




Re: Hide Process via VB by dNagel

dNagel
Fri Nov 10 16:36:51 CST 2006

the shortcut is to double up the quote

msgbox " Hi ""Bill"", how are you?"

D.


Franz aRTiglio wrote:
>> This looks like its going to work but fails. Reason I believe its
>> failing is the waveengine.exe needs to look at
>> --debug "M:\Documents and Settings\All Users\Application Data"
>> -------see batch file above----
>>
>> How do I add this line?
>>
>
> to include the " in a string, you should use the chr()function.
>
> Example:
>
> msgbox "hi all"
>
> will simply display
>
> hi all
>
> but if you add the chr(34) at the beginning/end of
> the string like:
>
> msgbox chr(34) & "hi all" & chr(34)
>
> will display
>
> "hi all"
>
> So the line
>
> errReturn = objProcess.Create("waveengine.exe",null,objconfig,intProcessID)
>
> should be:
>
> errReturn = objProcess.Create("waveengine.exe --debug " & chr(34) & "M:\Documents and Settings\All Users\Application Data" &
> chr(34),null,objconfig,intProcessID)
>
>
>
>