顯示具有 Windows系統 標籤的文章。 顯示所有文章
顯示具有 Windows系統 標籤的文章。 顯示所有文章

2016年11月8日 星期二

Microsoft Authenticode - Dual Code Signing Instructions with SHA1 & SHA256 hashing Algorithm

Description

This article provide instructions on how to sign Microsoft Windows software using a single Microsoft Authenticode certificate with dual / two signature algorithm (SHA1 & SHA256). This is efficient for situations that you may want to sign a software or application file with two different signatures. For example, suppose you want your software to run on Windows 7 and Windows 8. Windows 7 supports signatures with SHA256 hashing algorithm but requires updates from Microsoft (see Microsoft Security Advisory 2949927), and Windows 8 supports signatures created with the SHA256 hashing algorithm. In this case, you can sign your software with a primary signature that uses SHA1 then append a secondary signature that uses SHA256 code signing certificate for both signatures.

Signing Tools and System Requirement
Operating System: 
  • Windows 8.1, Windows 8, Window 7, Windows Server 2012, Windows Server 2008 R2
     
Signing Tool:
Certificate required:
  • SHA1 certificate
  • SHA2 certificate
        Note: To do dual code signing, you will need two certificates (both SHA1 and SHA2). Sign SHA1 algorithm with SHA1 certificate and sign SHA2 algorithm with SHA2 certificate. You can not use one certificate to sign both algorithm. If you only have SHA1 or SHA2 certificate, please follow below link to do a replacement and request a new certificate for another algorithm.

Signing Instructions:
This example uses several of the arguments that SignTool supports:
  • Sign: Configures the tool to sign the intended file
  • Verify: Verifies the digital signature of files by determining whether the signing certificate was issued by a trusted authority, whether the signing certificate has been revoked, and, optionally, whether the signing certificate is valid for a specific policy.
  • /a: Selects the best signing certificate automatically. If this option is not present, SignTool expects to find only one valid signing certificate.
  • /as: Appends this signature. If no primary signature is present, this signature is made the primary signature.
  • /f: Specifies the signing certificate in a file. Only the Personal Information Exchange (PFX) file format is supported
  • /fd: Specifies the file digest algorithm to use for creating file signatures. The default is SHA1.
  • /n: Specifies the Common Name of a certificate.  Use this option if you have certificates issued to more then one organization in your certificate store.
  • /p: If the file is in PFX format protected by a password, use the /p option to specify the password
  • /s: Specifies a certificate store (If the certificate is imported into the Personal store, the SPCCertificateStore is MY)
  • /t: Specifies that the digital signature will be timestamped by the Time-Stamp Authority (TSA) indicated by the URL
  • /td: Used with the /tr switch to request a digest algorithm used by the RFC 3161 time stamp server.
    Note: The /td switch must be declared after the /tr switch, not before. If the /td switch is declared before the /tr switch, the timestamp that is returned is from an SHA1 algorithm instead of the intended SHA256 algorithm.
  • /tr: Specifies the URL of the RFC 3161 time stamp server.  This option cannot be used with the /t option.
  • /v: Specifies the verbose option for successful execution and warning messages.
Note: The SHA-1 timestamping URL is http://timestamp.verisign.com/scripts/timstamp.dll
            (The timstamp.dll filename is required to conform to old MS-DOS naming convention).
The SHA-1 with RFC 3161 timestamping URL is http://sha1timestamp.ws.symantec.com/sha1/timestamp
The SHA-256 with RFC 3161 timestamping URL is http://sha256timestamp.ws.symantec.com/sha256/timestamp

