Need help with batch file.
Moderator: DosItHelp
Need help with batch file.
Hi,im new on the forum.From some time i want to make a batch file that will have a limit,that if i will run it for second time it wont allow me to continue example : limit of opens is set to 5,if trying to open bat file again it will show text like "echo Limit reached,write password to reset trial" Any ideas how to make something like this ? if it is even possible ?
Re: Need help with batch file.
A password request in a batch file? That doesn't make any sense.
However you could count all windows which have the same window title.
Regards
aGerman
However you could count all windows which have the same window title.
Code: Select all
@echo off &setlocal
title limit test
set /a n=0
for /f %%i in ('tasklist /fi "imagename eq cmd.exe" /fi "windowtitle eq limit test" /nh^|find "cmd.exe"') do set /a n+=1
echo %n%
pause
Regards
aGerman