# Windows Note ###### tags: `win10` ## [檔案總管無法自動更新](https://answers.microsoft.com/en-us/windows/forum/all/folders-not-refreshing-automatically-in-windows-10/cabc3ff5-f628-480e-8185-c7c5f4c322f2) ```clike delate all in C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Recent ``` ## [Windows 30秒安裝 gpedit.msc,快速找回本機群組原則編輯器](https://kkplay3c.net/win11-not-found-gpedit-msc/) ## WiFi profile setting Wifi profile located at **C:\ProgramData\Microsoft\Wlansvc\Profiles\Interfaces** - show `netsh wlan show profiles` - remove `netsh wlan delete profile name="WiFiNetworkName"` - export `netsh wlan export profile name="WiFiNetworkName" folder=C:\WiFiBackup` - add `netsh wlan add profile filename="C:\WiFiBackup\WiFiNetworkName.xml"` ## Run Task after login Here are several ways to automatically run that command after a user logs in: ### Method 1: Task Scheduler (Recommended) 1. Press `Win + R`, type `taskschd.msc`, press Enter 2. Click "Create Task" (not "Create Basic Task") 3. **General tab:** - Name: "Restore WiFi Profile" - Check "Run with highest privileges" - Configure for: Windows 10 4. **Triggers tab:** - Click "New" - Begin the task: "At log on" - Specific user: Select the user account - Click OK 5. **Actions tab:** - Click "New" - Action: "Start a program" - Program/script: `netsh` - Add arguments: `wlan add profile filename="C:\WiFiBackup\WiFiNetworkName.xml"` - Click OK 6. **Conditions tab:** Uncheck "Start the task only if the computer is on AC power" (if laptop) 7. Click OK ### Method 2: Startup Folder (Simpler but visible) 1. Create a batch file (e.g., `restore_wifi.bat`): ```batch @echo off netsh wlan add profile filename="C:\WiFiBackup\WiFiNetworkName.xml" ``` 2. Save it to: `C:\Scripts\restore_wifi.bat` 3. Press `Win + R`, type `shell:startup`, press Enter 4. Create a shortcut to your batch file in this folder 5. Right-click the shortcut → Properties → Advanced → Check "Run as administrator" ### Method 3: Registry Run Key 1. Press `Win + R`, type `regedit`, press Enter 2. Navigate to: - For specific user: `HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run` - For all users: `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run` 3. Right-click → New → String Value 4. Name it: `RestoreWiFi` 5. Double-click and set value to: ``` netsh wlan add profile filename="C:\WiFiBackup\WiFiNetworkName.xml" ``` **Note:** This method may not run with admin privileges automatically. ### Method 4: Group Policy Logon Script (Pro/Enterprise) 1. Press `Win + R`, type `gpedit.msc`, press Enter 2. Navigate to: `User Configuration → Windows Settings → Scripts (Logon/Logoff)` 3. Double-click "Logon" 4. Click "Add" → Browse to your batch file 5. Click OK ### Important Considerations: ⚠️ **The command needs administrator privileges** to work. Make sure to: - Use Task Scheduler with "Run with highest privileges" (Method 1), OR - Run the batch file as administrator ⚠️ **File path**: Ensure `C:\WiFiBackup\WiFiNetworkName.xml` exists and is accessible ⚠️ **Testing**: After setting up, log out and log back in to test