SetDefaultPrinter 在 Windows 中設定錯誤的預設印表機

套用到
Windows 8.1 Enterprise Windows 8.1 Pro Windows 8.1 Windows RT 8.1 Windows Server 2012 R2 Datacenter Windows Server 2012 R2 Essentials Windows Server 2012 R2 Foundation Windows Server 2012 R2 Standard Windows 7 Service Pack 1 Windows 7 Enterprise Windows 7 Home Basic Windows 7 Home Premium Windows 7 Professional Windows 7 Ultimate Windows Server 2008 R2 Service Pack 1 Windows Server 2008 R2 Datacenter Windows Server 2008 R2 Enterprise Windows Server 2008 R2 Standard Windows Server 2008 R2 for Itanium-Based Systems

症狀

假設你的電腦運行的是Windows 8.1,Windows RT 8.1、Windows Server 2012 R2、Windows 7 服務包 1 (SP1) ,或 Windows Server 2008 R2 SP1。 當電腦上的服務冒充使用者,然後呼叫 SetDefaultPrinter 設定預設印表機時,你會發現預設印表機被設定成錯誤的印表機,而非預期的印表機。

原因

此問題發生是因為冒充使用者呼叫 SetDefaultPrinter 設定預設印表機時,某些登錄檔值可能設定錯誤的使用者設定檔。 這些數值會設定在服務帳號的個人檔案中,而非冒充使用者的個人資料中。

解決方式

要解決 Windows RT 8.1、Windows 8.1 或 Windows Server 2012 R2 中的問題,請安裝更新整合 2955164。

要在 Windows 7 SP1 或 Windows Server 2008 R2 SP1 中解決此問題,請安裝本文所述的熱修補程式。

Windows RT 8.1、Windows 8.1 及 Windows Server 2012 R2 的更新資訊

欲了解更多如何取得此更新整合套件的資訊,請點擊以下文章編號以瀏覽 Microsoft 知識庫中的文章:

2955164 Windows RT 8.1、Windows 8.1 及 Windows Server 2012 R2 更新整合:2014 年 5 月

Hotfix 資訊

Microsoft 已提供支援的熱修補程式。 不過,這個熱修正僅針對本文所述的問題進行修正。 只對遇到此問題的系統套用熱修補。

如果熱修補程式可供下載,知識庫文章頂部有一個「熱修補程式下載可用」區塊。 若此區塊未出現,請向 Microsoft 客服與支援部門提交申請以取得熱修正。

注意:如果發生其他問題或需要排除故障,您可能需要另行申請服務。 一般的支援費用將適用於不符合本次熱修正範圍的其他支援問題與問題。 欲查詢完整的 Microsoft 客服與支援電話號碼清單,或建立獨立服務請求,請造訪以下 Microsoft 網站:

http://support.microsoft.com/contactus/?ws=support 注意「熱修正程式下載可下載」表單顯示該熱修正可用的語言。 如果你看不到你的語言,那是因為該語言沒有熱修正。

先決條件

要套用此熱修補,您必須執行 Windows 7 SP1 或 Windows Server 2008 R2 SP1。 如需有關如何取得 Windows 7 或 Windows Server 2008 R2 Service Pack 的詳細資訊,請按下面的文章編號,檢視「Microsoft 知識庫」中的文章:

976932 關於 Windows 7 及 2008 R2 服務包 1 Windows Server資訊

登錄資訊

要使用這個套件的更新,您不需要對登錄進行任何變更。

重新啟動需求

套用此更新之後,無需重新啟動電腦。

更新取代資訊

這個更新不會取代任何先前發行的更新。

檔案資訊

此更新的全域版本會安裝具有下表中所列屬性的檔案。 這些檔案的日期與時間是以國際標準時間 (UTC) 表示。 本機電腦上這些檔案的日期與時間,是以您當地的時間和目前的日光節約時間 (DST) 的時差來顯示。 此外,執行某些檔案操作時,日期和時間也可能改變

Windows 7 和 Windows Server 2008 R2 檔案資訊注意事項
重要 Windows 7 hotfixes 和 Windows Server 2008 R2 的 hotfixes 隨附於相同的套件中。 但是,Hotfix 要求頁面上的 Hotfix 會列在各自的作業系統中。 如果要請求適用於其中一或兩個作業系統的 Hotfix 套件,請選取頁面上列於「Windows 7/Windows Server 2008 R2」下方的 Hotfix。 請一律參照文章中的<適用於>一節,以判定每個 Hotfix 適用的確切作業系統。

  • 套用至特定產品、里程碑 (RTM、SPn) 及服務分支 (LDR、GDR) 的檔案可透過檢視下列表格中所顯示的檔案版本號碼來識別:

    版本 產品 里程碑 服務分支
    6.1.760
    1.22xxx
    Windows 7 和 Windows Server 2008 R2 SP1 LDR
  • GDR 服務分支只包含針對普遍的嚴重問題所發行的通用修正程式。 LDR 服務分支除了通用修正程式之外,還包含 Hotfix。

  • 每個環境安裝的 MANIFEST 檔 (.manifest) 和 MUM 檔 (.mum) 皆會分別列在「Windows 7 和 Windows Server 2008 R2 的其他檔案資訊」部分。 對於維持已更新元件的狀態,MUM 及 MANIFEST 檔案及相關的安全性目錄 (.cat) 檔案皆很重要。 屬性未列出的安全性目錄檔案是以 Microsoft 數位簽章簽署。

