2025年6月26日星期四

【解決】無網際網路,已受保護

1. 鼠標右鍵單擊開始菜單→ “Windows PowerShell (管理員)”→輸入:
netsh winsock reset(按下Enter鍵)
netsh int ip reset(按下Enter鍵)
ipconfig /release(按下Enter鍵)
ipconfig /renew(按下Enter鍵)
ipconfig /flushdns(按下Enter鍵)
ipconfig /registerdns(按下Enter鍵)

2. inetcpl.cpl(按下Enter鍵)(打開網際網絡內容界面)
在“網際網絡內容"界面點擊“高級/進階”,
點擊“還原高級/進階設置”,然後再點擊“重置”(Windows11中沒有“重置”按鈕,請忽略此步驟)。
然後在上述選擇框中找到:使用TLS1.0→→使用TLS1.1→→使用TLS1.2→→使用TLS1.3(實驗),這4個打上勾,點擊"確定"。

3. ncpa.cpl(按下Enter鍵)(將打開網絡連線介面)
在 “網絡連線”介面,鼠標右鍵單擊需要設置的網絡連線→“內容”,
在“網絡”屬性窗口中雙擊 “網際網絡通訊協定第4版(TCP/IPv4)”。
選擇“自動獲得IP地址”,
選擇“自動獲得DNS服務器地址”,
點擊“確定”。

執行完畢上述方案後,重啟設備。 

Ref:
wifi連線突然變成無網際網路.已受保護

 

2025年4月1日星期二

Turn on automatic logon in Windows

To use Registry Editor to turn on automatic logon, follow these steps:

  1. Select Start, and then select Run.

  2. In the Open box, type Regedit.exe, and then press Enter.

  3. Locate the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon subkey in the registry.

  4. On the Edit menu, select New, and then point to String Value.

  5. Type AutoAdminLogon, and then press Enter.

  6. Double-click AutoAdminLogon.

  7. In the Edit String dialog box, type 1 and then select OK.

  8. Double-click the DefaultUserName entry, type your user name, and then select OK.

  9. Double-click the DefaultPassword entry, type your password, and then select OK.

    If the DefaultPassword value doesn't exist, it must be added. To add the value, follow these steps:

    • On the Edit menu, select New, and then point to String Value.

    • Type DefaultPassword, and then press Enter.

    • Double-click DefaultPassword.

    • In the Edit String dialog, type your password and then select OK.

      Note:
      If no DefaultPassword string is specified, Windows automatically changes the value of the AutoAdminLogon key from 1 (true) to 0 (false), disabling the AutoAdminLogon feature.
  10. Exit Registry Editor.

  11. Restart your computer. You can now log on automatically.

Reference:
https://learn.microsoft.com/en-us/troubleshoot/windows-server/user-profiles-and-logon/turn-on-automatic-logon

2024年12月6日星期五

修復 Samba (SMB) 的 0x80004005 和 0x80070035 錯誤

新 notebook 不能存取一直在用的 samba server,在網上查似乎也有人遇到相同問題,最後是加入以下兩個 dword 機碼解決;
 

用regedit 移至HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters
新增dword “RequireSecuritySignature”並設定值為 0
新增dword “AllowInsecureGuestAuth”並設定值為 1


重啟後便能一如以往存取 samba 了。在這記下方便還未解決問題的人。

若還未能解決可以再參考之前這個帖 Windows 10 不能連接 Samba 共享裝置的解決方法

2021年8月15日星期日

禁止 SparkyLinux 在登入頁面時筆電合蓋會進入睡眠

筆電用作 File Server 時基本不用打開顯示屏,所以要防止合蓋時進入睡眠,可以在檔案 /etc/systemd/logind.conf 加入以下行列:

HandleLidSwitch=ignore
HandleLidSwitchDocked=ignore


存檔後 reboot 便可。

SparkyLinux 安裝 Remote Desktop 遠端桌面功能

1. 安裝 Xrdp 套件及容許 Xrdp 讀取 key file (Debian System)

sudo apt install xrdp

sudo adduser xrdp ssl-cert

2. 設定 Firewall

sudo ufw allow from 192.168.X.X/24 to any port 3389

3. 在 Windows 啟用「遠端桌面連線」連接 SparkyLinux

參考

https://linuxize.com/post/how-to-install-xrdp-on-debian-10/


2021年8月4日星期三

用 WSDD 解決 Win10 無法發現 Linux Samba 伺服問題

因安全問題現在都會建議在 Winodws 上關閉 SMB1.0/CIFS 檔案共享支援,但關閉後導致 SparkyLinux 上的 Samba 伺服不能在 Windows 的「網路」中被發現,厡來 Netbios 需要 SMB1.0支援,沒有 Netbios 就只能依靠 WSD了。

