Excel vba planilha deletar arquivos temporarios cookies

Sáb, 26 de Maio de 2012 11:42 Expedito Marcondes
Imprimir

Escola Saberexcel VBA Estudos - Treinamentos com Macros, Fórmulas e Funções

Esses macros abaixo do Aplicativo Microsoft Excel VBA(Visual Basic Application), deletam do seu computador arquivos provindos da Internet, tais como  (Arquivos Temporários, históricos web, Senhas web , Coockies, Fórmulários web add-ons etc...). Neste exemplo de planilha fiz umas variaveis (Global constates) para o treinamento com VBA(Visual Basic Application), através de códigos em uma folha de planiha voce poderá deletar esses arquivos as vezes perigosos, as vezes indesejáveis.  Esses arquivos são aqueles que voce deleta através do seu navegador.
No I.E(Internet Explores) va em ferramentas (Alt)  - opções de Internet > Geral > Excluir (Arquivos temporários, senhas, historico de navegação, formularios e outros)
' - - - - - - - - - - - - - - - - - - - - - -'
Option Explicit
Public resposta As String
Global Const escola = "Escola SaberExcel VBA Estudos®"
Global Const escolaA = "<<<< Escola SaberExcel VBA Estudos® >>>>"
' - - - - - - - - - - - - - - - - - - - - - -'
Global Const divisao = "'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -'"
' - - - - - - - - - - - - - - - - - - - - - -'
Global Const historico = "Deseja apagar o HISTÓRICO de seu computador"
Global Const historicoA = "(*) - Lista em seu computador de Sites Visitados"
' - - - - - - - - - - - - - - - - - - - - - -'
Global Const coockies = "Deseja apagar os cookies do seu computador"
Global Const coockiesA = "(*) - Arquivos Armazenados no computador por sites para salvar referencias como informações de logon"
' - - - - - - - - - - - - - - - - - - - - - -'
Global Const arquivos_temp = "Deseja apagar os ARQUIVOS TEMPORARIOS INTERNET do seu computador"
Global Const arquivos_tempA = "(*) - Cópias de páginas da Web, imagens e mídia salvas para exibição mais rápida"
' - - - - - - - - - - - - - - - - - - - - - -'
Global Const formularios = "Deseja apagar os FORMULÁRIO WEB do seu computador"
Global Const formulariosA = "(*) - Informações salvas que voce digitou nos formulários"
' - - - - - - - - - - - - - - - - - - - - - -'
Global Const senhas = "Deseja apagar SENHAS WEB do seu computador"
Global Const senhasA = "(*) - Senhas salvas que são automaticamente preenchidas quando voce entra em um site que voce já visitou"
' - - - - - - - - - - - - - - - - - - - - - -'
Global Const tudo = "Deseja apagar TUDO(*) "
Global Const tudoA = "(*) - Deleta HistÓrico, coockies, arquivos temp, formulários, senhas etc...do seu computador "
'' - - - - - - - - - - - - - - - - - - - - - -'
Global Const vsettings = "Delete tudo + Arquivos e settings historicos também Add-ons(*) "
Global Const vsettingsA = "(*) - Deleta HistÓrico, coockies, arquivos temp, formulários, senhas etc...do seu computador "
' - - - - - - - - - - - - - - - - - - - - - -'
Sub sbx_deletar_historico()
    img3_visivel
    Tempo 1.5
    resposta = MsgBox(historico & vbCrLf & historicoA & vbCrLf & divisao & vbCrLf & escolaA & vbCrLf & divisao, vbYesNo + vbCritical, escola)
    If resposta = 6 Then
       Shell "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1"
    End If
End Sub
' - - - - - - - - - - - - - - - - - - - - - -'
Sub sbx_deletar_cookies()
    img2_visivel
    Tempo 1.5
    resposta = MsgBox(coockies & vbCrLf & coockiesA & vbCrLf & escolaA, vbYesNo + vbCritical, escola)
    If resposta = 6 Then
       Shell "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2"
    End If
End Sub
' - - - - - - - - - - - - - - - - - - - - - -'
Sub sbx_deletar_arquivos_temporarios_internet()
    img1_visivel
    Tempo 1.5
    resposta = MsgBox(arquivos_temp & vbCrLf & arquivos_tempA & vbCrLf & divisao & vbCrLf & escolaA & vbCrLf & divisao, vbYesNo + vbCritical, escola)
    If resposta = 6 Then
       Shell "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8"
    End If
