Jump to content

MaXoFF - A Simple Daily ShutDown Optimizer


Valuater
 Share

Recommended Posts

This is an awesome application, Valuater! Keep it up!! I ran the application and noticed a significant speed improvement!

Ver 1.1.5

Thats about 9 or 10 updates since last night

8)

Roger O."When people show you who they are, believe them.” --Mark Twain

Link to comment
Share on other sites

Hi,

@Valuater: Instead of including the funcs from Autoit install directory, just copy the functions into your script. This way Autoit will always use this functions and you are always compatible.

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Hay Valuater

You're getting a bit slake 3 days and no updates.... LOL :)

I havn't had a good run with the script yet as my computer is warning of an over heating when I run it.

(NOT script related just my poor computer cracking up when it's put under pressure)

But the script looks good. :-)

John Morrison

Link to comment
Share on other sites

  • 1 year later...

Looks good, there a couple of function that I would like to add into my logon script, I did notice that you cleaning temp file routing might be improved if I may, this is what I use in my logon script.

Func temp_clean()
    Switch _OSGet()
        Case "XP Mode"
            EmptyFolder(@UserProfileDir & "\Local Settings\Temporary Internet Files\Content.IE5")
            EmptyFolder(@UserProfileDir & "\Local Settings\Temporary Internet Files")
            EmptyFolder(@UserProfileDir & "\Cookies")
            EmptyFolder(@UserProfileDir & "\Local Settings\History")
            EmptyFolder(@UserProfileDir & "\Recent")
            EmptyFolder(@AppDataDir & "\Microsoft\Office\Recent")
            EmptyFolder(@UserProfileDir & "\Local Settings\Temp")
        Case "Vista Mode"
            ;Local
            EmptyFolder(@AppDataDir & "\Local\Temp")
            EmptyFolder(@AppDataDir & "\Local\Microsoft\Windows\Temporary Internet Files")
            ;LocalLow
            EmptyFolder(@AppDataDir & "\LocalLow\Temp")
            ;protected / locations
            EmptyFolder(@AppDataDir & "\Local\Temporary Internet Files")
            EmptyFolder(@UserProfileDir & "\Local\History")
            EmptyFolder(@UserProfileDir & "\Recent")
            EmptyFolder(@UserProfileDir & "\Cookies")
            ;Roaming
            EmptyFolder(@AppDataDir & "\Roaming\Microsoft\CryptnetUrlCache\Content")
            EmptyFolder(@AppDataDir & "\Roaming\Microsoft\CryptnetUrlCache\MetaData")
            EmptyFolder(@AppDataDir & "\Roaming\Microsoft\Windows\Cookies\Low")
            EmptyFolder(@AppDataDir & "\Roaming\Microsoft\Windows\IECampatCache\low")
            EmptyFolder(@AppDataDir & "\Roaming\Microsoft\Windows\IETldCache\low")
            EmptyFolder(@AppDataDir & "\Roaming\Microsoft\Windows\PrivacIE\low")
            EmptyFolder(@AppDataDir & "\Roaming\Microsoft\Windows\Recent")
            ;ProgramData\Microsoft
            EmptyFolder(@UserProfileDir & "\ProgramData\Microsoft\Windows Defender\Quaratine")
            EmptyFolder(@UserProfileDir & "\ProgramData\Microsoft\Caches")
    EndSwitch
    EmptyFolder(@TempDir)
EndFunc ;==>temp_clean

Func EmptyFolder($FolderToDelete)
    $Debug = 0 ;0 or 1
    $AllFiles = _FileListToArray($FolderToDelete, "*", 0)
    If $Debug Then ConsoleWrite("-->" & $FolderToDelete & @CRLF)
    If IsArray($AllFiles) Then
        If $Debug Then
            _ArrayDisplay($AllFiles, $FolderToDelete)
        EndIf
        For $i = 1 To $AllFiles[0]
            $crt = FileGetTime($FolderToDelete & "\" & $AllFiles[$i], 1)
            If $crt[2] = @MDAY And $crt[0] = @YEAR And $crt[1] = @MON Then
                If $Debug Then
                    ConsoleWrite($FolderToDelete & "\" & $AllFiles[$i] & " --> Today's File, Skipping!" & @CRLF)
                EndIf
                ContinueLoop
            EndIf
            $delete = FileDelete($FolderToDelete & "\" & $AllFiles[$i])
            If $Debug Then
                ConsoleWrite($FolderToDelete & "\" & $AllFiles[$i] & " =>" & $delete & @CRLF)
            EndIf
            DirRemove($FolderToDelete & "\" & $AllFiles[$i], 1)
        Next
    EndIf
EndFunc ;==>EmptyFolder

Func _OSGet()
    Switch @OSVersion
        Case "WIN_7"
            Return "Vista Mode"
        Case "WIN_XP"
            Return "XP Mode"
        Case "Win_2000"
            Return "XP Mode"
        Case "WIN_VISTA"
            Return "Vista Mode"
        Case "WIN_2008"
            Return "Server Mode"
        Case "WIN_2008R2"
            Return "Server Mode"
        Case "WIN_2003"
            Return "Server Mode"
        Case Else
            Return "unknown"
            Exit
    EndSwitch
    _ArchGet()
EndFunc ;==>_OSGet

Hope this is useful to you. Its quit simple if you have any questions or comments please feel free. The EmptyFolder($FolderToDelete) was got from somewhere on this site I feel very embarrassed as I do not know who did it, it's very useful and solved some issues for me namely deleting temp files created that day, but as your is basically a shutdown script you may not need this.

Edited by PeterAtkin

[topic='115020'] AD Domain Logon Script[/topic]

Link to comment
Share on other sites

oops, forgot about this.

When I finally realized you had to start it from the tray ;) and did so.

It took about 40 minutes to complete on my machine, first run.

The speed change is enough for me to notice it.

Thanks for this I'll continue to use it.

EDIT:

Second run immediately after (almost) took 25 minutes, with defrag boot files and defrag c taking up most of that time.

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

  • 4 weeks later...

Hey I just ran this today. Wow. It took 20 odd minutes to run on my Sony laptop running Vista HP. This is a fantastic 'shut down wrapper utility', I no longer have enough time between the 'power button press' and when my PC is actually fully loaded and 'ready', to get a cup of coffee.. Not only has 'start up' time drastically increased, but my Firefox browser loads now in 10 - 15 seconds rather than the minute and a half at least that it used to take.. (17 addons..)

Thanks for helping me by writing and sharing this. I plan on trying soon this new version you just posted.

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Link to comment
Share on other sites

  • 2 weeks later...

I had to change this....

$Cleaned = Round(Get_Free() - $Drive_Start / 1024 / 1024, 2)

It was not calculating????

I replaced it with this....

$Drive_End = Get_Free()
        $Cleaned = $Drive_End - $Drive_Start
        $FCleaned = Round($Cleaned/1024/1024, 2)

8)

NEWHeader1.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...