Debian base 嘅 SparkyLinux 沒有跟來WSD服務,需要安裝 WSDD

1. 首先是要加入新自訂 repository
到 /etc/apt/sources.list.d 的其中一個檔案內加入以下行

deb https://pkg.ltec.ch/public/ buster main

2. 執行 apt update

3. 匯入 repository public key

執行 apt-key adv --fetch-keys https://pkg.ltec.ch/public/conf/ltec-ag.gpg.key

4. 執行 apt install wsdd

若有防火牆就要進行設定容許相關連線

1. incoming and outgoing traffic to udp/3702 with multicast destination:
239.255.255.250 for IPv4
ff02::c for IPv6


2. outgoing unicast traffic from udp/3702
3. incoming to tcp/5357

啟動
啟動: sudo systemctl start wsdd
檢視狀態: sudo systemctl status wsdd

參考:
christgau/wsdd: A Web Service Discovery host daemon. - GitHub
ubuntu/linux徹底解決Win10[網路]無法發現samba問題,無需開啟smb1.0/CIFS支援

2021年7月27日星期二

SparkyLinux開始使用時的設置

 SparkyLinux可以是要少用一點資源,所以安裝後設定上還是要花些功夫。

首先是Wifi連線,其他Linux版本測到wifi都會主動出現登入畫面,但 SparkyLinux 就沒有,而是要用戶自已啟用wifi功能再設定登入資料。

另外就是touch to click功能,這是netbook或notebook一定要有的功能,但居然沒有,要下載安裝driver才可以獲取touch to click,可以執行以下指今進行安裝

sudo apt install xserver-xorg-input-synaptics

還有是安裝中文輸入法,新增倉頡

sudo apt-get install fcitx-table-cangjie3

原本教只打 cangjie 就可以,但不知為甚麼用不了

 

Reference

http://www.ramblingmoose.com/2018/11/how-to-get-tap-to-click-back-on-debian.html

fcitx 新增輸入法 COMMAND FOR UBUNTU 系

輕型 Linux 比較

舊 netbook 行 Windows 10 太慢,所以試裝不同輕型 Linux 看看好不好用,也試用它來做 file server。試用了以下幾款

Q4OS Trinity: 這個忙記了,好像是UI不太漂亮(或許之後試一吓它的Plasma版本)
Slax: 是裝不了,不知為甚麼所燒的USB就是不能boot起機,
Zorin OS Lite: 開程式時還是慢一點,應用比較完整易
Bodhi: UI 漂亮,但試中文UI時有亂碼,start menu 反應有點慢
antiX: Start menu 反應快,但UI看上去比較老舊
SparkyLinux: Start menu 反應快,UI還算好看,開程跟上面比較的也算快

以前也試過用Puppy Linux,應該比以上的都少用資源,但今次想找一款UI看上去比較現代感的,所以就找了一些其他的。

沒有系統的比較,勍簡單說一吓,最後是用上SparkyLinux,原因之一是它基於Debian,這些Linux 版本多是基於Debian或Ubuntu,查了吓Debian較穏定,比較少用資源也快一點點,Ubuntu的較完整,所以也較吃多一點資,但也較合入門。試用時也基本印證了這些,如wifi連線操作,設定中文時用Ubuntu的是比交方便。

另外就是Desktop圖形介面系統的選擇,像SparkyLinux就有分LXQt及Xfce版本,LXQT反應比較快,但UI老舊,設定也比較麻煩,Xfce UI比較新穎,所以也較吹資源。權衡一吓,也就選了SparkyLinux的Xfce版本。

不知是不是Debian的問題,用SparkyLinx時設定上還是要多一點點工夫,下一編再說。


2021年7月25日星期日

安裝 Samba

試過在 Debian 及 Ubuntu 衍生發行版上都沒問題

1. 安裝 Samba packages

apt update
apt install samba smbclient cifs-utils

2. 創建 Shared Samba Directory/Folder

只創建一個不用密碼分享的資料夾

mkdir /public

3. Setup Samba File Server

在 samba 設定檔 /etc/samba/smb.conf 加入以下參數

[public]
   comment = Public Folder
   path = /public
   writable = yes
   guest ok = yes
   guest only = yes
   force create mode = 777
   force directory mode = 777

4. Update the permissions of the Shares

chmod 2777 /public (網上教是用2775但實作時不能寫入)

5. Restart Samba service

systemctl restart nmbd

6. Allow Remote Access to Samba

若有開啟防火牆要執行以下指放行連入,否則也會出現access deny的問題

ufw allow from 192.168.xxx.xxx/24 to any app Samba

Reference

主要是跟以下網頁設置,內文也有教如可設定私人資料夾

https://kifarunix.com/quick-way-to-setup-samba-file-server-on-debian-10/ 

2021年6月23日星期三