Step 1:  Sign the Primary Signature with SHA1 Algorithm 
The following syntax signs the file using SHA1 certificate stored in your Personal certificate store 
With SHA-1 TimeStamp:
signtool.exe sign /a /s MY /n Common name /fd sha1 /t http://timestamp.verisign.com/scripts/timstamp.dll /v file to be signed
Step 2:  Append the Secondary Signature with SHA256 Algorithm by using SHA2 certificate 
Once the application file been signed with SHA1  algorithm  in Step 1 , follow the steps below to append the secondary signature with SHA256 algorithm to the same application file.
The following syntax signs the file using SHA2 certificate stored in your Personal certificate store 
With SHA-256 RFC 3161 TimeStamp:
signtool.exe sign /a /s MY /n "Common name" /fd sha256 /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td sha256 /as /v ""
Note: If you are signing the file with a certificate stored in a password protected PFX file, simply use the arguments   "/f YourCertFileName.pfx /p pfxpassword"   instead of  "/a /s MY /n "Common name" in the command.

 Step 3: Verify the Signature 
 Browse to the signed application file under your windows 8 machine
  1. Right click on  the signed application file
  2. click on  Properties 
  3. Click on Digital Signatures tab
 You should see both SHA1 and SHA256 signature algorithm listed in this tab if the signing process is successful.
 For additional information, refer to the following article  from the Microsoft knowledge base:


from : https://knowledge.symantec.com/ch/support/code-signing-support/index?page=content&id=INFO2274&pmv=print&actp=PRINT

2011年6月27日 星期一

Why is xcopy returning “invalid number of parameters”?

1.The usual solution for this is to be sure that your filenames are enclosed in quotes, as this can be an issue with batch files where you have something like xcopy %1 %2 and you really need xcopy "%1" "%2".
2.xcopy is parsing the forward slashes in the path to its own binary. You can also run into this if you have your PATH defined using forward slashes instead of backslashes.

reference : http://superuser.com/questions/114178/why-is-xcopy-returning-invalid-number-of-parameters

2011年6月26日 星期日

利用 XCOPY 和批次檔 .BAT 功能做備份


rem 是註解, 可以依照個人需求 移除 OR 增加

代碼:

rem ----- 檔案名稱 : BACKUP.BAT -------------------------------------------------------
rem ----- 用途 : 利用 XCOPY 和 .BAT 功能做備份 ----------------------------------------

rem ----- 將 BACKUP.BAT 加入 系統排程 ( 可以手動加入 [開始][程式集][啟動] 中 ) ------
rem at 23:00 /every:s,m,t,w,th,f,sa "d:\LU\BACKUP.bat"

rem ----- XCOPY 用法 可用 "XCOPY /?" 查詢 ---------------------------------------------
rem XCOPY 差異備份常用參數
rem /D:m-d-y 複製在指定日期當天或之後發生變更的檔案。如果沒有給日期,只複製那些來源檔案日期比目的檔案日期為新的檔案。
rem /H 時複製隱藏檔和系統檔。
rem /I 如果目的不存在且複製一個以上的檔案的話,就假?#93;指定的目的一定是目錄。
rem /S 複製每個目錄及其?#93;含的子目錄,不複製空目錄。
rem /E 複製每個目錄及其?#93;含的子目錄,?#93;複製空目錄。/S 與 /E 相同,能夠用來修改 /T。
rem /Y 不要提示您確定是否要覆蓋一個已經存在的檔案。

rem ----- 增加 route 資料, 廢除 ---------------
rem route add 140.127.177.17 192.168.0.2

rem ----- 將開始備份時間寫入 log 紀錄中 -----------------------------------------------------------------------
rem %date% 表示日期環境變數, %date:~0,4% 表示 日期環境變數中從第 0 個位置抓出 4 個字
echo %date:~0,4%%date:~5,2%%date:~8,2% 網頁資料備份紀錄檔 > D:\Backup\log\%date:~0,4%%date:~5,2%%date:~8,2%.log
echo 始備份時間 >> D:\Backup\log\%date:~0,4%%date:~5,2%%date:~8,2%.log
TIME /T >> D:\Backup\log\%date:~0,4%%date:~5,2%%date:~8,2%.log

rem ------ [完整備份] 將網站資料備份到 以 日期為目錄名稱 的目錄中 --------------------------------------------------------
rem xcopy c:\inetpub D:\Backup\%date:~0,4%%date:~5,2%%date:~8,2% /h /i /s /k /o /y >> D:\Backup\log\%date:~0,4%%date:~5,2%%date:~8,2%.log

rem ----- [差異備份] 備份 MSN 表情符號, 改名成 .gif 方便?#91;看, 更名失敗表示重複, 可刪除
XCOPY "C:\Documents and Settings\lu\Application Data\Microsoft\MSN Messenger\1061698994\CustomEmoticons" "D:\CustomEmoticons" /D /H /I /S /Y
REN D:\CustomEmoticons\*.dat *.gif
DEL D:\CustomEmoticons\*.dat

