need a batch file to make a program useble at start up

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
boatdr
Posts: 3
Joined: 09 Oct 2011 20:28

need a batch file to make a program useble at start up

#1 Post by boatdr » 09 Oct 2011 20:57

I need a batch file that at start up make my program usable. the program is ultra hal 6 from zabaware

the program has 2 optional ways to run
1: at start up (only prob is it resides in the system tray(another words it is automatically minimized)) I then have to click on the icon in the system tray to display the program on my desktops screen to use the program.
2:does not open at start up, but when opened gives only a window with a list of 5 options. then I have to choose option 1 to display the program and be able to use the program.

would someone know how to write a batch file that does a search and loops on a if statement to see if my program has started and resides in the system tray, and if it does magically click the icon within the system tray to make my program appear on my desktop to make useable. then stop the search loop once executed or after a certain amount of time.

or would someone know how to write a batch file that would open the program at start up and choose option 1 out of the 5 options available.

Please any help with this would be greatly greatly appreciated, thanks a ton in advance Sincerely Boatdr.

boatdr
Posts: 3
Joined: 09 Oct 2011 20:28

Re: need a batch file to make a program useble at start up

#2 Post by boatdr » 09 Oct 2011 23:37

i found a way by using a loop and open a .lnk if the program was running.
I would like to share my findings with the Ultra Hal community, but as is there is a for loop that will continuously run. if the user ever changes the start up option in the program to not start at start up when windows starts it will constantly run. this can be bad, is there a way I can control the loop to only run for like a minute or two?
here is my batch code

Code: Select all

:TOP
@echo off
tasklist /nh /fi "imagename eq HalAsst.exe" | find /i "HalAsst.exe" >nul && (
echo Ultra Hal is running
PING 1.1.1.1 -n 1 -w 20000 >NUL
@echo off
C:\Users\Trinity\Documents\HalAsst.lnk
cls
exit
) || (
echo Ultra Hal is not running
GoTo TOP

boatdr
Posts: 3
Joined: 09 Oct 2011 20:28

Re: need a batch file to make a program useble at start up

#3 Post by boatdr » 10 Oct 2011 01:41

thank all and sorry if you been working on this for me, but I figured it out.
if wanted you can view the results at Zabaware's forums here
http://www.ultrahal.com/community/index ... 7#msg57987

Post Reply