Task Scheduler Crashed - FX:{c7b8fb06-bfe1-4c2e-9217-7a69a95bbac4}

Task Scheduler Crashed every time I tried to open a task or create a new task. The following is noted in the error pop-up window:

Unhandled Exception in Managed Code Snap-in

FX:{c7b8fb06-bfe1-4c2e-9217-7a69a95bbac4}

The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

Exception type:
System.IO.FileNotFoundException

Tried many methods searched on the web.  The following method finally fixed the problem:

  1. Run regedit
  2. Go to HKLM\Software\Microsoft\Windows NT\CurrentVersion\NetworkList
  3. Delete everything under the following path,
    • Nla->Cache
    • Nla->IntranetEnabled
    • Nla->Wireless
    • Profiles
    • Signatures->Managed
    • Signatures->Unmanaged
  4. Reboot

Task Scheduler should be running fine now. Please be noted that network location awareness profiles has been reset and need to be reconfigured in network properties (public and private network thing).

Reference

https://answers.microsoft.com/en-us/windows/forum/windows_10-start-winpc/task-scheduler-crashed/5acab7c5-eb79-48c8-876d-ade321565953

2019年10月1日星期二

關於開機USB

網上論壇見有人入唔到Windows,但又想攞番電腦入面啲檔案,這時做一隻USB開機手指就最合用,整咗就可以插隻USB手指落部有問題電腦到用嚟開機進入桌面用檔案管理員抄檔案

要整開機USB要先下載ISO檔
https://www.hirensbootcd.org/files/HBCD_PE_x64.iso

再下載USB工具
https://www.hirensbootcd.org/files/ISO2USB.exe

然後跟以下instructions整隻開機USB
https://www.hirensbootcd.org/usb-booting/
之後隻USB就可以用嚟開機

留意可能要設定下BIOS至會先讀隻USB開機而唔會用番隻有問題嘅HDD開機
https://bit.ly/2o0Tu1u
http://it-easy.tw/usb-bios/

2019年9月14日星期六

移除 Nvidia Telemetry 背景服務

Nvidia 安裝驅動時原來會同時安裝收集用戶數據的Telemetry背景服務, 這個移除了也不會影響顯卡功能,在 cmd 示窗內執行以下指令便可移除;

rundll32 "%PROGRAMFILES%\NVIDIA Corporation\Installer2\InstallerCore\NVI2.DLL",UninstallPackage NvTelemetryContainer

參考
https://forums.evga.com/How-to-Uninstall-Nvidia-NvTelemetry-m2905741.aspx

2019年9月4日星期三

Excel 2013 打不開工作表內的網頁連結

今天想打開Excel 2013工作表內的網頁連結,卻彈出視窗指有群組policy不容許動作,但搞了一排原來不是群組policy的問題,而是我停用IE 11,因許多網站已不支援IE 11而停用了,但可能 office 2013 比較舊,內裡一些設定還是使用IE相關的參數。

2019年8月9日星期五

重設 Windows 10 開始功能表的常用應用程式清單

在網上找到作個記錄, 不翻譯了,

Open Start menu > Launch Settings app >Privacy >General >Disable (Allow Windows to track app launches to improve Start and search results)> Enable (Allow Windows to track app launches to improve Start and search results) again > Go to the main page of Settings app again >Personalization >Start >Enable (Show the most used apps).

2019年8月5日星期一

移除檔案管理員上的 'Quick Access' 項目

編輯以下機碼;
移至 HKEY_CLASSES_ROOT\CLSID{679f85cb-0220-4080-b29b-5540cc05aab6} 下之 'ShellFolder',

揀選 Permissions, 跟著選 Advanced 鍵,在 'Advanced Security Settings for ShellFolder' 視窗,點選 'Change', 跟著點選 'Advanced',修改 owner 為 'Administrators' 以容許修改 'ShellFolder' 內容。

跟著在 'ShellFolder', 修改 'Attributes' 為 'a0600000'。
原文

P.S.修改後發現檔案管理員的拖放功能失效,所以改回了之前的'Attributes' 為 'a0100000'

2019年8月2日星期五

在 Windows 10 啟用相片檢視器開啟相片及 RAW 檔

Windows 10 預設使用新的「相片」應用開啟相片檔案, 如果想使用傳統的「相片檢視器」開啟可以用以下檔案修改機碼

啟用「相片檢視器」下載機碼 

停用「相片檢視器」下載機碼

原機碼包沒有連結我用的 Sony RAW 格式 ARW 檔,所以之後跟據機碼格式加入。

參考
 https://www.tenforums.com/tutorials/14312-restore-windows-photo-viewer-windows-10-a.html

2019年7月27日星期六

設定 Android Device 在 router 顯示的名稱

只要在 build prop 加入下行便可

net.hostname = 自訂名稱

