SAP Knowledge Base Article - Preview

2561462 - Some variable like %ProgramData% does not work in script in installation server

Symptom

The variable %ProgramData% can't be resolved and recognized as "C:\ProgramData".

E.g. File "test.txt" can be copied from C:\test\ to C:\ProgramData\ folder with below script:
--------------------------------
strSrcFile = NwEngine.Variables.ResolveString("C:\test\test.txt")
strDstFile = NwEngine.Variables.ResolveString("C:\ProgramData\SAP\test.txt")
NwEngine.Shell.CopyFile strSrcFile, strDstFile
--------------------------------

But the file "test.txt" can't be copied from C:\test\ to C:\ProgramData\ folder with below script:
-----------------------------
strSrcFile = NwEngine.Variables.ResolveString("C:\test\test.txt")
strDstFile = NwEngine.Variables.ResolveString("%ProgramData%\SAP\test.txt")
NwEngine.Shell.CopyFile strSrcFile, strDstFile
-----------------------------


Read more...

Environment

SAPGUI release independent

Keywords

SAP GUI for Windows; SAPGUI; SAP GUI; ProgramData; %ProgramData%; ALLUSERSPROFILE; variable; Script; SAPGUI Script; Installation server; C:\ProgramData; ResolveString; NwEngine.Variables.ResolveString. , KBA , BC-FES-INS , Frontend Installation , BC-FES-GUI , SAP GUI for Windows , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.