• Windows 7/Vista – Can I change the default listening port of Remote Assistance

    [Symptom] Can I change the default listening port of Remote Assistance ?

    [Explanation] The answer is no, this is by design behavior.

    · Remote Assistance uses the DCOM port (135) only to allow DCOM communication for remote launching of RA on the novice side – which in turn opens Remote Assistance listeners on the novice machine.

    · These listeners are opened on dynamically chosen ports. In Vista/Win 7 there really is no way to configure this range in any way. What we do suggest is instead of using port based exceptions, add an exception to allow traffic from “msra.exe” from your firewall.

    · Remote Assistance is using dynamic ports from the port range starting at 49152 and ending at 65535.

    [Suggestion]

    · Consult Firewall Vendors, there may have a mechanism to look for those RPC Packets and dynamically open the negotiated port. (as long as the Firewall Device is configured to do so)

    [Reference]

    The default dynamic port range for TCP/IP has changed in Windows Vista and in Windows Server 2008

    http://support.microsoft.com/?id=929851

  • Windows 7/如何還原 Windows 7的多重開機磁區

    [問題描述] 如何還原 Windows 7 的多重開機磁區

    [重現步驟]

    1. 先安裝 Windows XP 在 C磁碟

    2. 再安裝 Windows 7 在 D磁碟

    3. 然後使用Ghost或XP光碟再安裝一次XP到C磁碟

    4. Windows 7的開機選單會不見,直接會進到 XP的系統

    必要工具:

    - Windows 7 的光碟片

    詳細步驟:

    1. 使用 Windows 7光碟片開機並按 ”下一步”

    image

    2. 選擇 ”修復您的電腦”

    image

    3. 按下 ”修復並重新啟動”

    image

    4. 重開機後, 再使用Windows 7光碟片進入還原模式

    · 按下一步

    · 選擇修復您的電腦

    5. 按”下一步”

    image

    6. 按下完成重新開機

    image

    7. 再使用Windows 7光碟片進入還原模式

    · 按下一步

    · 選擇修復您的電腦

    · 選擇命令提示字元

    image

    8. 輸入以下的指令,輸入完畢後關閉此命令提示字元

    · Bcdedit /create {ntldr} /d “Windows XP”

    · Bcdedit /set {ntldr} device partition=c:

    · Bcdedit /set {ntldr} path \ntldr

    · Bcdedit /displayorder {ntldr} /addlast

    image

    9. 回到選單後再選擇 ”啟動修復”

    image

    10. 啟動修復完後按下完成重新開機.

    image

    11. 重開機後即可看到開機選項已經修復

    image

    參考連接

     

     

    Windows no longer starts after you install an earlier version of the Windows operating system in a dual-boot configuration

     

     

    http://support.microsoft.com/kb/919529/en-us

     

     

     

     

  • 如何在gpmc下使用WMI篩選器,讓群組原則套用至特定的作業系統?

    以Windows 防火牆為例,在Windows XP 下有傳統的Windows 防火牆,而在Windows Vista及Windows 7下提供了更進階功能的Windows 防火牆。如果IT想要設定二條Policy,第一條policy是使用新的Windows Firewall policy,希望只套用在Windows Vista及Windows 7的作業系統,而另一條Policy設定傳統的Windows Firewall policy,只套用在Windows XP,可以參考以下的做法。

    1.在DC 上,開啟GPMC,找到WMI篩選器。

    clip_image002

    2.右鍵點選「新增」,在名稱裏輸入您指定的名稱(例如Windows 7 /Vista),再點選「新增」。

    clip_image004

    3.在下方的查詢裏,請直接貼入Select * from Win32_OperatingSystem Where (Caption Like "%Microsoft Windows 7%") OR (Caption Like "%Microsoft® Windows Vista%") 文字 ,再按下「確定」,再到步驟2的圖中,按下「儲存」。

    clip_image006

    4.重覆步驟2和3,新增一條For Windows XP的規則,其內容為Select * from Win32_OperatingSystem Where (Caption Like "%Microsoft Windows XP%")

    clip_image008

    5.在Group policy上,建立二條Policy,分別是針對舊的防火牆和新的防火牆做設定。假設這條Policy要套在Vista和Win7上,請在右下方的WMI篩選上以下拉選單選到剛剛步驟3產生的條件。同樣的,假設您的policy是要套在XP上,請選到for XP的條件。

    clip_image010

    如此,即使 OU下同時有不同版本的作業系統,即使這二條policy同時和此 OU產生連結,當Client電腦開機後,會依照WMI篩選器的條件,只套用符合規定的policy來套用。

  • 以psexec.exe遠端登入電腦抓封包的方式

    在有些情況下,無法登入系統抓封包,例如想抓電腦開機後登入前狀態的封包,但又因為尚未登入系統,無法啟動抓封包的工具,可考慮以下的方法。

    1. 找2台機器,分別為有問題的機器(電腦A),及遠端搖控的機器(電腦B)。

    2. 在電腦A上,安裝netmon 3.4。http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=983b941d-06cb-4658-b7f6-3088333d062f

    3. 在電腦B上,下載PSTOOLS並且解壓縮 http://download.sysinternals.com/Files/PsTools.zip 。將psexec.exe copy至C:\下。

    4. 在電腦B下,開啟CMD,執行psexec \\machineA  -u administrator -p <administrator的密碼> “cmd.exe” 這個步驟是藉由psexec的工具,使用cmd連到電腦A,以並且電腦A的administrator帳戶在電腦B上遠端搖控。

    5. 下指令 cd\,將目錄切到根目錄

    6. 下指令"%ProgramFiles%\Microsoft Network Monitor 3\nmcap" /network * /capture /file %ComputerName%_test.cap:50M /DisableConversations /DisableLocalOnly ,這樣是我在電腦B上,去執行遠端電腦A的netmon程式

    7. 等電腦A上的問題重現,或是需要停止抓封包後,在電腦B上執行Ctrl+ C停止抓封包。這個時後要等到電腦B cmd裏的程序都跑完,才算抓完。這個時後,會將封包存在C:\下。

  • 使用Group policy派送IE trust site時,無法在terminal server上生效

    問題徵狀

    使用 Group Policy裏的IE 維護原則設定信任網站後,您發現大部份的Client都套用成功,但是Windows 2003 的terminal server沒有生效。

    問題分析:

    1. 首先,先確認IE的Ehanced security configuration是否有被勾選,如果有的話,請在新增移除Windows 元件裏,將這個項目拿掉,再套用一次policy測試(預設在Windows 2003機器裏,該選項是勾選的)。
    2. 如果關閉後,仍無法生效,請檢查HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\ IEHarden=1機碼是否存在,如果存在的話,請刪除之,再套用一次,


    補充說明:

    1. 在Enable IE ESC時,它信任網站讀的機碼是HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\EscDomains 位置。
    2. 當初在建立信任網站的Policy時,假設在DC上已經將IE ESC的功能關閉,因此套用下來時的機碼會寫在KEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains下。如果用戶端有Enable IE ESC,就不會生效。
    3. 因此要確認無法生效的機器上,IEESC是否有確定關閉,並且該機碼也確定被刪除;有些情況下,將該勾勾拿掉後,機碼仍沒有刪除成功,因此信任網站的設定仍沒有生效。

     

    解決方法

    解決方式是要將IEESC關閉後,並且確認在HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\ IEHarden=1裏的機碼被刪除。

    1. 下載http://www.microsoft.com/downloads/details.aspx?familyid=d41b036c-e2e1-4960-99bb-9757f7e9e31b&displaylang=en

    2. 將裏面的 InetESC.adm copy至該機器。

    3. 執行本機群組原則,匯入此adm

    4. 點到電腦設定>系統管理範本>IE Components> Internet Explorer> IEESC,將游標定位在上面

    5. 點選MMC的檢視>篩選,將裏面的選項都拿掉

    clip_image002

    6. 完成後您將可看到下列設定項目並且可以進一步設定。

    clip_image004

    7. 將以下的文字存成一個bat檔,讓登入Terminal Server的user派送自動去執行的話,確定IEESC殘留的機碼被刪除成功。

    reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap" /v IEHarden /f

    8. 只要上述的policy 生效,IEESC會被移除,信任網站即可以成功寫入Terminal Server上。