2018年8月11日星期六

Windows 瘦身大法分享

一個120G SSD用了幾年,裝的軟件不多但就已用剩只有10G,看一吓原來 Windows 本身已佔去50G/60G,最後用了以下方法將SSD縮回只有約62G。

1. Compact.exe
以系統管理員開啟"命令提示字元",執行以下指令
Compact.exe /CompactOS:always
這個方法大約可取回幾個G儲存

2. 縮小 Hiberfil.sys (原來這方法只是保留 Fast Boot 功能,不能用休眠功能)
若沒有需要休眠工能可以移除整個 Hiberfil.sys檔案,但若如我還是想保留休眠就可以用以下指令縮小 Hiberfil.sys 
powercfg /h /type reduced
這個方法大約可以縮減 Hiberfil.sys 30%

3. PatchCleaner
網上找到這個工具,可以將之前之 Winodows 更新或升級時留下的備用檔案刪除,雖說現時Windows 有內建移除更新檔工能,但這個就更切底,這個工具給移除了多達32G的檔案,還可以將移除的檔案備份起來
PatchCleaner 網頁

4. 將 Winodws App 移去另一個硬盤
Windows 10 有內建功能可以如 Android 手機般變更 Apps 的儲存位置
=>"設定"=>"App"
不是所有 Apps 都可以變更儲存位置,若可以的點擊 App 就會看到"移動"選項

參考網頁
http://www.homedev.com.au/free/patchcleaner
https://www.windowscentral.com/how-reduce-windows-10-footprint-your-pc
https://www.cio.com/article/3138833/windows/how-to-reduce-windows-10s-on-disk-footprint.html
https://www.laptopmag.com/articles/reclaim-disk-space-windows-10
https://www.tenforums.com/tutorials/25151-specify-hiberfile-type-full-reduced-windows-10-a.html

2018年5月14日星期一

禁止 Windows 自動刪除 Thumbnail Cache

個人電腦內存有大量相片,本來 Windows 會預制小圖片(Thumbnail Cache)讓用戶點入相片資料夾時可以快速看到相片的小圖片,但若 Thumbnail Cach 大過500M-700M時 Windows 就會將之自動刪除,結果像我相多的只要幾天 Thumbnail Cach便被刪除,有 Cache 等於冇 Cache,找到以下方法可以禁止 Windows 自動刪除 Thumbnail Cache,設定了一個月有多也沒有再刪除 Thumbnail Cache。

步驟一
修改機碼
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Thumbnail Cache\Autorun

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Thumbnail Cache\Autorun

將數值修改為0 

步驟二
修改 C:\Windows\System32\cleanmgr.exe 的安全設定,只讓我自己的使用者名稱可執行,其他用戶包括 SYSTEM及TrustedInstaller都不可執行。

步驟三
有人說還要停用或刪除以下工作排程
1. 在 Task Scheduler Library >> Microsoft >> Windows >> DiskCleanup 停用排程項目 SilentCleanup
2. 在 Task Scheduler Library >> Microsoft >> Windows >> Maintenance 停用排程項目WinSAT
3. 在 Task Scheduler Library >> Microsoft >> Windows >> Wininet 停用排程項目 CacheTask
4. 在 Task Scheduler Library >> Microsoft >> Windows >> TaskScheduler 找出以下項目並作出相應修改然後刪除這些項目以防他們重新給系統啟用
停用 Idle Maintenance
啟用 Maintenance Configurator
停用 Manual Maintenance
停用 Regular Maintenance
(刪除前可先備份以備以後有需要時加回去)


2017年6月7日星期三

Windows 10 不能連接 Samba 共享裝置的解決方法

平時有用部舊安卓平板做相架,嘅然一直開著就想到用來做家用雲儲存,可是在平板裝了 SambaDroid 或是 Samba Filesharing 後 Windows 10 主機上卻總是找不到,原來 Windows 10 預設使用較新版的 Samba,所以以往用較舊版的設備或程式便會連不上,要用以下指今禁用 SMBv2/SMBv3 及開啟 SMBv1;
  • To enable SMBv1 on the SMB client, run the following commands:
    sc.exe config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi
    sc.exe config mrxsmb10 start= auto
  • To disable SMBv2 and SMBv3 on the SMB client, run the following commands:
    sc.exe config lanmanworkstation depend= bowser/mrxsmb10/nsi
    sc.exe config mrxsmb20 start= disabled
還有 Windows 10 預設也不支援沒用密碼的 Samba 分享,要加入以下機碼才可以連入不設密碼的 Samba 分享;

HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters\AllowInsecureGuestAuth DWORD(32bit), 值鍵入1

做完上述修改後要重啟電腦才會生效。

參考
How to enable and disable SMBv1, SMBv2, and SMBv3 in Windows and Windows Server 加入機碼方法