rem ------ [差異備份] 備份 MSN 表情符號 到 File Server 的個人備份區
XCOPY D:\CustomEmoticons Z:\CustomEmoticons\ /D /H /I /S /Y

rem ------ [差異備份] 備份 我的最愛 到自己的 D: 磁碟 --------------------------------------------------------------
rem 使用 %USERPROFILE% 環境變數, 它代表 "C:\Documents and Settings\(使用者登入帳號)"
XCOPY %USERPROFILE%\Favorites "z:\Favorites\" /D /H /I /S /Y
rem XCOPY "C:\Documents and Settings\lu\Favorites" "D:\Favorites\" /D /H /I /S /Y

rem ------ [差異備份] 備份 Outlook Express 6.x 通訊錄 到自己的 D: 磁碟 -------------------------------------------------------------------
XCOPY "%USERPROFILE%\Application Data\Microsoft\Address Book" "D:\Address Book\" /D /H /I /S /Y
rem XCOPY "C:\Documents and Settings\lu\Application Data\Microsoft\Address Book" "D:\Address Book\" /D /H /I /S /Y

rem ------ [差異備份] 備份 我的最愛 到 File Server 的個人備份區 -----------------------------------------------------------
XCOPY %USERPROFILE%\Favorites "z:\Favorites\" /D /H /I /S /Y
rem XCOPY "C:\Documents and Settings\lu\Favorites" "z:\Favorites\" /D /H /I /S /Y

rem ------ [差異備份] 備份 Outlook Express 6.x 通訊錄 到 File Server 的個人備份區 -----------------------------------------------------------
XCOPY "%USERPROFILE%\Application Data\Microsoft\Address Book" "z:\Address Book\" /D /H /I /S /Y
rem XCOPY "C:\Documents and Settings\lu\Application Data\Microsoft\Address Book" "z:\Address Book\" /D /H /I /S /Y

rem ----- [壓縮完整備份] 將 D:\lu 用 WinRAR 壓縮放在 d:\lu.rar 或 d:\日期.rar ----------------------
rem WinRar 是商業軟體, 網?#125; http://www.rarsoft.com/
rem c:\progra~1\winrar\rar a -r d:\lu.rar d:\lu\*
rem c:\progra~1\winrar\rar a -r d:\%date:~0,4%%date:~5,2%%date:~8,2%.rar d:\lu\*
rem "C:\Program Files\WinRar\rar a -r d:\%date:~0,4%%date:~5,2%%date:~8,2%.rar d:\lu\*

rem ----- [壓縮完整備份] 將 D:\lu 用 7-zip 壓縮 ----------------------
rem 7-Zip 是免費軟體, 網?#125; http://www.7-zip.org/
rem "C:\program Files\7-zip\7z" a -r c:\%date:~0,4%%date:~5,2%%date:~8,2%.7z d:\lu\*.*
rem 壓縮成為 .zip 格式
rem "C:\program Files\7-zip\7z" a -r -tzip c:\%date:~0,4%%date:~5,2%%date:~8,2%.zip d:\lu\*.*

rem ----- 差異備份, 異動檔案輸出到 1.log -----
rem XCOPY D:\LU Z:\LU\ /D /H /I /S /Y >> c:\1.log
XCOPY D:\LU Z:\LU\ /D /H /I /S /Y

rem ------ 備份 Outlook 信件 -------------------------------------------------
rem echo 請先關閉 Outlook , 否則 Outlook 信件無法備份
rem pause
XCOPY "D:\Outlook" "z:\Outlook\" /D /H /I /S /Y

rem ------ 備份 hosts 檔案 -------------------------------------------------
XCOPY C:\WINDOWS\system32\drivers\etc\hosts z:\ /D /H /I /S /Y

rem ------ 輸出備份完成時間 -----------------------------------------------
echo 結束備份時間 >> D:\Backup\log\%date:~0,4%%date:~5,2%%date:~8,2%.log
TIME /T >> D:\Backup\log\%date:~0,4%%date:~5,2%%date:~8,2%.log


reference : http://www.bestlong.idv.tw/redirect.php?tid=763&goto=lastpost

