محمد صادق حاتمی

محمد صادق حاتمی

دست نوشته های محمد صادق حاتمی
محمد صادق حاتمی

محمد صادق حاتمی

دست نوشته های محمد صادق حاتمی

Get Access to everyone for All Folders (drive L)

@ECHO off
ECHO Run this with admin privileges
:: Change following variable to desired user or group
set UserOrGrp=Everyone
for %%d in (L) do (
    if EXIST %%d:\ (
        ECHO Taking ownership of drive %%d:\
        takeown /R /F %%d:\ /D Y /SKIPSL
        ECHO Granting full control to %UserOrGrp%
        icacls %%d:\* /Q /C /T /grant %UserOrGrp%:F
    )
)
PAUSE

Visual Studio freezing (crashing) while loading solution

Visual Studio freezing (crashing) while loading solution

[my Experience]

The solution is to Disable Windows Security Antivirus (Windows Defender)


1. Open PowerShell as Administrator;


2. Copy the commands below and run in PowerShell:

Set-MpPreference -DisableRealtimeMonitoring $true -Force

New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender' -Name 'DisableAntiSpyware' -Value 1 -PropertyType DWord -Force

New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender' -Name 'DisableAntiVirus' -Value 1 -PropertyType DWord -Force

New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender' -Name 'ServiceKeepAlive' -Value 0 -PropertyType DWord -Force

3. Paste into the Powershell terminal and press the {Enter} key

After running the above commands, restart the computer but do not run the troubleshoot to avoid reactivation.