Avalados por :
#-Begin-----------------------------------------------------------------
#-Sub Main------------------------------------------------------------
Function Main() {
[Reflection.Assembly]::LoadWithPartialName("Microsoft.VisualBasic") > $Null
[Reflection.Assembly]::LoadFile($PSScriptRoot + "\SAPFEWSELib.dll") > $Null
$SapGuiAuto = [Microsoft.VisualBasic.Interaction]::GetObject("SAPGUI")
If ($SapGuiAuto -eq $Null) {
Break
}
$Application = $SapGuiAuto.GetType().InvokeMember("GetScriptingEngine",
[System.Reflection.Bindingflags]::InvokeMethod,
$null, $SapGuiAuto, $null, $null, $null, $null)
[SAPFEWSELib.GuiApplication]$Application =
[System.Runtime.InteropServices.Marshal]::CreateWrapperOfType($Application,
[SAPFEWSELib.GuiApplicationClass])
If ($Application -eq $Null) {
Break
}
$Connection = $Application.Children.Item(1)
[SAPFEWSELib.GuiConnectionClass]$Connection =
[System.Runtime.InteropServices.Marshal]::CreateWrapperOfType($Connection,
[SAPFEWSELib.GuiConnectionClass])
If ($Connection -eq $Null) {
contacto@primeinstitute.com
(+51) 1641 9379
(+57) 1489 6964
© 2024 Copyright. Todos los derechos reservados.
Desarrollado por Prime Institute