2011年4月15日 星期五

NirCmd v2.52 - Freeware Windows command-line tool

NirCmd is a small command-line utility that allows you to do some useful tasks without displaying any user interface. By running NirCmd with simple command-line option, you can write and delete values and keys in the Registry, write values into INI file, dial to your internet account or connect to a VPN network, restart windows or shut down the computer, create shortcut to a file, change the created/modified date of a file, change your display settings, turn off your monitor, open the door of your CD-ROM drive, and more...

Examples of what you can do with NirCmd

Open the door of J: CD-ROM drive nircmd.exe cdrom open j:
Close the door of Y: CD-ROM drive nircmd.exe cdrom close y:
Speaks the text currently in the clipboard (For Windows XP and Vista). speak text ~$clipboard$
Increase the system volume by 2000 units (out of 65535) nircmd.exe changesysvolume 2000
Decrease the system volume by 5000 units (out of 65535) nircmd.exe changesysvolume -5000
Set the volume to the highest value nircmd.exe setsysvolume 65535
Mute the system volume nircmd.exe mutesysvolume 1
Unmute the system volume nircmd.exe mutesysvolume 0
Switch the system volume between the mute and normal state. nircmd.exe mutesysvolume 2
Create a shortcut on your desktop that switch the system volume between the mute and normal state. nircmd.exe cmdshortcut "~$folder.desktop$" "Switch Volume" mutesysvolume 2
Turn off the monitor nircmd.exe monitor off
Start the default screen saver nircmd.exe screensaver
Put your computer in 'standby' mode nircmd.exe standby
log off the current user nircmd.exe exitwin logoff
Ask if you want to reboot, and if you answer 'Yes', reboot the computer. nircmd.exe qboxcom "Do you want to reboot ?" "question" exitwin reboot
Turn off your computer nircmd.exe exitwin poweroff
Turn off all computers specified in computers.txt ! multiremote copy "c:\temp\computers.txt" exitwin poweroff force
Dial to "My Internet" connection nircmd.exe rasdial "My Internet"
Disconnect the "My Internet" connection nircmd.exe rashangup "My Internet"
Make your Internet Explorer windows 75% transparent ! (192 / 256) nircmd.exe win trans ititle "internet explorer" 192
Minimize all your Internet Explorer windows nircmd.exe win min class "IEFrame"
Close all your Internet Explorer windows nircmd.exe win close class "IEFrame"
Close all your Explorer windows (My Computer, folders, and so on) nircmd.exe win close class "CabinetWClass"
Hide all your Internet Explorer windows nircmd.exe win hide class "IEFrame"
Show all your Internet Explorer windows (after you made them hidden with previous example) nircmd.exe win show class "IEFrame"
Center all top-level windows nircmd.exe win center alltop
Remove the title bar of My Computer window. nircmd.exe win -style title "my computer" 0x00C00000
Return the title bar of My Computer window that we removed in the previous example. nircmd.exe win +style title "my computer" 0x00C00000
Set the My Computer window to right-to-left order (For hebrew and arabic languages) nircmd win +exstyle title "my computer" 0x00400000
Set all child windows of My Computer window to right-to-left order (For hebrew and arabic languages) nircmd win child title "my computer" +exstyle all 0x00400000
Create a shortcut on your desktop that closes all your Internet Explorer windows nircmd.exe cmdshortcut " "~$folder.desktop$ "Close All IE" win close class "IEFrame"
Create a shortcut on your desktop that hides all your Internet Explorer windows nircmd.exe cmdshortcut " "~$folder.desktop$ "Hide All IE" win hide class "IEFrame"
Create a shortcut on your desktop that shows back all your Internet Explorer windows nircmd.exe cmdshortcut " "~$folder.desktop$ "Show All IE" win show class "IEFrame"
Set the Windows Calculator as top-most window (above all other windows) nircmd.exe win settopmost title "Calculator" 1
Set the Windows Calculator back to regular window (non top-most window) nircmd.exe win settopmost title "Calculator" 0
Create a shortcut to Windows calculator under Start Menu->Programs->Calculators nircmd.exe shortcut "f:\winnt\system32\calc.exe" "~$folder.programs$\Calculators" "Windows Calculator"
Hide the desktop window nircmd.exe win hide class progman
Show the desktop window (After hiding it in previous example) nircmd.exe win show class progman
Hide the start button on the system tray nircmd.exe win child class "Shell_TrayWnd" hide class "button"
Show the start button on the system tray nircmd.exe win child class "Shell_TrayWnd" show class "button"
Hide the clock on the system tray nircmd.exe win child class "Shell_TrayWnd" hide class "TrayClockWClass"
Show the clock on the system tray nircmd.exe win child class "Shell_TrayWnd" show class "TrayClockWClass"
Kill (terminate) all instance of Internet Explorer processes nircmd.exe killprocess iexplore.exe
Create a shortcut on your desktop that opens the door of K: CDROM drive when you run it. nircmd.exe cmdshortcut "~$folder.desktop$" "Open CDROM" cdrom open k:
Create a shortcut to NirSoft Web site on your desktop nircmd.exe urlshortcut "http://www.nirsoft.net" "~$folder.desktop$" "NirSoft"
Add NirSoft Web site to your Favorities under Links folder. nircmd.exe urlshortcut "http://www.nirsoft.net" "~$folder.favorites$\Links" "NirSoft"
Create a shortcut to NirSoft Web site on the desktop of all computers listed in computers.txt nircmd.exe multiremote copy "c:\temp\computers.txt" urlshortcut "http://www.nirsoft.net" "~$folder.common_desktop$" "NirSoft"
Set the display mode to 800x600x24bit colors nircmd.exe setdisplay 800 600 24
Create a shortcut on the desktop that set the display mode to 800x600x24bit colors nircmd.exe cmdshortcut "~$folder.desktop$" "800x600x24" setdisplay 800 600 24
Copy all shortcuts on your desktop to another folder (f:\temp\desktop). nircmd.exe execmd copy "~$folder.desktop$\*.lnk" f:\temp\desktop
Restart your Apache server (under Windows NT/2000/XP/2003) nircmd.exe service restart apache
Create a shortcut on your desktop that restarts the Apache server nircmd.exe cmdshortcut "~$folder.desktop$" "Restart Apache" service restart apache
Restart your IIS nircmd.exe service restart w3svc
Restart MySql nircmd.exe service restart MySql
Open the desired Registry key/value in RegEdit nircmd.exe regedit "HKLM\Software\Microsoft\Windows\CurrentVersion" "CommonFilesDir"
Open the Registry key that you copied to the clipboard in RegEdit. nircmd regedit "~$clipboard$"
Disable the screen saver nircmd.exe regsetval sz "HKCU\control panel\desktop" "ScreenSaveActive" 0
Enable the screen saver nircmd.exe regsetval sz "HKCU\control panel\desktop" "ScreenSaveActive" 1
Change the date/time of the specified filename (creation time and modified time) nircmd.exe setfiletime "c:\temp\myfile.txt" "24-06-2003 17:57:11" "22-11-2005 10:21:56"
Copy your desktop folder path to the clipboard nircmd.exe clipboard set ~$folder.desktop$
Copy your start menu folder path to the clipboard nircmd.exe clipboard set ~$folder.start_menu$
Copy the content of info1.txt (simple text file) to the clipboard nircmd.exe clipboard readfile "c:\My Files\info1.txt"
Add the text content of clipboard to info1.txt nircmd.exe clipboard addfile "c:\My Files\info1.txt"
Clear the clipboard nircmd.exe clipboard clear
Create all folders specified in "c:\temp\folders.txt". The folder path names are separated by CRLF characters. nircmd.exe paramsfile "c:\temp\folders.txt" "" "" execmd md ~$fparam.1$
Install the specified .NET assembly in the global assembly cache (like gacutil) nircmd.exe gac install "C:\temp\MyAssembly\bin\MyAssembly.dll"
Empty the recycle bin in all drives. nircmd.exe emptybin
Answer 'Yes' to a standard Windows message-box. nircmd.exe dlg "" "" click yes
Wait 2 seconds, and then save the current screen to shot.png nircmd.exe cmdwait 2000 savescreenshot "f:\temp\shot.png"
Save 10 screenshots in a loop, and wait 60 seconds between the screenshot save calls. The filenames of the screenshot will contain the time and date of the saved screenshot. nircmd.exe loop 10 60000 savescreenshot c:\temp\scr~$currdate.MM_dd_yyyy$-~$currtime.HH_mm_ss$.png
Wait until Firefox is closed, and then say "Firefox was closed" waitprocess firefox.exe speak text "Firefox was closed"

