i am trying to make a random number between 1 and a variable, this variable will change each time the program runs. i am using this so far: SET /A result=%random%*%var%/32768+1
but everytime i re-run the batch file it returns the same number, do people know what is going on?
Thanks in Advance
Try this instead:
set /a result=(%random% %% %var%) + 1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With