From 6c92257d6e4bc59505528f380bf1bbbcd2640f66 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Wed, 9 Jan 2013 20:49:13 +0000 Subject: [PATCH] =?UTF-8?q?Preizkusil=20sem=20=C5=A1e=20delovanje=20na=20W?= =?UTF-8?q?indows=20XP.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MSICALib/MSITSCAOp.cpp | 9 +++++---- MSICALib/StdAfx.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/MSICALib/MSITSCAOp.cpp b/MSICALib/MSITSCAOp.cpp index b30a6ae..2f38bab 100644 --- a/MSICALib/MSITSCAOp.cpp +++ b/MSICALib/MSITSCAOp.cpp @@ -511,10 +511,11 @@ HRESULT CMSITSCAOpTaskCreate::Execute(CMSITSCASession *pSession) hr = pTask->SetFlags (m_dwFlags ); if (FAILED(hr)) goto finish; hr = pTask->SetPriority (m_dwPriority ); if (FAILED(hr)) goto finish; - if (!m_sAccountName.IsEmpty()) { - hr = pTask->SetAccountInformation(m_sAccountName, m_sPassword.IsEmpty() ? NULL : m_sPassword); - if (FAILED(hr)) goto finish; - } + // Set task credentials. + hr = m_sAccountName.IsEmpty() ? + pTask->SetAccountInformation(L"", NULL ) : + pTask->SetAccountInformation(m_sAccountName, m_sPassword); + if (FAILED(hr)) goto finish; hr = pTask->SetIdleWait (m_wIdleMinutes, m_wDeadlineMinutes); if (FAILED(hr)) goto finish; hr = pTask->SetMaxRunTime(m_dwMaxRuntimeMS ); if (FAILED(hr)) goto finish; diff --git a/MSICALib/StdAfx.h b/MSICALib/StdAfx.h index a6de284..7c90653 100644 --- a/MSICALib/StdAfx.h +++ b/MSICALib/StdAfx.h @@ -19,9 +19,9 @@ #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #define _WIN32_WINNT 0x0501 // Include Windows XP symbols #define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h +//#define ASSERT_TO_DEBUG // Enable false asserts to provide opportunity to attach debuger #ifdef _WINDLL #define MSITSCA_DLL // This is a DLL -//#ifdef ASSERT_TO_DEBUG // Enable false asserts to provide opportunity to attach debuger #endif #define _ATL_APARTMENT_THREADED #define _ATL_NO_AUTOMATIC_NAMESPACE