System Requirements

This utility can work in all 32-bit Windows operating systems: Windows 9x/ME, Windows NT, Windows 2000, Windows XP, Windows Server 2003, and Windows Vista. However, some of NirCmd commands works only on Windows NT/2000/XP/2003/Vista.

官網:http://www.nirsoft.net/utils/nircmd.html

2010年8月31日 星期二

Windows 7 工具列增加快速啟動

Windows 7 工具列增加快速啟動
許多網友一定記得在 Windows 7 之前的 Windows 系統都有個快速啟動(quick launch)區域。比如 IE 瀏覽器、Windows Media Player 程序可以在裡面快速啟動。


Windows 7 全新的任務欄其實,Windows 7 裡面雖然取消了快速啟動,但是快速啟動的功能仍然存在。你可以把常用的程序放在任務欄裡,要用的時候一樣可以方便打開。

你可以把你想要的程序加到任務欄中:
(右鍵點這個程序或者是快捷方式,選鎖定到任務欄。也可以把程序拖到任務欄。)


如何找回 Windows XP 樣式的快速啟動欄
1. 在任務欄上右鍵 -> 工具欄 -> 新建工具欄。



2.在文件夾裡面輸入這個路徑,然後點選著資料夾: %userprofile%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch




3.在任務欄上空白處右鍵,把鎖定任務欄的勾去掉。然後在 Quick Launch 的位置右鍵,把顯示文本和顯示標題的勾全部去掉。


