I have a bat file
@echo %RANDOM%
and execute it using command line
start randomcheck.bat & start randomcheck.bat
$RANDOM in bash does not have this flaw.
@echo win=%RANDOM%
@for /f %%i in ('bash -c "echo $RANDOM"') do @set VAR=%%i
@echo cygwin=%VAR%
prints the same windows numbers but distinct cygwin ones when I run start randomcheck.bat & start randomcheck.bat. Using cygwin is better than writing a separate VBScript for a single command. Might be you can teach me how to replace the bash -c "echo $RANDOM" with the windows scripting host alternative, which would eliminate the need for installing the cygwin.