path is irrelevant TBH. Batch files are originally meant to be in their home directory and executed as such (typically) originally for being able to execute a common set of commands.. I try to stay as close to the system level and as simple as possible to keep things reliable and easy for the laymen to use/modify.... also less folders, less stress on the partition table, and etc... many reasons.
If you wish to run it from a location, just make a shortcut by right click drag and make a shortcut. I use a shortcut to the batch in my startup folder. works fine, no path required. it adds more mess TBH, and its less versatile as you would need to edit it if you change a filename or directory structure. Plus, why would you want a million directories when you can just drop the updated executable in the folder and update the batch with just a version number change on the filename.
The 'tasks' do not have the same name; they have the same executable name. The quoted algo name while using the "start" command is specifically to title the windows for each algo.
If i did it your way I would have to create a special pointer for each algo, which would just be a placeholder for the algo name. Seems utterly convoluted to create a variable per algo. Too much mess. If I created a lookup table from a TXT file, that would be OK, but I would need to code a program to do that, and that's going too far away from the concept behind this batch considering I am trying to avoid using anything 3rd party.
Yes they may all have the same filename, but you are trying to add definition to which one is running...... and in that its making the batch less universal. It works fine in this manner because it isn't looping multiple code segments, but the loop is just looking for a program in memory continuously... IF I added up all the code to accomplish your method the code would probably equal 2x the characters of the loop being used.... which actually becomes more chars by your method...
But i've already made it super easy to know which is running just by hovering over the window or taskbar.... so I don't think ill implement path into any of my scripts as the only file changing between versions is the EXE file. Its much simpler code wise to just look for each program that can be in memory one after another and re-loop once all versions are closed.
If I got out borland and did code an app, i honestly would have it poop out almost the same code I have above.... It's been a LONG time since I have coded a TSR dos program. But i'd give it a fancy ANSI interface that you could use the arrow keys and navigate fields and edit the data in real-time etc... But I don't see this happening.
I always unzip the new miner app, then append the version number to filename, then I copy to my current miner directory and update my batch.
One of us is not understanding. If you know what you are doing then fine but some of your response suggests otherwise.
My changes should work as is for you, I don't know why you believe it's so complicated. Special pointers? TSR? You've
lost me.
I have been doing something similar for over a year (monitoring miner tasks), it's just that all my executables already had
the same name so I didn't have to rename them.
You said "The 'tasks' do not have the same name; they have the same executable name." What's the diffreence? Doesn't
tasklist /FI IMAGENAME return the file name of the executable?
Shortcuts wouldn't solve the problem because it would hide the taskname from the batch script, that is the opposite of what
I want to do. How would the task then be monitored?
I don't see the relevance of the Window title or how my chnages affect your use of it.
You say I'm trying to add definition as to which one is running. On the contrary I'm trying to abstract it so the task monitor
doesn't have to to pick the taskname based on the algo, they are all the same.
I agree that it would make the script less universal but when you consider that with your implementation a user would have to ensure
all executables and the batch file are in the same dir. With my changes a user would only have to define variables for each path.
It doesn't have to be done by editting the file, shell variables will do.