Soluții

How I get an Email when someone logs into My Windows 11 PC

Create a Script to Send the Email

The first step is to write the script that sends an automatic email when someone signs in to a user account on your Windows 11 PC. This script contains your email account’s login details and the custom message that you receive when someone has signed to your PC.

This script stores your email password in plaintext. In theory, that is a security vulnerability if someone finds it and starts going through it. If you’re concerned about that security risk, you can create a throwaway email to use for this instead. That way there is no risk of someone gaining access to your real email.

To create the script, access Windows Search (press Windows+S), type Notepad, and launch the app. In a new document, type the following script:

# Email Settings
$smtpServer = "smtp.youremailprovider.com"
$smtpPort = "587"
$smtpUser = "yourname@youremailprovider.com"
$smtpPass = "youremailpassword"
$toEmail = "recipient@email.com"
$subject = "Login Alert on $env:COMPUTERNAME"
$body = "User $env:USERNAME has just logged in at $(Get-Date)."

# Send Email
$msg = New-Object System.Net.Mail.MailMessage $smtpUser, $toEmail, $subject, $body
$smtp = New-Object Net.Mail.SmtpClient($smtpServer, $smtpPort)
$smtp.EnableSsl = $true
$smtp.Credentials = New-Object System.Net.NetworkCredential($smtpUser, $smtpPass)
$smtp.Send($msg)

In the script, in the Email Settings section, replace the SMTP settings with those that reflect your email account. You can get these details from Gmail, Outlook, or another email provider that you use. In case you’ve enabled two-factor authentication for your email account, you’ll have to create an app-specific password and use that instead in the SMTP settings section.

  • After you’ve configured the settings in the script, save the script.
  • From Notepad’s menu bar, select File > Save As.
  • On the Save As window, choose the folder in which you want to save the file.
  • Select the “Save as Type” drop-down menu and choose “All Files”
  • Click the “File Name” field and type something like SendLoginEmail.ps1
  •  Then, choose “Save”.

Your email script is ready, and you’ll now use Task Scheduler to run the script each time someone logs in to a user account on your PC.

  • To do that, open Windows Search (press Windows+S), type Task Scheduler, and launch the utility. On the right pane, click “Create Task.”
  • In the General tab, select the “Name” field and type a name for the task. This could be something like Login Email Alert.
  • Turn on the “Run Whether User Is Logged On or Not” and “Run With Highest Privileges” options.
  • From the top bar, open the “Triggers” tab. Click “New” to add a new trigger. Select the “Begin the Task” drop-down menu and choose “At Log On.”
  • If you want to get an email alert when any user logs in to your PC, choose “Any User.” To only get an alert when someone logs in to a specific user account, enable “Specific User.” Then, click “Change User” and select the account.
  • Open the “Actions” tab and click “New” to add a new action.
  • Select the “Action” drop-down menu and choose “Start a Program”
  • Select the “Program/Script” field and type powershell.exe.
  • In the “Add Arguments (Optional)” field, type the following. Make sure to replace the script path with the path to the script you created earlier.
-ExecutionPolicy Bypass -File "C:\Scripts\SendLoginEmail.ps1"
  • Select “OK,” enter your admin password, and save the task.

From now on, Windows 11 will automatically send you an email when someone logs in to your PC. In the future, if you don’t want to receive these alerts, right-click your task in Task Scheduler and choose “Delete”. To quickly find these emails in your inbox, you can set up a label. The script above uses “Login Alert on” as the subject line, which you can use to filter all these emails.

Hide the PowerShell Window on Startup

To send you an email alert when someone logs in to your PC, Windows 11 launches PowerShell for a brief moment. This means anyone logging in to your PC will see that window. If you’d like to hide the window, do the following.

Open Notepad and type the following. Make sure to replace the script path with your script’s path.

Set objShell = CreateObject("Wscript.Shell")
objShell.Run "powershell.exe -ExecutionPolicy Bypass -File ""C:\Scripts\SendLoginEmail.ps1""", 0, False

From Notepad’s menu bar, select File > Save As. Select the folder in which you want to save the script. Click the “Save as Type” drop-down menu and choose “All Files.” Click the “File Name” field and type SendLoginEmail.vbs. Then, choose “Save.”

Open Task Scheduler and edit your task. For the action, change “Program/Script” to wscript.exe. In the “Add Arguments (Optional)” field, type the following, replacing the path with your script’s path.

"C:\Scripts\SendLoginEmail.vbs"
[mai mult...]

KERNEL32.DLL – reparatie in cazul unei erori

KERNEL32.DLL este un fișier esențial din Windows care gestionează:

  • Memoria

  • Intrările/ieșirile dispozitivelor (keyboard, mouse, etc.)

  • Procesele și firele de execuție

  • Operațiuni de bază ale sistemului

Este parte din Windows Kernel – nucleul sistemului de operare. Orice eroare legată de el poate bloca aplicații sau chiar porțiuni întregi din Windows.

Exemple de erori comune:

  • kernel32.dll is missing

  • The procedure entry point could not be located in the dynamic link library kernel32.dll

  • kernel32.dll error at startup

  • Access violation error in kernel32.dll