End Sub
' - - - - - - - - - - - - - - - - - - - - - -'
Sub sbx_deletar_formularios_dados()
    img4_visivel
    Tempo 1.5
    resposta = MsgBox(formularios & vbCrLf & formulariosA & vbCrLf & divisao & vbCrLf & escolaA & vbCrLf & divisao, vbYesNo + vbCritical, escola)
    If resposta = 6 Then
       Shell "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16"
    End If
End Sub
' - - - - - - - - - - - - - - - - - - - - - -'
Sub sbx_deletar_senhas_salvas()
    img5_visivel
    Tempo 1.5
    resposta = MsgBox(senhas & vbCrLf & senhasA & vbCrLf & divisao & vbCrLf & escolaA & vbCrLf & divisao, vbYesNo + vbCritical, escola)
    If resposta = 6 Then
       Shell "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32"
    End If
End Sub
' - - - - - - - - - - - - - - - - - - - - - -'
Sub sbx_deletar_tudo()
    img6_visivel
    Tempo 1.5
    resposta = MsgBox(tudo & vbCrLf & tudoA & vbCrLf & divisao & vbCrLf & escolaA & vbCrLf & divisao, vbYesNo + vbCritical, escola)
    If resposta = 6 Then
       Shell "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255"
    End If
End Sub
' - - - - - - - - - - - - - - - - - - - - - -'
Sub sbx_deletar_Add_ons_Settings()
    img6_visivel
    Tempo 1.5
    resposta = MsgBox(vsettings & vbCrLf & vsettingsA & vbCrLf & divisao & vbCrLf & escolaA & vbCrLf & divisao, vbYesNo + vbCritical, escola)
    If resposta = 6 Then
       Shell "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351"
    End If
End Sub
' - - - - - - - - - - - - - - - - - - - - - -'

Lista de comandos do Windows 7 Shell

Comandos Shell são incrivelmente útil na criação de atalhos ou acessar rapidamente duro para chegar a locais. Eles podem ser usados ​​para fixar atalhos para a barra de tarefas ou apenas para tornar sua vida mais fácil. Para aqueles que são precedidas por "Shell:" quando usá-los em atalhos que você precisa adicionar o "explorer.exe" na frente deles. Em seguida, deverá ficar assim:   explorer.exe shell: Pessoal

Windows 7  SOMENTE:
shell:Libraries
shell:MusicLibrary
shell:VideosLibrary
shell:OtherUsersFolder
shell:Device Metadata Store
shell:PublicSuggestedLocations
shell:DocumentsLibrary
shell:User Pinned
shell:UsersLibrariesFolder
shell:PicturesLibrary
shell:ImplicitAppShortcuts
shell:Ringtones
shell:CommonRingtones

Windows Vista & 7
shell:Common Programs
shell:GameTasks
shell:UserProfiles
shell:MyComputerFolder
shell:SyncSetupFolder
shell:DpapiKeys
shell:SamplePlaylists
shell:Favorites
shell:My Video
shell:SearchHomeFolder
shell:System
shell:CommonVideo
shell:SyncResultsFolder
shell:LocalizedResourcesDir
shell:Cookies
shell:Original Images
shell:CommonMusic
shell:My Pictures
shell:Cache
shell:Downloads
shell:CommonDownloads
shell:AppData
shell:SyncCenterFolder
shell:My Music
shell:ConflictFolder
shell:SavedGames
shell:InternetFolder
shell:Quick Launch
shell:SystemCertificates
shell:Contacts
shell:TreePropertiesFolder
shell:Profile
shell:Start Menu
shell:Common AppData
shell:PhotoAlbums
shell:ConnectionsFolder
shell:Administrative Tools
shell:PrintersFolder
shell:Default Gadgets
shell:ProgramFilesX86
shell:Searches
shell:Common Startup
shell:ControlPanelFolder
shell:SampleVideos
shell:SendTo
shell:ResourceDir
shell:ProgramFiles
shell:CredentialManager
shell:PrintHood
shell:MAPIFolder
shell:CD Burning
shell:AppUpdatesFolder
shell:Common Start Menu
shell:LocalAppDataLow
shell:Templates
shell:Gadgets
shell:Programs
shell:Recent
shell:SampleMusic
shell:Desktop
shell:CommonPictures
shell:RecycleBinFolder
shell:CryptoKeys
shell:Common Templates
shell:Startup
shell:Links
shell:OEM Links
shell:SamplePictures
shell:Common Desktop
shell:NetHood
shell:Games
shell:Common Administrative Tools
shell:NetworkPlacesFolder
shell:SystemX86
shell:History
shell:AddNewProgramsFolder
shell:Playlists
shell:ProgramFilesCommonX86
shell:PublicGameTasks
shell:ChangeRemoveProgramsFolder
shell:Public
shell:Common Documents
shell:CSCFolder
shell:Local AppData
shell:Windows
shell:UsersFilesFolder
shell:ProgramFilesCommon
shell:Fonts
shell:Personal

