Resolve excel automation/VBScript fails on Windows Server 2008 R2 in Sagent Data Flow

Product Feature: Transforms general
Operating System: Windows Server 2008 R2


Problem in reading from an Excel file with VBScript after upgrading from Sagent Version.
Source: 'Microsoft Office Excel'
Line: 38 Char: 3
Error: 0 'Microsoft Office Excel can not access the file' L: \ Data \ SAP_HR \ Hours \ STD_11_11.xls'. This can have several reasons:

• The name of the document or the path does not exist.
• The document is used by another program.
• The name of the workbook to be saved is identical to the name of another document that is write-protected. '
[Sagent error code: VS-0x1, VS-0x1]
{SADCAGNT.EXE - 00005A5B - 25.09.2012 13: 45: 10,901}

Error while ending the execution for the step 'VB: current STD_mm_jj'
[Sagent error code: DC - 0x1, DC - 0x83]
{SADCAGNT.EXE - 00005A5E - 25.09.2012 13: 45: 10,916}



The issue occurs when creating Excel object under VB Script trandorm under Sagent plan.
The cause of the issue is as follows:
Even though the script or program is executing under a user account, when Excel is launched through COM automation it is executed under the Local System user identity. This identity does not have a user profile, and this causes Excel to fail because it is designed to assume that it is running in an interactive user session.


UPDATED: September 20, 2017
If the script is written using VBScript, JScript, or another Windows Scripting Host language, create the folder "C:\Windows\System32\config\systemprofile\Desktop". Do this regardless of whether the operating system is 32-bit or 64-bit, because these scripts always run as 32-bit scripts.

For .NET scripts:
On 32-bit platforms, create the folder "C:\Windows\System32\config\systemprofile\Desktop".
On 64-bit platforms, create the folder "C:\Windows\SysWOW64\config\systemprofile\Desktop".

Refer following links: