Jump to content

Deleting and Opening Problems


Recommended Posts

Hi,

So, I was thinking. What could possibly be a program that people could use. I though of an all-round kind of program.

First I added the option to have 5 preset windows that could be hidden through hotkeys. That went ok.

Secondly I thought of a kind of system cleaner. I want it to delete the "Recent Documents", "Temporary Files" "Cookies" and then empty the "Recycle Bin" (and maybe do a few more once I have learnt how to do the rest).

Here is the code for my "Clean Now" button:

;------------------------------------Clean Button------------------------------------------
Func Clean()
If Not IsDeclared("WinCleanerStart") Then Local $WinCleanerStart
$WinCleanerStart = MsgBox(292,"WinApp","Are you sure you want to run WinCleaner now?" & @CRLF & "(It is best to make a backup of your system before starting)")
Select
    Case $WinCleanerStart = 6 ;Yes 
        FileRecycle($WinDrive & "*.tmp")
        FileRecycleEmpty($WinDrive)
    Case $WinCleanerStart = 7 ;No
EndSelect
EndFunc ;==>Clean
;------------------------------------End Clean Button--------------------------------------

But it didnt work :S

Here is my full script atm so you know what everything is linking to and reading, etc. (sorry for the big mess of things)

Thanks for any help, I really appreciate it. You will get a mention in the about window saying thanks to [YOU] for helping me with coding problems, or whatever.

Nathan - alien13

Link to comment
Share on other sites

First of all this is what your script is assuming to do. To delete the .tmp files from a specific drive ($Windrive).

For deleting files from special folders, try the @Tempdir (@Tempdir and @Tempdir & "\..\Temporary Internet files\" should do the trick).

For the Recent documents I am not quite sure but if you Google a bit about 'special folders' you will find much information.

Also have in mind that in Windows most of that 'Special folders' can be changed via Registry (also TweakUI from Microsoft does that). So it would be a good idea to first read some values from the Registry to find the exact folders on each system. Do not use hardcoded ones just to be sure.

For the System Restore thing, try this:

Run(@SystemDir & "\Restore\rstrui.exe", @SystemDir & "\Restore")

Generally use macros; they are a good thing.

Link to comment
Share on other sites

First of all this is what your script is assuming to do. To delete the .tmp files from a specific drive ($Windrive).

For deleting files from special folders, try the @Tempdir (@Tempdir and @Tempdir & "\..\Temporary Internet files\" should do the trick).

For the Recent documents I am not quite sure but if you Google a bit about 'special folders' you will find much information.

Also have in mind that in Windows most of that 'Special folders' can be changed via Registry (also TweakUI from Microsoft does that). So it would be a good idea to first read some values from the Registry to find the exact folders on each system. Do not use hardcoded ones just to be sure.

For the System Restore thing, try this:

Run(@SystemDir & "\Restore\rstrui.exe", @SystemDir & "\Restore")

But is that what you meant? for some reason it doesn't work for me :S

System restore worked great, thanks!

So I have to make my program read from the registry?

thanks alien13

Link to comment
Share on other sites

Thanks for the reply :)

I changed the cleaner code to

FileRecycle(@Tempdir and @TempDir & "\..\Temporary Internet files\")
FileRecycleEmpty($WinDrive)oÝ÷ Ø­ËajÜ!jܨºg×è®Ê&z·²âµÚ²}ý·
+ú+äÊË^·¬¶ÞÂäyØ+y«m©ä³}Ò Z½ëh©*k¢
Ú·uúèØ^­è"²Úò¶§Æ¥éõßú®¢× bv}ý¶gØZµ:ò¶¬jëh×6FileRecycle(@TempDir & "\..\Temporary Internet files\")oÝ÷ Ù.j·¦Ë"(ê¶jÈëh!;2Ö±N¼«y§b(騭궡zZ_W×!yÉ-ç±jjezÀ%²Ê°j{m¢IèÁëÞ¯+bì!jܨ¹ªÞ¥ªìx-¡§îËb¢{kÊØ^2È£huæî*.­Êx°ØZºÚ"µÍÙÐÞ
    ][ÝÝ]I][ÝË[[[   [È ][ÝÉÌLËÌLÕ[ÜH[][ÉÌLÉ][ÝÊ

you would have found yourself the mistake...

Edited by erebus
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...