I had to add this extra line of code to the start of a batch file :-
if %1#==# start "%~n0 %TIME%" /LOW CMD /C %~n0 %TIME% && EXIT
The purpose of CMD /C %~n0 %TIME% && EXIT is to invoke itself again with %TIME% as an argument so the %1#==#" comparison will not sit in an endless loop - and since I needed any old argument I chose %TIME% as something of interest.
My principle questions are, when the remainder of the script is executed at low priority which may be suspended when Windows thinks of anything (e.g. disk defrag) to fill up "idle" time, if this LOW priority script invokes DOS or Windows executables, is this low priority inherited by :-
1. DOS commands - i.e. fc, copy, xcopy, etc., e.g. if xcopy was used to copy some folders, would its copy activity inherit the same "idle" priority and subject to defrag etc. ?
2. Windows applications - e.g. if this script finished by launching a Windows Browser, and then the script ended and the Command Window closed, would the Windows Browser be left running at normal priority, or would this also encounter suspension whilst copying files because Windows decided to run defrag etc. ?
A supplementary question :- I launch this application from a shortcut in my start-up folder. Originally I tried editing the shortcut my preceding with
START "" /LOW
but that only got an error that START was not recognised - is there a simple fix to the syntax, or is this just impossible ?
PURPOSES
At system start-up I run a batch file to inspect/compare system statistics.
It always used to work before hitting Windows XP Home with Service Pack 3.
Now the relevant system files are not always available before inspection/comparison. but the first line addition means the comparison is held pending for 50 Seconds whilst the system files are updated.
Because of a different problem with SP3 there is a higher probability that the clock will sit alone on the bottom right corner, i.e. everything starts as it should, BUT the relevant icons fail to appear, and I no longer have immediate control of Volume, Safely Remove Hardware, etc. This is especially true if ESET NOD32 detects and installs a virus update during system start-up.
I am trying to reduce the prolonged high processor activity at start-up to see if this helps, and am now thinking of launching Xplorer2 (a double windows explorer) as the script concludes, instead of using a start-up folder link - but I don't want to degrade its speed of folder copying.
Alan