Batch Scripts / Programs.

Page 5 of 16 FirstFirst ... 3456715 ... LastLast

  1. Posts : 2,543
    Win 11 x 64 Home on PC and Win 11 Home x 64 on Surface 9
       #41

    drotha2 said:
    Thank you very much Paul for sharing such great work.
    Downloaded for use as needed, I don't know if you plan to extend the scripts.
    Something that is missing, I do not know if it is contemplated by any of those who already hung up, cleaning the temporary folders of the profiles and Windows.
    I feel my bad English.
    Thanks a lot.
    A greeting.
    English very good, thank you
      My Computer


  2. Posts : 7,606
    Windows 10 Home 20H2
       #42

    drotha2 said:
    cleaning the temporary folders of the profiles and Windows.
    One line of commands will do the job:

    rd %temp% /s /q & rmdir /s /q "C:\Windows\Temp"
      My Computer


  3. Posts : 14,046
    Windows 11 Pro X64 22H2 22621.1848
       #43

    Cleaning temp files/folders is what CCleaner does once you set it up correctly.
    It's also what Disk Cleanup from File Explorer does.
      My Computers


  4. Posts : 869
    Windows 10 Professional x64 21H2
       #44

    drotha2 said:
    Something that is missing, I do not know if it is contemplated by any of those who already hung up, cleaning the temporary folders of the profiles and Windows.
    disk_cleanup_all_modes.bat is second in the list and is what your looking for.
      My Computers


  5. Posts : 456
    Windows 10
       #45

    Thank you Paul, very useful collection...
      My Computer


  6. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
    Thread Starter
       #46

    ricardobohner said:
    Thank you Paul, very useful collection...
    Thank you.
      My Computer


  7. Posts : 7,606
    Windows 10 Home 20H2
       #47

    Paul Black said:
    The reason I use the code that I do is because it also works on Win Vista, Win 7, and Win 10. I have used the code that you provided [ and a couple of others ] on non Win 10 machines and it opens many many blank cmd windows. Each of these windows needs to be closed with CTRL+C. Therefore the code I use works best across different systems.
    If you are interested, see whether the following code works across different systems.
    Code:
    Fsutil Dirty Query %SystemDrive%>Nul && Goto:[Run_as_administrator]
    Echo CreateObject^("Shell.Application"^). ^
    ShellExecute "%~0","+","","RunAs",1 >"%temp%\+.vbs"&&"%temp%\+.vbs"&Exit
    :[Run_as_administrator]
    It does not use Net session, which I believe is the cause of the multiple CMD windows.
      My Computer


  8. Posts : 14,046
    Windows 11 Pro X64 22H2 22621.1848
       #48

    Matthew, tried that in a test.bat:

    Code:
    (Fsutil Dirty Query %SystemDrive% >nul 2>&1)||(PowerShell start """%~f0""" -verb RunAs & Exit /B)
    Echo.
    Echo Running as Administrator
    
    pause
    It still gets a single blip which I expect when re-launching the Command Prompt as Administrator.
    Here is a reco0rding of it being run. UAC Disabled, Defender SmartScreen Filte disabled.

    test.bat.mp4.zip
      My Computers


  9. Posts : 190
    Windows 10, 22H2 10.0.19045
       #49

    @Paul Black I've seen in my readings here numerous mentions of your batch file writing skills and the fact that you contribute/share these with the members. Think the last time was in a tutorial on adding back missing power settings. In any event, decided this morning to see if I could find some listing of these batch files. Clicked on your name which took me to your profile page and lo and behold, there was the listing. I'm sure for the next few days I'll be spending much of my morning coffee time reviewing your scripts. Thank you!

    I use your "Clear Event Viewer" every morning (part of that whole OCD thing I suspect) just prior to making my MR differential backup and will try out the revised/enhanced version today.
      My Computer


  10. Posts : 456
    Windows 10
       #50

    @Paul Black doing a great job Paul...

    I've tested the "Files_To_Folders_Using_Filenames.bat" and noticed that it doesn't prevent that the batch itself get's moved if you change the batch's filename.

    Maybe if you change:
    if not "%%~ni" == "Files_To_Folders"
    To:
    if not "%%~ni" == "%~n0"

    It'll work even if the user changes the batch's filename...
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 12:53.
Find Us




Windows 10 Forums