4.. 現在任務欄已經解鎖。我們可以自由的拖動上面的東西。稍微用點力,需要乾坤大挪移一下。把快速啟動欄往左拖到不能再拖的位置。然後把任務欄往右拖,快速啟動欄自動就到了最左邊。


5.把任務攔拉到左邊以後 登登登登~~xp原本的快速啟動又出現了!!!!



摘自:http://jack66112211.pixnet.net/blog/post/26227279

2010年4月5日 星期一

改动office outlook 2007默认文件夹的存放位置

office outlook 2007 数据文件默认的存放位置是C盘,因为经常动C盘,且时常用影子系统,所以里面的数据一天到晚会清空,导出不是个办法,所以想让它存到其他盘,但在帐号数据文件里只能看不能改文件路径,请问有没有什么方法能够实现。我现在的笨办法是把C:\Document s and Setting\user name\Local Settings\Application Data\Microsoft\Outlook文件夹剪切到其它盘,然后打开Outlook会说找不到pst文件,再定位到新的路径,但另外的E- mail帐号还是会保存到C盘,请问有什么方法能够解决?谢谢。

控制面板→邮件→数据文件,添加一个新的,然后再删除旧的

2010年1月29日 星期五

[桌面相關] XP 字體大改造!讓你的系統字型變得跟 MAC 一樣漂亮

本方法由《Jackbin 的懶人筆記本》提供。

Windows 一直以來都是以新細明體的面貌跟大家見面,不是作業系統或是網頁幾乎預設都是以這個字型居多,想必大家也都看習慣了吧!除了 Windows 之外, 蘋果 MAC 的內建字體受到許多網友的愛戴,但可惜都沒有簡單的方法能將蘋果字體套用到 Windows 裡作為系統字型,以至於大家都只能遠觀而不可褻玩焉。

透過 GDI++ 這套程式以及設計好的安裝批次檔,只要簡單的六個步驟就可以把新細明體換成蘋果的字體,安裝完成後的 XP 會變成這樣…




檔案下載:http://www.mediafire.com/?l2mywdwnmny

注意:如果你已經有安裝 GDI++ ,請先把他們移除,(包含【開始】 → 【所有程式】 → 【啟動】 → 【gditray.exe】)



Step 1

將下載下來的檔案解壓縮到 C 槽。



Step 2

接著打開 GDI++ 資料夾裡的「Font」→「_Replacer」資料夾,並點兩下滑鼠左鍵執行「Replacer.cmd」執行檔,會出現一個黑色的 DOS 視窗。



