HELP FOR LANGUAGE DOS

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
ReAslan
Posts: 11
Joined: 28 May 2015 03:10

HELP FOR LANGUAGE DOS

#1 Post by ReAslan » 28 May 2015 03:13

Hello everyone I need urgent help .
Let me explain : I need a .bat file that automatically do three things :
1 ) If it detects that the program is closed open it .
2 ) If it detects that the program is open it does not do anything .
3 ) If it detects that the program is blocked closes and restarts .

The .bat file must be run in the background and automatically continue to do the three things described above .

I understand that I must act on tasklist which contains all the processes but are not expert in no language dos .

The .bat file must be run on Windows 2000 .
Thanks in advance to all

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: HELP FOR LANGUAGE DOS

#2 Post by Ed Dyreen » 28 May 2015 06:26

How would one detect if a program is blocked from running by a third party ? At 1st one would need to know which 3th party and how to manipulate it. I assume you are talking about some kind of firewall or AV-software running with system privileges. For security reasons you will need Admin privileges too.

It can be done in DOS, although I suggest visiting the autoIT forum, with autoIT you do this in a 5 line while loop that doesn't wastes resources. autoIt can be tuned to suspend itself and only act upon a certain event. Processes which run in the background are best not written in batch.

ReAslan
Posts: 11
Joined: 28 May 2015 03:10

Re: HELP FOR LANGUAGE DOS

#3 Post by ReAslan » 28 May 2015 06:38

Ok , but AutoIt is a software to write in c ?
As you write these 5 lines with a cycle while loops ?

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: HELP FOR LANGUAGE DOS

#4 Post by Ed Dyreen » 28 May 2015 06:40

ReAslan wrote:Ok , but AutoIt is a software to write in c ?
As you write these 5 lines with a cycle while loops ?
sure

ReAslan
Posts: 11
Joined: 28 May 2015 03:10

Re: HELP FOR LANGUAGE DOS

#5 Post by ReAslan » 28 May 2015 06:41

How do you write this program to do everything written above ?

Post Reply