# Windows

Windows相關

# Windows 10 更改使用者名稱

**管理員執行命令提示字元**

```
wmic useraccount get name,SID
```

[![image.png](https://note.homesitetw.com/uploads/images/gallery/2025-07/scaled-1680-/sssimage.png)](https://note.homesitetw.com/uploads/images/gallery/2025-07/sssimage.png)

**紀錄要更改使用者的ID**

**按 Win+R 後輸入 regedit，開起登錄編輯程式**

```
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
```

[![image.png](https://note.homesitetw.com/uploads/images/gallery/2025-07/scaled-1680-/TAfimage.png)](https://note.homesitetw.com/uploads/images/gallery/2025-07/TAfimage.png)

**找到欲修改ID修改PATH路徑名稱**

[![image.png](https://note.homesitetw.com/uploads/images/gallery/2025-07/scaled-1680-/TGaimage.png)](https://note.homesitetw.com/uploads/images/gallery/2025-07/TGaimage.png)

**另外新增一個管理員帳號，登入後進入使用者資料夾修改欲修改的名稱**

# Windows 10 同時連接多個OpenVPN

**管理員開啟CMD，切換至目錄C:\\Program Files\\OpenVPN\\bin(安裝目錄)**

**顯示已有網卡**

```
C:\Program Files\OpenVPN\bin>tapctl list
{5097799E-C2F9-4CD1-9FF4-BCC044A4E8C8} OpenVPN Wintun
{C4B6C893-45D0-4839-83BA-4BD5EAF32894} OpenVPN TAP-Windows6
```

**新增網卡**

```
C:\Program Files\OpenVPN\bin>tapctl create --name tap0
{3C3745D5-A4E6-4070-8609-890001DB18DD}
C:\Program Files\OpenVPN\bin>tapctl list
{5097799E-C2F9-4CD1-9FF4-BCC044A4E8C8}  OpenVPN Wintun
{C4B6C893-45D0-4839-83BA-4BD5EAF32894}  OpenVPN TAP-Windows6
{3C3745D5-A4E6-4070-8609-890001DB18DD}  tap0
```

**於client設定檔新增指定網卡**

```
dev-node "tap0"
```

**刪除網卡**

```
tapctl delete tap0
```

# Windows 10 連接非445port samba

**於services.msc關閉server服務**

[![image.png](https://note.homesitetw.com/uploads/images/gallery/2025-07/scaled-1680-/8nGimage.png)](https://note.homesitetw.com/uploads/images/gallery/2025-07/8nGimage.png)

**重啟電腦，netstat -ano | findstr 445 確認無pid 4 系統占用**

**cmd(系統管理員)，新增轉發**

**netsh interface portproxy add v4tov4 listenport=445 listenaddress=127.0.0.1 connectport=remote-port connectaddress=remote-ip**

**remote-port = 遠端服務port**

**remote-ip = 遠端ip**

**輸入netsh interface portproxy show all，確認端口轉發**

[![image.png](https://note.homesitetw.com/uploads/images/gallery/2025-07/scaled-1680-/4niimage.png)](https://note.homesitetw.com/uploads/images/gallery/2025-07/4niimage.png)

**連接網路磁碟使用127.0.0.1代替遠端ip即可連接**

[![image.png](https://note.homesitetw.com/uploads/images/gallery/2025-07/scaled-1680-/ZXVimage.png)](https://note.homesitetw.com/uploads/images/gallery/2025-07/ZXVimage.png)

**刪除轉發**

```
 netsh interface portproxy delete v4tov4 listenport=445 listenaddress=127.0.0.1
```

# Windows 10 SFTP 掛載硬碟

**使用SFTP掛載硬碟**

**SSHFS-Win:https://github.com/winfsp/sshfs-win/releases**

**WinFsp:https://github.com/winfsp/winfsp/releases**

**sshfs-win-manager:https://github.com/evsar3/sshfs-win-manager/releases**

**安裝後開啟sshfs-win-manager即可掛載**