Step 3

開啟「C:\Windows\Font\」資料夾,找到「MingLiu&PMingliU」這個字型檔案(就是細明體&新細明體)。找到後用滑鼠左鍵選取該檔案後,拖曳到剛才開啟的黑色 DOS 視窗裡。

注意:拖曳檔案前先將該字型檔案複製到其他地方做備份。

這時 DOS 視窗理會顯示出這個字型的所在位置。按【Enter】下一步。



Step 4

將「C:\GDI++\font\iLihei」或「C:\GDI++\font\華文黑體」資料夾裡的「MINGLIU.TTC」字型檔拖曳到黑色 DOS 視窗,然後按【Enter】


(圖片引用自 Jackbin 的懶人筆記)

此時會出現「Continue? 」,在鍵盤上按「Y」然後按【Enter】。完成後會出現【Press any key to quit.】按任意鍵推出。


(圖片引用自 Jackbin 的懶人筆記)

Step 5

接著將「C:\GDI++\font」資料夾裡的「wt064.ttf」字型檔複製到「C:\Windows\Font\」資料夾裡面。

Step 6

最後,開啟「C:\GDI++\Registry」資料夾,執行裡面的「install_gdi++reg.bat」,這是要讓系統在開機時自動啟動 GDI++的步驟。

完成之後就重新啟動電腦吧!你會發現一切都變得不大一樣囉!




結果就是變成這樣:



不錯吧!

▍還原方法
(感謝網友 Leo 提供)

方法如下:

開啟「控制台」\「字型」。
刪除「MingLiU & PMingLiU(TrueType)」這個字型。
最後,將先前備份到桌面的「mingliu」字型,拉回控制台的「字型」。
重新開機,OK!

摘自:http://www.soft4fun.net/desktop/change-windows-font-to-mac-is-better-then-origin.htm

2009年4月7日 星期二

XP無法編輯hosts

使用unlocker軟體即可

2008年12月29日 星期一

[Window]手動安裝PHP+MySQL+Apache+phpMyAdmin

安裝版本

1. Apache2 2.2.11
2. PHP 5.2.8
3. MySQL 5.1.30
4. phpMyAdmin 3.1.1

請準備以上項目的 zip 壓縮版本,而不要用安裝版本(.exe),備齊這些資料就可以開始了。

示範平台:

OS : Windows XP
RAM : 2G


一、Apache
只有非官方的 Apache on Windows (Apache2) 才能直接在 Windows 安裝,安裝步驟如下:
1. 請先安裝 Visual C++ 2005 Redistributable Package
http://www.apachelounge.com/download/vcredist_x86-sp1.exe

2. 將 Apache2 解壓縮到 C:\ (例:C:\Apache2)

3.
開始 > 執行 > 輸入 cmd > 確定
cd\apache2\bin
httpd -k install
httpd -k start
(P.S. httpd -k uninstall 為移除 Apache2 服務)

4. 開啟一個瀏覽器,在網址列輸入 http://localhost 測試,出現「It works!」字樣即為安裝成功。(預設網站資料夾為 C:\Apache2\htdocs)

二、PHP
安裝 PHP
將 PHP 檔案解壓縮到資料夾 C:\php (沒有請新增)
將 c:\php\php5ts.dll、c:\php\libmysql.dll copy 到 C:\Apache2\bin
將 c:\php\php.ini-dist copy 到 C:\Windows 並更名為 php.ini

設定 php.ini
找到 extension_dir = "./" 改成 extension_dir = "C:\php\ext"
找到 ;extension=php_mbstring.dll 改成 extension=php_mbstring.dll
找到 ;extension=php_mysql.dll 改成 extension=php_mysql.dll
找到 ;date.timezone = 改成 date.timezone = "Asia/Taipei"
(如果你不在台灣,請改成你的時區.. )
將 php.ini 存檔後關閉

設定 Apache,以模組方式載入 PHP
開啟 C:\Apache2\conf\httpd.conf

找到 #LoadModule vhost_alias_module modules/mod_vhost_alias.so
在下方加入 LoadModule php5_module "c:/php/php5apache2_2.dll"

找到 AddType application/x-gzip .gz .tgz
在下方加入 AddType application/x-httpd-php .php

