About 50 results
Open links in new tab
  1. How to use random in BATCH script? - Stack Overflow

    Apr 25, 2011 · 7 set /a number=%random% %% [maximum]-[minimum] example " set /a number=%random% %% 100-50 will give a random number between 100 and 50. Be sure to only …

  2. windows - How can I auto-elevate my batch file, so that it requests ...

    I want my batch file to only run elevated. If not elevated, provide an option for the user to relaunch batch as elevated. I'm writing a batch file to set a system variable, copy two files to a Prog...

  3. How do I shutdown, restart, or log off Windows via a bat file?

    Oct 30, 2018 · 6 I would write this in Notepad or WordPad for a basic logoff command: @echo off shutdown -l This is basically the same as clicking start and logoff manually, but it is just slightly faster …

  4. windows - How to start a system "beep", from the built-in pc speaker ...

    How to start a system "beep", from the built-in pc speaker, using a batch file? Asked 11 years, 4 months ago Modified 1 year, 5 months ago Viewed 90k times

  5. Which comment style should I use in batch files? - Stack Overflow

    Sep 13, 2012 · Comments in batch code can be made by using a double-colon, this is better than using the REM command because labels are processed before redirection symbols. ::<remark> causes no …

  6. Batch command to check the currently used system language, (not the ...

    Mar 7, 2021 · Which batch command can I use to detect the currently used system language, (not the default language)? I have code which checks the default system language and goes to a separate …

  7. Batch file to delete files older than N days - Stack Overflow

    Sep 9, 2008 · And the arrays can be made also smaller, i.e. decreasing the time range from 1980-01-01 00:00:00 to 2038-01-19 03:14:07 as currently supported by the batch code above for example to …

  8. sleep - Correct way to pause a Python program - Stack Overflow

    If you are calling the python script from a Windows Batch File, you can add pause to the end of the batch file instead of putting a command at the end of the python file, and you will get the same effect. …

  9. c# - Why is access to the path denied? - Stack Overflow

    Jan 11, 2012 · And I am getting System.UnauthorizedAccessException: "Access to the path is denied". Using Thread.Sleep(5000) after Directory.Delete(path, true) solves that problem. I absolutely agree …

  10. Change Windows settings with coding - Stack Overflow

    Dec 31, 2022 · You can do that in a couple of ways: by changing the registry on that particular system, like this. This will also let you run your script by double clicking on it by manually enabling the running …