Cum repari erorile legate de KERNEL32.DLL

1. Repornește PC-ul

Eroarea poate fi temporară. Repornește înainte de orice.

2. Actualizează Windows

  1. StartSettingsWindows Update

  2. Click pe Check for Updates și instalează tot.

Unele erori sunt corectate prin patch-uri oficiale.

3. Rulează comenzi pentru a repara fișierele sistem

Deschide Command Prompt ca administrator și rulează:

Verificare fișiere sistem:

sfc /scannow

Reparare imagine Windows:

DISM /Online /Cleanup-Image /RestoreHealth
Aceste comenzi identifică și repară automat fișierele corupte, inclusiv KERNEL32.DLL.

4. Rulează Scanare antivirus

Erorile .dll pot apărea și din cauza virușilor care infectează fișierele de sistem.

Folosește:

  • Windows Defender

  • Sau un antivirus gratuit precum Bitdefender Free, Kaspersky Security Cloud

5. Verifică compatibilitatea programului

Dacă eroarea apare într-o aplicație:

  • Click dreapta pe exe → Properties → tab Compatibility

  • Bifează „Run this program in compatibility mode for:” și selectează o versiune mai veche de Windows

6. Reinstalează programul care dă eroarea

Dacă problema apare la deschiderea unui program anume:

  1. Dezinstalează-l complet

  2. Repornește

  3. Reinstalează ultima versiune de pe site-ul oficial

7. Evită descărcarea fișierului KERNEL32.DLL de pe internet

Nu descărca fișierul .dll separat de pe site-uri dubioase – este riscant și poate aduce malware.

8. Reinstalează Microsoft Visual C++ Redistributables

Descarcă și instalează toate versiunile Visual C++ (x86 și x64)

9. Verifică hard disk-ul pentru erori

Deschide Command Prompt ca Administrator și rulează:

chkdsk /f /r
Apasă „Y” când întreabă și repornește calculatorul.

10. Resetare Windows (ultimă soluție)

Dacă totul eșuează:

  1. Settings → System → Recovery

  2. Click pe Reset this PCKeep my files.

[mai mult...]

Cum remediem: Page Fault in Nonpaged Area on Windows

Eroarea “Page Fault in Nonpaged Area” în Windows (10/11) este un Blue Screen of Death (BSOD) care indică o problemă cu memoria RAM, cu driverele sau cu fișierele de sistem. Apare atunci când sistemul încearcă să acceseze o parte de memorie care ar trebui să fie întotdeauna disponibilă, dar nu este.

1. Repornește computerul

Uneori, eroarea este temporară. Dacă se repetă, treci la pașii următori.

2. Verifică memoria RAM (Memory Diagnostic Tool)

  1. Apasă Win + R, tastează mdsched.exe, apasă Enter.

  2. Alege Restart now and check for problems.

  3. Sistemul se va restarta și va verifica automat RAM-ul.

Dacă apar erori, poate fi necesar să schimbi modulul de memorie defect.

3. Rulează comenzi de reparare Windows

Deschide Command Prompt ca Administrator și rulează, pe rând:

A. Verificare fișiere corupte:

sfc /scannow

B. Reparare imagine Windows:

DISM /Online /Cleanup-Image /RestoreHealth

4. Verifică driverele instalate recent

  1. Apasă Win + XDevice Manager

  2. Verifică dacă ai semne de eroare galbene

  3. Actualizează sau dezinstalează driverele suspecte (ex: placa video, rețea, antivirus, periferice).

Dacă eroarea a apărut după instalarea unui driver, revin-o la versiunea anterioară:

  • Clic dreapta pe driver → Properties → tab-ul DriverRoll Back Driver

5. Dezactivează temporar antivirusul terț

Unele soluții de securitate pot provoca conflicte. Încearcă să îl dezactivezi temporar sau să îl dezinstalezi și să testezi sistemul.

6. Verifică hard disk-ul

Deschide Command Prompt ca Administrator și rulează:

chkdsk /f /r
  • Apasă Y când ți se cere să ruleze la următoarea repornire.

  • Repornește PC-ul → analiza durează ceva timp.

7. Dezactivează gestionarea automată a memoriei virtuale

  1. Win + R → scrie sysdm.cpl → Enter

  2. Mergi la tab-ul Advanced → secțiunea PerformanceSettings

  3. Tab-ul AdvancedVirtual memoryChange

  4. Debifează Automatically manage paging file size

  5. Selectează discul C: → alege Custom size

    • Inițial: 1024 MB

    • Maxim: 4096 MB

  6. Apasă Set → OK → Repornește PC-ul

8. Resetează BIOS-ul sau actualizează-l

  • Intri în BIOS → opțiune „Load Setup Defaults”

  • Dacă ai overclocking activat → dezactivează-l

9. Resetare Windows (ultimă soluție)

  • Settings → System → Recovery → Reset this PC

  • Alege opțiunea Keep my files pentru a păstra datele.

[mai mult...]