INFORMATICS

The Best

Przełącznik języka

BUY COFFEE

If you like the website and want to support the project!

Postaw mi kawę na buycoffee.to

This Site

CMS

Hardware

Uncategorised

useful sites

Databases

Emulators

Powershell

Storage Array

DNS

FORTINET

Antivirus program

Licznik

2.png8.png9.png1.png0.png9.png8.png
Today119
Yesterday728
This week3192
This month11223
Total2891098

Visitor Info

  • IP: 3.145.175.243
  • Browser: Unknown
  • Browser Version:
  • Operating System: Unknown

Who Is Online

3
Online

Thursday, 18 April 2024 03:51

Wykonywanie skryptu przy zamykaniu systemu

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 

Tworzenie pliku uruchamianego automatycznie przy wyłączeniu systemu windows

Tworzymy plik wsadowy o rozszerzeniu .bat

@echo off echo

del /f /s /q %systemdrive%\*.tmp

del /f /s /q %systemdrive%\*._mp

del /f /s /q %systemdrive%\*.log

del /f /s /q %systemdrive%\*.gid

del /f /s /q %systemdrive%\*.chk

del /f /s /q %systemdrive%\*.old

del /f /s /q %systemdrive%\recycled\*.*

del /f /s /q %windir%\*.bak

del /f /s /q %windir%\prefetch\*.* rd /s /q %windir%\temp & md %windir%\temp

del /f /q %userprofile%\cookies\*.*

del /f /q %userprofile%\recent\*.*

del /f /s /q “%userprofile%\Local Settings\Temporary Internet Files\*.*”

del /f /s /q “%userprofile%\Local Settings\Temp\*.*”

del /f /s /q “%userprofile%\recent\*.*” echo echo. & pause

Po utworzeniu pliku .bat wpisujemy w lini poleceń gpedit.msc

wchodzimy do Konfiguracji komputera -> Ustawienai systemu WIndows -> Skrypty (uruchamianie zamykanie) i klikamy na zamknięcie

W otwartym oknie wskazujemy ścieżkę do utworzonego pliku.

 

Search