on 11-19-2013 10:37 AM
Hi Experts
We have created SAP Frontend installation server and to copy to logon pad information i have written VBScripts and being execute on event after the installation.
"Set objShell = CreateObject("WScript.Shell")
strUserProfile = objShell.ExpandEnvironmentStrings("%appdata%")
strDstFolder = "%strUserProfile%\SAP"
NwEngine.Context.Log.Write "Your custom statement goes here. %strUserProfile%"
NwEngine.Shell.CreateDirectory strDstFolder
strSrcFolder = NwEngine.Variables.ResolveString("%SapSrcDir%\CustomerFiles\Common")
strDstFolder = "%APPDATA%\SAP"
NwEngine.Shell.CopyDirectoryEx strSrcFolder, strDstFolder, vbTrue
"
When this script run on client machine this does not resolve the environment variable values like %appdata%, Can you help me what is the problem with it.
Error logs from the client installation for the script.
"
03:21:47 NwSapsAtlC 1 Executing Scripting Event...
03:21:47 NwSapsAtlC 1 Your custom statement goes here. %strUserProfile%
03:21:47 NwSapsEngn 1E Shell CreateDirectory failed: WinAPI::createDirectory(\\servername\SAPGUIINSSVR\Setup\%strUserProfile%) failed. Error message: Access is denied. Error code 0x00000005 (5).
03:21:47 NwSapsAtlC 1E Microsoft VBScript runtime error: Error message: Unknown error 0x800A0046. Error code 0x800a0046.
Permission denied (Line 9, Col. 1)
The setup script contains the error listed above. Please contact your system administrator and provide this information, for example by sending him a screenshot of this message box (Press Alt+PrtScrn to create the screenshot and copy it to the clipboard).
03:21:47 NwSapsAtlC 1E Failed to run script:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
1: Set objShell = CreateObject("WScript.Shell")
2:
3: strUserProfile = objShell.ExpandEnvironmentStrings("%appdata%")
4:
5: strDstFolder = "%strUserProfile%\SAP"
6:
7: NwEngine.Context.Log.Write "Your custom statement goes here. %strUserProfile%"
8:
9: NwEngine.Shell.CreateDirectory strDstFolder
10:
11: strSrcFolder = NwEngine.Variables.ResolveString("%SapSrcDir%\CustomerFiles\Common")
12:
13: strDstFolder = "%APPDATA%\SAP"
14:
15: NwEngine.Shell.CopyDirectoryEx strSrcFolder, strDstFolder, vbTrue
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
Error message: Unknown error 0x80020101. Error code 0x80020101.
"
Thanks & Regards
Gajanand Gupta
I just had a look at some of my scripts and the only difference I figured out is, that there is a blank after the left parenthesis, e.g.
strSrcFolder = NwEngine.Variables.ResolveString( "%SapSrcDir%\CustomerFiles\Common" )
Any further differences are not made. Do you run the installer with administrative priviledges?
Hope this helps,
Jann
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.