2024/01/23

EDGE開啟pdf檔直接另存

 有時後用EDGE在瀏覽網頁時,看到一些PDF檔,EDGE可以直接顯示,不用另存成PDF檔,再用 PDF reader開啟。

如果希望直接存在PDF檔,不要在EDGE中直接開啟,可以調整機碼來達行。

機碼位置如下,如果沒有的話,可以自行手動新增,設定好要重開機才會生效。



Sometimes, when browsing web pages using EDGE, you may come across PDF files that EDGE can display directly without the need to save them as PDF files and then open them with a PDF reader.

If you prefer to save the PDF file directly instead of opening it in EDGE, you can adjust the registry to achieve this.

If you cannot find this registry entry, you can manually add it yourself and ensure that the changes take effect after restarting your computer.



2024/01/19

WIN10 安裝framework 3.5失敗 0X800F0954

 win10在裝framework 3.5一直失敗,錯誤代碼是 0X800F0954 。

有人說要去HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\ 裡面調機碼,把UseWUServer的值改成0。

但發現自己的電腦裡並沒有這個機碼,所以就手動新增,設定好重開機,就可以成功安裝。



Windows 10 fails to install Framework 3.5, and the error code is 0X800F0954.

Some suggest modifying the registry key at HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\ by changing the value of UseWUServer to 0.

However, it was found that the registry key was not present on the computer, so it was manually added. After configuring and restarting, the installation was successful.



2024/01/05

WINDOWS複製資料夾 包含權限

 如果要把A資料夾整個完整複製,包含裡面的權限跟所有資料,然後名稱變成B資料夾。

而且B資料夾本身的權限必須跟A資料夾相同,可以使用robocopy這個內建指令。

執行指令前要確認B資料夾不存在,再執行指令。

指令: robocopy D:\A D:\B /E /COPYALL



If you want to completely copy the entire A folder, including its permissions and all data inside, and rename it to B folder, you can use the built-in command robocopy.

Ensure that the B folder does not exist before executing the command.

Command: robocopy D:\A D:\B /E /COPYALL

2024/01/03

WINDOWS 檔案總管內點選檔案時速度很慢

使用者反應,他在檔案總管裡,開啟一個pdf檔案時很正常,然後再點其他pdf檔案後,檔案不會馬上開啟,要等個幾十秒,他認為是程式有問題。

把程式重新安裝後,還是一樣,後來發現在檔案總管內,是有開啟預覽窗格的功能,如果這個功能關閉,連續開啟不同檔案時,就不會有緩慢的問題了。




User feedback indicates that when he opens a PDF file in File Explorer, it works fine. However, when he tries to open another PDF file after that, the file doesn't open immediately; instead, it takes several seconds. He believes there is an issue with the program.

Even after reinstalling the program, the problem persists. Later, it was discovered that within File Explorer, there is a feature to open a preview pane. When this feature is disabled, there is no longer a delay issue when opening different files consecutively.

2024/01/02

python py轉exe後執行失敗

 最近在更新一個python檔案,更新完要透過pyinstaller轉成exe,會用到pandas跟openpyxl兩個套件。

轉出來後卻無法執行,錯誤訊息是說numpy有問題(Error importing numpy: you should not try to import numpy from....)

這個是在裝pandas時自動裝進來的,研究到最後就是python的版本太新(3.9.x),重新建一個虛擬環境,降到3.6就排除這個問題了。

但卻產生另一個錯誤(ImportError: Missing optional dependency 'xlrd'. Install xlrd >= 1.0.0 for Excel support Use pip or conda to install xlrd)

查到最後也是版本的問題,最快的方法就是重做一個虛擬環境,python是3.8.1,然後pip install pandas跟openpyxl,xlrd跟numpy的問題就沒了。



I have been updating a Python file recently, and after the updates, I need to convert it to an executable using pyinstaller. The script relies on two packages, pandas and openpyxl.

However, after the conversion, the executable cannot run, and the error message indicates an issue with numpy (Error importing numpy: you should not try to import numpy from....). It turns out that this issue arose because of the version of Python being too new (3.9.x) when installing pandas. I resolved this by creating a new virtual environment and downgrading to Python 3.6.

However, this led to another error (ImportError: Missing optional dependency 'xlrd'. Install xlrd >= 1.0.0 for Excel support. Use pip or conda to install xlrd). After investigation, I found that this was also a version-related problem. The quickest solution was to create a new virtual environment with Python 3.8.1 and then install pandas and openpyxl using pip. This resolved the issues with xlrd and numpy.