Windows 7 Shortcuts
compilei a seguinte lista com um início de Alpha build do Windows 7. É possível que alguns destes foram alterados com versões mais recentes. Se você encontrar um que é errado por favor me avise para que eu possa corrigi-lo.

Wireless Networks pop-up
rundll32.exe van.dll,RunVAN

Advanced Restore
sdclt.exe /restorewizardadmin

Restore Files
sdclt.exe /restorewizard

Backup Location & Settings
sdclt.exe /configure

Add Network Location (wizard)
rundll32.exe shwebsvc.dll,AddNetPlaceRunDll

Indexing Options
control.exe srchadmin.dll

Notification Cache
rundll32.exe shell32.dll,Options_RunDLL 5

Aero (Transparency) Off
Rundll32.exe DwmApi #104

Aero (Transparency) On
Rundll32.exe DwmApi #102

Welcome Center
rundll32.exe oobefldr.dll,ShowWelcomeCenter

Add/Remove Programs
RunDll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,0

Content Advisor
RunDll32.exe msrating.dll,RatingSetupUI

Control Panel
RunDll32.exe shell32.dll,Control_RunDLL

Date and Time Properties
RunDll32.exe shell32.dll,Control_RunDLL timedate.cpl

Display Settings
RunDll32.exe shell32.dll,Control_RunDLL access.cpl,,3

Device Manager
RunDll32.exe devmgr.dll DeviceManager_Execute

Folder Options – File Types
RunDll32.exe shell32.dll,Control_Options 2

Folder Options – General
RunDll32.exe shell32.dll,Options_RunDLL 0

Folder Options – Search
RunDll32.exe shell32.dll,Options_RunDLL 2

Folder Options – View
RunDll32.exe shell32.dll,Options_RunDLL 7

Forgotten Password Wizard
RunDll32.exe keymgr.dll,PRShowSaveWizardExW

Hibernate
RunDll32.exe powrprof.dll,SetSuspendState

Keyboard Properties
RunDll32.exe shell32.dll,Control_RunDLL main.cpl @1

Lock Screen
RunDll32.exe user32.dll,LockWorkStation

Mouse Properties
RunDll32.exe shell32.dll,Control_RunDLL main.cpl @0

Map Network Drive
RunDll32.exe shell32.dll,SHHelpShortcuts_RunDLL Connect

Network Connections
RunDll32.exe shell32.dll,Control_RunDLL ncpa.cpl

Power Options
RunDll32.exe Shell32.dll,Control_RunDLL powercfg.cpl

Regional Settings
RunDll32.exe shell32.dll,Control_RunDLL intl.cpl,,3

Stored Usernames and Passwords
RunDll32.exe keymgr.dll,KRShowKeyMgr

System Properties: Advanced
RunDll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,4

System Properties: Automatic Updates
RunDll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,5

Taskbar Properties
RunDll32.exe shell32.dll,Options_RunDLL 1

User Accounts
RunDll32.exe shell32.dll,Control_RunDLL nusrmgr.cpl

Windows Security Center
RunDll32.exe shell32.dll,Control_RunDLL wscui.cpl

Windows – About
RunDll32.exe SHELL32.DLL,ShellAboutW

Unplug/Eject Hardware
RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll

Windows Firewall
RunDll32.exe shell32.dll,Control_RunDLL firewall.cpl

Wireless Network Setup
RunDll32.exe shell32.dll,Control_RunDLL NetSetup.cpl,@0,WNSW

Open Control Panel (All Items)
explorer.exe shell:::{21ec2020-3aea-1069-a2dd-08002b30309d}

Manage Wireless Networks
explorer.exe shell:::{1fa9085f-25a2-489b-85d4-86326eedcd87}

Sound Control Playback Tab
rundll32.exe shell32.dll,Control_RunDLLmmsys.cpl

Sound Control Sounds Tab
rundll32.exe shell32.dll,Control_RunDLLmmsys.cpl,,2

Sound Control Recording Tab
rundll32.exe shell32.dll,Control_RunDLLmmsys.cpl,,1

Add/Remove Programs
rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl

Add/Remove Windows Components
rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,2

Set Program Access and Computer Defaults
rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,3

People Near Me
rundll32.exe shell32.dll,Control_RunDLL collab.cpl

People Near Me Sign In Tab
rundll32.exe shell32.dll,Control_RunDLL collab.cpl,,1

Screen Resolution
rundll32.exe shell32.dll,Control_RunDLL desk.cpl

Personalization
rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,2

Screen Saver
rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,1

Windows Firewall
rundll32.exe shell32.dll,Control_RunDLL firewall.cpl

Device Manager
rundll32.exe shell32.dll,Control_RunDLL hdwwiz.cpl

Power Options
rundll32.exe shell32.dll,Control_RunDLL powercfg.cpl

Power Options Change Plan Settings
rundll32.exe shell32.dll,Control_RunDLL powercfg.cpl,,1

System Properties
rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl

System Properties Hardware Tab
rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,2

System Properties Advanced Tab
rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,3

System Properties System Protection Tab
rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,4

System Properties Remote Tab
rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,5

Pen and Touch Tablet PC Settings
rundll32.exe shell32.dll,Control_RunDLL tabletpc.cpl

Pen and Touch Tablet PC Settings Flicks Tab
rundll32.exe shell32.dll,Control_RunDLL tabletpc.cpl,,1

Pen and Touch Tablet PC Settings Handwriting Tab
rundll32.exe shell32.dll,Control_RunDLL tabletpc.cpl,,2

Phone and Modem Options
rundll32.exe shell32.dll,Control_RunDLL telephon.cpl

Phone and Modem Options Modems Tab
rundll32.exe shell32.dll,Control_RunDLL telephon.cpl,,1

Phone and Modems Options Advanced Tab
rundll32.exe shell32.dll,Control_RunDLL telephon.cpl,,2

Date and Time
rundll32.exe shell32.dll,Control_RunDLL timedate.cpl

Date and Time Additional Clocks
rundll32.exe shell32.dll,Control_RunDLL timedate.cpl,,1

Action Center
rundll32.exe shell32.dll,Control_RunDLL wscui.cpl

Unplug/Eject Hardware
RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll

Internet Explorer Specific Commands

Delete Temporary Internet Files:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8

Delete Cookies:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2

Delete History:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1

Delete Form Data:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16

Delete Passwords:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32

Delete All:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255

Delete All + files and settings stored by Add-ons:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351

Miscellaneous Variables

Windows Directory
%WINDIR%
%SYSTEMROOT%

Hard Drive That Contains OS
%HOMEDRIVE%

Users Home Directory
%HOMEPATH%
%USERPROFILE%

Default Temporary Directory
%TEMP%
%TMP%

Program Files
%PROGRAMFILES%

Current Users Application Data Directory
%APPDATA%

Se alguém tiver os adicionais que eu perdi você pode enviá-los e vou adicioná-los à lista.


Aprenda tudo sobre planilhas do Aplicativo Microsoft Excel VBA(Visual Basic Application), sozinho, com baixo custo, praticando com os produtos didáticos Escola Saberexcel VBA Estudos® - Treinamentos com Macros, Fórmulas e Funções.




   Baixar o exemplo de planiha contendo os macros acima:
Excel vba planilha deletar arquivos temporarios cookies (360.86 KB)

Tags:
Última atualização em Sáb, 26 de Maio de 2012 12:23