We seem to be speaking different languages. I can't explain any better so I'll just drop it.
Are you trying to say you need path redundancy for each miner app you are launching?
Don't know what you mean. I could add the variables and make it so it can be left blank... Id have to do some testing on how it will work, because I presently am unsure if you can call a %variable%%afterthisvariable% in such a manner. might need some creative twist if its not that simple (which DOS operations can be hinky like that). My batch is only checking for an open task name (not location) so i'd need to keep the original variable and add something like %P2A% %P2B% etc for each miner app version/location.
It is that simple. The beauty is most of the time the miner will be called ccminer.exe. It only becomes more complicated
if the miners havedifferent names. But that can be solved by renaming the exe to it is always the same. You seem to be thinking
along a different line, how to handle differnt tasknames. Make them all the same and you don't have a problem.Im trying to undertsnd your perspective... if I can make it more versatile I am all for it.... But typically batch files are in their home directory where they are controlling stuff. I typically only use a batch in a path-registered location like c:/ or c:/windows when its something like ls.bat.... because I always #$@% up and type LS when I know damned well its not. Thanks unix.
I guess my inexperience helped as I was unaware of these conventions. I launch my script from the command line. Yes
the bat file should be in an already defined path or a (desktop) shortcut includes the path in its definition. The miners are
not required to be in a defined path because their paths will be specified in the script.I have already implemented this and have been doing it for over a year. The technique works. Here is a snippet from by bat,
current implementation only uses one miner exe but I have used 2 in the past by setting the path differently for
the algos that require it. In my implementation I defined a default that could be overridden by those algos that require it.
It could also be implemented that each algo must set the path for themselves.
rem set defaults
set CCMINERPATH=%HOMEPATH%\Documents\Miners\SP\1.5.69
set CCMINER=ccminer.exe
rem algo decision tree to set variables.
tasklist /FI "IMAGENAME eq %CCMINER%" 2>NUL | find /I /N "%1">NUL
if "%ERRORLEVEL%" EQU "0" taskkill /F /IM %CCMINER%
timeout /T 1
start %CCMINERPATH%\%CCMINER% -a %ALGO% -o %POOL_URL% %USER% %OPTIONS%
It seems some of your concern is the user experience. I admit that is not something I had considered since I wrote by script
for one user, me. The main issue here is providing a mechanism for users to tune the script for their configuration. Editting
the bat file is a nono from a user perspective but a config file is acceptible. All the path variables could be defined in a
config file and read by the script. The config file could actually be a bat file with only "set" commands.
I think this also has the benefit that the user is not required to rearrange and rename the miner apps to suit the script.
They just need to tell the script where they already are. It only gets a little more complicated if the miner exe already have different
names. They would have be renamed, not relocated as in your bat.