次の方法で共有


SetWindowsServiceIdentity メソッド (WMI MSReportServer_ConfigurationSetting)

レポート サーバーの Windows サービスを指定された Windows ユーザーとして実行させ、レポート サーバーを運用できるファイル システム権限をこのアカウントに与えます。

構文

Public Sub SetWindowsServiceIdentity(UseBuiltInAccount as Boolean, _
    Account as String, Password as String, ByRef HRESULT as Int32)
public void SetWindowsServiceIdentity(boolean UseBuiltInAccount, 
    string Account, string Password, out Int32 HRESULT);

パラメーター

  • UseBuiltInAccount
    指定したアカウントが組み込み Windows アカウントであるかどうかを示します。

  • Account
    Windows サービスの実行に使用する "DOMAIN\alias" 形式の Windows アカウント。

  • Password
    アカウントのパスワード。

  • HRESULT
    [out] 呼び出しの成功または失敗を示す値。

戻り値

メソッド呼び出しの成功または失敗を示す HRESULT を返します。 値 0 は、メソッド呼び出しが成功したことを示します。 0 以外の値は、エラーが発生したことを示します。

説明

UseBuiltInAccount パラメーターを true に設定しており、レポート サーバーが Microsoft Windows 2000 または Windows XP で実行されている場合、Name、Domain、および Password の各パラメーターの値は無視され、ローカル システム アカウントが使用されます。

UseBuiltInAccount パラメーターを true に設定しており、レポート サーバーが Windows Server 2003 で実行されている場合、Domain および Password プロパティは無視され、名前フィールドには "Builtin\NetworkService"、"Builtin\System"、または "Builtin\LocalService" を指定する必要があります。

SetWindowsServiceIdentity メソッドはレポート サーバーのインストール ディレクトリのファイルおよびフォルダーに対するファイル権限を設定します。

Account パラメーターに指定するアカウントには Windows の LogonAsService 権限が必要です。 このメソッドは、指定されたアカウントにこの権限を与えます。

要件

名前空間 : root\Microsoft\SqlServer\ReportServer\<InstanceName>\v11\Admin

プラットフォーム : Windows Server 2003 Datacenter Edition、Windows Server 2003 Enterprise Edition、Windows Server 2003 Standard Edition、Windows Vista、Windows XP Professional Service Pack 2 (SP2) または Service Pack 1 (SP1)、および Windows 2000 (すべてのバージョン)

関連項目

参照

MSReportServer_ConfigurationSetting メンバー