on 04-26-2018 7:15 PM
I'm triyng to write a VBScritp that opens a SAP session, with Single-Sign On capability.
I've already found some information about this topic, or similar ones, here and on other sites, but none of them suit my requirement..
This is what I have so far, taken from link:
But an error happens (please see attached file).error.png.
Can anybody help me?
Option Explicit
Dim WSHShell, SAPGUIPath, SID, InstanceNo, WinTitle
Set WSHShell = WScript.CreateObject("WScript.Shell")
If IsObject(WSHShell) Then
SAPGUIPath = "C:\Program Files (x86)\SAP\FrontEnd\SAPgui\"
SID = "PRD"
InstanceNo = "00"
WSHShell.Exec SAPGUIPath & "sapgui.exe " & SID & " " & _
InstanceNo
WinTitle = "SAP"
While Not WSHShell.AppActivate(WinTitle)
WScript.Sleep 250
Wend
Set WSHShell = Nothing
End If
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.