Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide the Running Procomm

Status
Not open for further replies.

slole

Programmer
Sep 24, 2007
2
US
This forum is great and very useful. I still have a question though. Can some help?

I would like to run Procomm (windows) in the background entirely from the command line with scripts. I would like no user interface at all. Does someone know how to do this? If not, what is the best way to exit from Procomm from either a script or from the command line.
 
The only way that I can think of is to use the winminimize command to minimize Procomm to the task bar. You could also try the winhide command, although I've not had made much use of it in the past.

Someone more familiar with the guts of Windows may be able to tell you a more "complete" way to hide all presences of Procomm, or there are likely applications out there that perform a similar task.

To exit Procomm from a script, you would use the pwexit command.

 
I have a question about the pwexit command. I use that command to kill procomm which allows the execution of the next line in a windows batch script. The downside of this (at least in Windows xp) is that the little globe symbols in the notification area of the taskbar build up. Sometime when the batch script is run freuqently, half of the screen can build up with those icons (when the menu is expanded). Closing prcomm normally doesn't cause this.

Is there an alternative to the pwexit that lets procomm clean up better before it exits?
 
If you run a script that is just:

proc main
pwexit
endproc

do you still see this problem? Pwexit should exit Procomm cleanly without leaving the globe icon in the system tray. Usually that icon only remains when Procomm crashes.

 
ok, you're right knob, pwexit does provide for a clean exit. I was appearantly using anohter program to quickly kill all instances of procomm that were currently running; so those globes weren't the result of pwexit. I was using an executable to kill all instances of procomm because my application for procomm will only work if no instances of procomm are currently occupying the active com port.

So this leads me to the question: is there a way to cleanly close all open/active/running instances of procomm without human intervention?
 
Procomm does allow for commands to be sent from another application using DDE, so you may be able to send the pwexit command to shut down Procomm from your application. Does your application support DDE? If so, you could send a DDE server command to the Procomm DDE server (name will be PW5 if you are using version 4.8) with a command of "ASPECTCMD pwexit". This will have Procomm execute the pwexit command. I am not certain if this will shut down all running versions of Procomm, or just the first one that your application finds.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top