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.png7.png8.png6.png8.png
Today4
Yesterday890
This week5124
This month17993
Total2897868

Visitor Info

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

Who Is Online

3
Online

Saturday, 27 April 2024 00:18

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