找到 DocumentRoot "c:/Apache2/htdocs" ,改成你的網站資料夾
(例 www)DocumentRoot "c:/www"

找到 ,改成你的網站資料夾
(例 www)

找到 DirectoryIndex index.html ,改成
DirectoryIndex index.html index.htm index.php

設定 Apache,開啟 rewrite 模組(不需要者可略過)
找到 #LoadModule rewrite_module modules/mod_rewrite.so
改成 LoadModule rewrite_module modules/mod_rewrite.so

搜尋 AllowOverride None (可找到三個結果)
全部改成 AllowOverride All

重新啟動 Apache
開始 > 執行... > 輸入 cmd > 確定
cd\apache2\bin
httpd -k restart

測試 PHP 環境
請在你的網站資料夾裡新建檔案 c:\www\phpinfo.php ,內容只有一行如下:

<?php phpinfo() ?>


開啟一個瀏覽器,並在網址列輸入 http://localhost/phpinfo.php
如果有出現 php 相關訊息就代表安裝成功了。\

三、MySQL
將 MySQL 檔案解壓縮到 C:\ 並將資料夾 mysql-noinstall-5.1.30-win32 更名為 mysql,
(例C:\mysql)

依下列程序安裝 MySQL 服務
開始 > 搜尋列
輸入 C:\mysql\bin\mysqld -install 按確定

MySQL 講座(懂了就可以跳過,請確認 MySQL 已啟動)
一般在 WindowsNT/2000/XP/Vista,MySQL需要安裝成為一個系統服務。
你可以在以下程序看到 MySQL 服務。
我的電腦上按右鍵選管理
服務及應用程式 > 服務
在 MySQL 上點兩下(如果沒有找到代表你安裝不成功)
啟用類型: 自動.. 服務狀態: 已啟動 才是正常,如果不是請設定成這樣。經過此設定後,MySQL 服務將會在你每次開機後自行啟動。

如果要移除 MySQL 服務,請作以下動作
先停止 MySQL 服務,我的電腦上按右鍵選管理
服務及應用程式 > 服務
在 MySQL 上點兩下
啟用類型: 自動.. 服務狀態: 已停止,設定成這樣。
開始 > 執行
輸入 C:\mysql\bin\mysqld -remove 按確定
需注意,若沒有這個動作自行刪除 MySQL 檔案,這裡的 MySQL 服務就會變成無法移除了!

設定 MySQL 編碼
copy C:\mysql\my-huge.ini 到 C:\WINDOWS\ 之下,更名為 my.ini ,設定 MySQL 預設編碼為 UTF-8 (或其他)

my.ini

[mysqld]
default-character-set=utf8

[client]
default-character-set=utf8



重新啟動 MySQL
我的電腦上按右鍵選管理
服務及應用程式 > 服務
在 MySQL 上按右鍵 > 重新啟動

四、phpMyAdmin
安裝 phpMyAdmin
將 phpMyAdmin 檔案解壓縮到 (你的網站資料夾)\phpmyadmin,
(例C:\www\phpmyadmin)

設定 phpMyAdmin
copy c:\www\phpMyAdmin\config.sample.inc.php 至 c:\www\phpMyAdmin\,並更名為config.inc.php


<?php
$cfg['blowfish_secret'] = 'ba17c1ec07d65003'; // use here a value of your choice

$i=0;
$i++;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
?>


參考網址:http://blog.raienet.com/330

2008年6月12日 星期四

輕鬆修改Windows XP Administrator賬號的密碼

Windows XP控制面板中的“用戶賬戶”,可以讓你修改用戶賬戶的密碼,但是卻不能修改Administrator賬戶的密碼,假如你要把Administrator的密碼改為chunke111,可以這樣操作:

依次選擇“開始→運行”,在彈出的“運行”對話方塊中輸入“cmd”命令,打開命令提示符窗口,在這裡,鍵入命令net user Administrator chunke111回車即可。

如果我們需要清除Administrator賬戶密碼,你可以進入Windows XP系統所在的盤符,刪除系統裝設目錄(Windows\system32\config)下的SAM文件,重新啟動電腦後,Administrator賬戶就沒有密碼了。

wibiya widget