Batch Scripts / Programs.

Page 5 of 5 FirstFirst ... 345
  1. elbmek's Avatar
    Posts : 1,900
    Win 10 x 64 Home. Pro x 64 on Surface.
       #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. Matthew Wai's Avatar
    Posts : 5,096
    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. Ztruker's Avatar
    Posts : 13,512
    Windows 10 Pro X64 20H4 19042.746
       #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. Lance1's Avatar
    Posts : 657
    Windows 10 Professional x64 20H2
       #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. ricardobohner's Avatar
    Posts : 302
    Windows 10
       #45

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

  6. Paul Black's Avatar
    Posts : 12,213
    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. Matthew Wai's Avatar
    Posts : 5,096
    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. Ztruker's Avatar
    Posts : 13,512
    Windows 10 Pro X64 20H4 19042.746
       #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. Homer712's Avatar
    Posts : 139
    Windows 10, 1909 (OS Build 18363.1379 )
       #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


 
Page 5 of 5 FirstFirst ... 345

  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 22:59.
Find Us




Windows 10 Forums