適用於所有支援的 x86 版本 Windows 7 SP1

檔案名稱 檔案版本 檔案大小 日期 時間 平台
Winspool.drv 6.1.7601.22586 320,512 2014年1月31日 02:01 不適用

針對所有支援的 x64 版本的 Windows 7 SP1 及 Windows Server 2008 R2 SP1

檔案名稱 檔案版本 檔案大小 日期 時間 平台
Winspool.drv 6.1.7601.22586 442,880 2014年1月31日 02:42 不適用
Winspool.drv 6.1.7601.22586 320,512 2014年1月31日 02:01 不適用

適用於所有支援的基於 IA64 的 Windows 7 SP1 及 Windows Server 2008 R2 SP1 版本

檔案名稱 檔案版本 檔案大小 日期 時間 平台
Winspool.drv 6.1.7601.22586 863,744 2014年1月31日 01:47 不適用
Winspool.drv 6.1.7601.22586 320,512 2014年1月31日 02:01 不適用

      

狀態

Microsoft 已確認這是「適用對象」一節中列出的 Microsoft 產品中的問題。

更多資訊

如需有關軟體更新術語的詳細資訊,請按一下下面的文章編號,檢視「Microsoft 知識庫」中的文章:

824684 描述用於描述Microsoft軟體更新的標準術語

附加檔案資訊

Windows 7 與 Windows Server 2008 R2 的額外檔案資訊

所有支援的 x86 Windows 7 SP1 版本的額外檔案

檔案屬性
檔案名稱 X86_b9be03775b174dcbd9a357e88c5df192_31bf3856ad364e35_6.1.7601.22586_none_d4e57e451da08e94.manifest
檔案版本 不適用
檔案大小 711
日期 (UTC) 2014年1月31日
時間 (UTC) 06:19
平台 不適用
檔案名稱 X86_microsoft-windows-p..ting-spooler-client_31bf3856ad364e35_6.1.7601.22586_none_9575354790449c1a.manifest
檔案版本 不適用
檔案大小 2,770
日期 (UTC) 2014年1月31日
時間 (UTC) 02:34
平台 不適用

所有支援的 x64 版本 Windows 7 SP1 及 Windows Server 2008 R2 SP1 的額外檔案

檔案屬性
檔案名稱 Amd64_2f751eea09800b0fdfaa3a19b2746660_31bf3856ad364e35_6.1.7601.22586_none_ed2edb63ccede8e3.manifest
檔案版本 不適用
檔案大小 715
日期 (UTC) 2014年1月31日
時間 (UTC) 06:19
平台 不適用
檔案名稱 Amd64_b9be03775b174dcbd9a357e88c5df192_31bf3856ad364e35_6.1.7601.22586_none_310419c8d5fdffca.manifest
檔案版本 不適用
檔案大小 713
日期 (UTC) 2014年1月31日
時間 (UTC) 06:19
平台 不適用
檔案名稱 Amd64_e54176687630f48002d388b399aef792_31bf3856ad364e35_6.1.7601.22586_none_a41deea634a8b241.manifest
檔案版本 不適用
檔案大小 1,070
日期 (UTC) 2014年1月31日
時間 (UTC) 06:19
平台 不適用
檔案名稱 Amd64_microsoft-windows-p..ting-spooler-client_31bf3856ad364e35_6.1.7601.22586_none_f193d0cb48a20d50.manifest
檔案版本 不適用
檔案大小 2,774
日期 (UTC) 2014年1月31日
時間 (UTC) 03:12
平台 不適用
檔案名稱 X86_microsoft-windows-p..ting-spooler-client_31bf3856ad364e35_6.1.7601.22586_none_9575354790449c1a.manifest
檔案版本 不適用
檔案大小 2,770
日期 (UTC) 2014年1月31日
時間 (UTC) 02:34
平台 不適用

所有支援的 IA64 基礎版本 Windows 7 SP1 及 Windows Server 2008 R2 SP1 的額外檔案

檔案屬性
檔案名稱 Ia64_6d10e03d1e263fd57ee926acb9dc5d55_31bf3856ad364e35_6.1.7601.22586_none_72a696281488ce23.manifest
檔案版本 不適用
檔案大小 1,068
日期 (UTC) 2014年1月31日
時間 (UTC) 06:19
平台 不適用
檔案名稱 Ia64_microsoft-windows-p..ting-spooler-client_31bf3856ad364e35_6.1.7601.22586_none_9576d93d9042a516.manifest
檔案版本 不適用
檔案大小 2,772
日期 (UTC) 2014年1月31日
時間 (UTC) 02:18
平台 不適用
檔案名稱 X86_microsoft-windows-p..ting-spooler-client_31bf3856ad364e35_6.1.7601.22586_none_9575354790449c1a.manifest
檔案版本 不適用
檔案大小 2,770
日期 (UTC) 2014年1月31日
時間 (UTC) 02:34
平台 不適用