Chrome Tips
通過在任意位置創建一個捷徑 (shortcut), 並將捷徑指向 "%SystemRoot%\..\Program Files (x86)\Google\Chrome\Application\chrome.exe" –user-data-dir="PUT_YOUR_PREFERRED_DIR_HERE"
即可為 chrome 創建一個新的 profile, 其中 『PUT_YOUR_PREFERRED_DIR_HERE』 部分填入你希望的一個文件夾路徑即可。不過一定要想好,chrome 的 profile 可不是能隨便移動的。之後每次只要雙擊這個捷徑,就會讓 chrome 以你設置的這個位置下的 profile 來開啟。而且 chrome 支持多 profile 同時開啟,互不干涉。
雖說 chrome 的 profile 不可以隨便移動,但還是有一些繞過的方法。
在 Windows 下,可以使用 mklink /j b a
命令來給已經建立好的 profile 換個存儲位置,其中 b 為 chrome 所認為的你的某個 profile 的 user-data-dir 的路徑,而 a 是你為你的 profile 新找的那個地方。
以默認 profile 為例,由於安裝完 chrome 後它會立即自動開啟,這時候它便會在 %AppData%\..\Local\Google\Chrome\User Data
下建立一份 profile. 如果你現在想要移動這份默認建立的 profile 到(比方說)D:\_my_cr_pf
下,則需要把 Chrome 關閉(要確保它完全關閉了,也就是說,要在 Chrome 的 Settings 的 Advanced 部分的 System 子部分下將 『Continue running background apps when Google Chrome is closed』 取消勾選,並打開任務管理器確認已無 chrome 進程),這時候再前往 %AppData%\..\Local\Google\Chrome\User Data
中將所有的內容都剪切出來(Ctrl + A, Ctrl + X), 然後粘貼到你新建的 D:\_my_cr_pf
下。在確保所有文件都已經剪切並粘貼到新的目錄下後,再前往 %AppData%\..\Local\Google\Chrome
將已經成為空文件夾的 『User Data』 刪除,然後再在比方說 D: 處開啟命令行,然後輸入 mklink /j "%AppData%\..\Local\Google\Chrome\User Data" "D:\_my_cr_pf"
並敲回車,看到提示 『Junction created …』 就說明做成了。這之後就可以放心地開啟 Chrome 並發現它絲毫沒有察覺到你給你的 profile 移動了位置了。——只要有一絲一毫的地方沒有做對,讓 Chrome 察覺到你動了 profile 文件,那它就會毀掉你的 profile 然後重建一份新的、原始的空白 profile. 這也是 Chrome 惱人的地方之一。
通過將 profile 導出到系統分割之外,便可以在系統進行鏡像恢復時不干擾到 profile, 這樣在系統透過鏡像恢復後,只要在開啟 chrome 之前先安裝一下最新版本的 chrome 安裝程序,就可以繼續無縫使用之前的默認 profile 了。