重裝VS2012如何變更安裝路徑

  • 1491
  • 0

摘要:重裝VS2012如何變更安裝路徑

由於 VS2012 重新安裝時,安裝的路徑不給改,只好拜了拜GOOGLE大神,找到下列國外的文章,讀了一下。

文章中說,擅自變更安裝路徑會面臨無法缷載,無法重新安裝的狀況,可能要重新安裝系統才能解決。我不信邪,就試試。

果然,安裝完了以後,出現很多找不到元件(Component) 無法安裝的錯誤訊息,

啟動時也因為出現找不到元件而無法啟動,而且,也無法缷載(出現同樣的錯誤訊息)…

還要再找找解決方法。

不過也因此發現 snoop 這駭客的玩意兒。

================================================

http://social.msdn.microsoft.com/Forums/en-US/02d6bff1-0744-4f2b-a82d-a776f3bd2890/change-install-folder-in-visual-studio-2012?forum=vssetup

================================================

You can change this path though it's not easy. The installer is a WPF application. Therefore, download and install "Snoop" (http://snoopwpf.codeplex.com/). Steps:
 
Start the installer.
Start Snoop.
"Snoop" the installation package.
Navigate to the BrowseButton by going through these locations:
-> Window (RootView)
 
-> Border (first item)
 
-> AdornerDecorator (first item)
 
-> ContentPresenter (first item)
 
-> LayoutRoot (first item)
 
-> Border (first item)
 
-> Grid (first item)
 
-> Border (3rd item)
 
-> Grid (first item)
 
-> ContentControl (2nd item)
 
-> ContentPresenter (first item)
 
-> InstallStates (first item)
 
-> Welcome (look down the list)
 
-> Grid (first item)
 
-> StackPanel (first item)
 
-> Grid (2nd item)
 
-> BrowseButton (2nd Item)
 
5) After selecting the BrowseButton, find "IsEnabled" in the right side of the window (properties area) and check it making the button enabled. You can now click this button and low and behold underlying code exists to change the default path.
 
I have not experienced any issues from hacking the installer like this.