How to execute SAPGUI script from the command line?

I have created a script and would like to execute it from the command line. There must be some flag that goes with SAPGUI.EXE. Any help appreciated.
Thanks,
Jeff

Hi Jeff,
the best way to do this is to run the script using the Windows Script Host, for example like this:
cscript myscript.vbs
This will execute the script which in turn can access SAP GUI. You may however have to make sure the script attaches to the correct session.
Best regards,
Christian

Similar Messages

  • How to execute OMB scripts from the command prompt of OS

    Hi
    I want to deploy the mapping from one environment to other environment using OMB script language. But I dont want to run the OMB scripts from OMB plus COmmand prompt?
    All I need is , is there any way/scripts to access OMB command prompt from the general command prompt of the OS Machine?
    or Can I call this OMB command from java program but not JDeveloper?
    It would be a great help for me by sharing your knowledge?
    Cheers
    Pradeep

    This way from MS-DOS:
    set ORACLE_HOME=c:\oracle\OWB10gR2 (change to your Oracle Home)
    call C:\oracle\OWB10gR2\owb\bin\win32\OMBPlus.bat C:\...\my_script.tcl > C:\...\my_log.log
    my_script.tcl contains something like this:
    set OMBLOG "c:\\...\\some_kind_of.log"
    # Disconn just in case you have called a previous script
    OMBDISC
    source C:\\...\\script_with_omb_procedures.tcl
    OMBCC my_project
    OMBCONNECT CONTROL_CENTER "USER/PASSWORD@HOST:PORT:SERVICE" USE REPOSITORY 'MY_REPOSITORY_OWNER'
    OMBDCC
    DEFAULT_CONTROL_CENTER MY_CONTROL_CENTER
    proc_from_script_with_omb_procedures
    exit
    Hope this helps you to begin.
    Instead of using script_with_omb_procedures.tcl you can have your procedures directly inside my_script.tcl, but I like using a script apart to reuse my procedures.

  • How to execute sql script from linux command line

    Hello everyone !
    Just short question. On my server I must install script in crontab which will eexecute some sql statements.
    How can I write command which will execute script from file without asking about password ?
    sqlplus user/pass ... and then what ?
    thanks
    dlugasx

    user10064952 wrote:
    Just short question. On my server I must install script in crontab which will eexecute some sql statements.
    How can I write command which will execute script from file without asking about password ?Crontab does not run your local shell profile - which means no valid Oracle environment for SQL*Plus to execute in.
    On newer cron versions, you can add an environment to the crontab file itself that needs to be set before executing the scheduled command.
    Whatever method - make sure you have ORACLE_HOME set, that the path includes ORACLE_HOME/bin, that ORACLE_SID is set (if not using a TNS alias) and so on.
    But I agree with Sybrand... crontab is not the best place for running SQL or PL/SQL code. That should reside in the database as named code (e.g. stored procs) and be executed via DBMS_JOB or DBMS_SCHEDULE.
    Less moving parts that way. No external dependancies. And will work on any Oracle server, irrespective of the o/s used and whether or not the relevant o/s user has batch/cron/etc privs to do the deed.

  • Running a function from a powershell script from the command line

    Rather than creating several scripts each with one function, I have one script with has several functions.... I would like to call the script and select the function i want to use from the command line.
    so far, if i change directory to that of the script i can call the function by doing this:
    cd c:\myscripts
    . .\mytestscript.ps1; myfunction
    this works fine.... i have also tried, what I would like to achieve is calling it like this
    c:\myscripts\mytestscript.ps1; myfunction
    however, i am trying to run this as part of an MDT task sequence, my command line looks like this and using the ; myfunction at the end doesn't work.
    powershell.exe -ExecutionPolicy Bypass %SCRIPTROOT%\CustomScripts\mytestscript.ps1; myfunction
    how can i adapt my command line so that it will successfully call the function within my script?
    thanks
    Steve

    Rename the file from ps1 to psm1 and create a powershell module that contain multiple functions. A module will autoload like the built-in modules.
    Placement of the psm1 file is important for Powershell to find and autoload it.
    The file name and folder name must be the same, for example MyModule.psm1 should be in the folder:
    user\documents\windowspowershell\modules\mymodule
    Windows PowerShell Modules
    http://msdn.microsoft.com/en-us/library/dd878324(v=vs.85).aspx
    PS C:\> get-childItem env:PSModulePath
    Name Value
    PSModulePath C:\Users\User\Documents\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules\

  • How to create an alias from the command line

    Hi
    I would like to know how to create an alias (for a file, not a command) from the command line. I don't want to use the ln command, as an alias has more interesting features than soft/hard links... Is there an Apple specific tool to do this?
    Thanks
    -Jerome
      Mac OS X (10.4.10)  

    The only straightforward way that I am aware of for creating a "Finder" alias from the command line is using AppleScript via 'osascript'. Of course, it's not really a command line solution since the "Finder" has to be running. Anyway, something along the lines of:
    <pre style="overflow:auto; padding: 5px; width: 500px ; font-size: 10px; border:1">osascript -e 'tell application "Finder" to make alias file to POSIX file "/full/path/to/file" at POSIX file "/full/path/to/folder"'</pre>

  • Calling an ExtendScript script from the command line

    Hi! I can call an ExtendScript script from a command line just by using its path, but is there a way to pass parameters to the script? Thanks. -Rick

    Hi Rick,
    Well, a scan of the documentation certainly provides no evidence of this capability. If it exists, someone else will have to fill us in.
    I did have an idea, although it's a bit of a roundabout approach. A windows batch file can accept parameters and can write a text file. So, maybe Mif2Go can call a batch file instead that writes the folder to some file, then runs the script that reads the file. Although, I'm not familiar with a command line call to ES, so I'm not sure that a batch file can launch an ES script too. If not, can Mif2Go make more than one command line call?
    Russ

  • How to burn CD's from the command line in 2009?

    I've always managed to burn CDs and DVDs from the command line but I haven't done it in a long time. cdrecord wasn't working as root and I noticed it was just a symlink pointing to wodim.
    I tried the following command as root in a directory with some wav files:
    # cdrecord -dev=/dev/sr0 -driveropts=burnfree -audio -pad *.wav
    Which gives me:
    Mar 6 08:43:18 wilco ata7.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
    Mar 6 08:43:18 wilco ata7.00: cmd a0/00:00:00:00:00/00:00:00:00:00/a0 tag 0
    Mar 6 08:43:18 wilco cdb 35 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    Mar 6 08:43:18 wilco res 40/00:02:00:0c:00/00:00:00:00:00/a0 Emask 0x4 (timeout)
    Mar 6 08:43:18 wilco ata7.00: status: { DRDY }
    Mar 6 08:43:18 wilco ata7: hard resetting link
    Mar 6 08:43:19 wilco ata7: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
    Mar 6 08:43:19 wilco ata7.00: configured for UDMA/100
    Mar 6 08:43:19 wilco ata7: EH complete
    This worked for me in 2008, so has anything big changed?

    Rasi wrote:
    Wilco wrote:
    Dieter@be wrote:I did not follow the discussion, but I just use wodim as specified on http://wiki.archlinux.org/index.php/CD_Burning_Tips, and that works great for me.
    Hmm strange, I tried the same command as in my first post and it works fine with the real cdrtools but not with wodim (I also tried k3b and that failed too). So I just stick with cdrtools
    Hooray, one more convert
    I haven't really followed the discussion either but why choose an "emulated cdrecord" that doesn't work instead of the real program that works great?

  • How to invoke a servlet from the command line

    Hi,
    I have a process that needs to do something remotely. One of the ideas is to have a servlet on the other side that can do that. So the question is how can I invoke it from my process?
    Thanks,

    First approximation to code:URL remoteTask = new URL("http://yourserver.org/yourservlet");
    InputStream response = remoteTask.openStream();
    // read the servlet's response from that InputStreamYou will find more comprehensive versions of this code if you search the forum.

  • Executing MSI package from the command line

    I am running the following command from DOS (share server) to be install in windows 7 machine
    with the following switch.
    "\\servname\folder\someSetup.exe" /NOREBOOT /PASSIVE /QUIET /CONTROLLERS "servname.domain.dc" /ENABLE_HDX_PORTS /ENABLE_REAL_TIME_TRANSPORT
    I noticed that in the middle of the execution a popup reboot menu appears. How can I suppress the popup menu?
    michael john ocasio

    http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html
    michael john ocasio

  • Is there a way to generate job execution scripts from the command line?

    The customer is planning to change DI production server configuraiton and needs to regenerate job execution scripts for hundreds of jobs. Their question is - instead of going through web admin and doing it one by one, is there a way to run a batch command and generate all jobs with the same job server information from one repository? I looked at the "al_engine" command but didn't find the options to do so. Did I miss something? This is for a DI 11.5.3 on HPUX.
    Thanks,
    Larry

    I also suggested that but the customer was so afraid of messing things up that they wanted to find out if there is another way. Thanks a lot for the confirmation.
    Larry

  • Is there a way to switch between workspaces in Spaces from the command line?  I want to write a script to set up certain applications in certain workspaces (without having to do it manually each time)...

    Is there a way to switch between workspaces in Spaces from the comnand line?  I use several workspaces from Spaces, each workspace having a certain number of fixed applications running.  Rather than set all this up each time I log on, I'd like to write a script from the command line (I use gawk) to automate this. Currently I have a gawk script that, given a directory, opens a few xterms whose working directory is the given directory, and opens "preview" applied to a certain file in that directory.  However, at present I have to manually move an xterm through each workspace and run my gawk script in each workspace (applied to each directory that I'm working on).
    There must be a better way...

    Addendum: Can this be done via:   open -a Spaces --args xxx  , where xxx is some set of arguments (or something like this)?

  • Run javascript (not in a jsx file) from the command line extendscript

    Hi all,
    I was wondering if anyone knew how to run javascript from the command line in Extendscript (meaning Extendscript would be the target application). I know about the -run command line flag in which allows you to run a .jsx script from the command line but what I'm looking for similar syntax to run a script directly without needing to put it in a file. For example I have tried (obviously unsuccessfully):
    C:\Program Files (x86)\Adobe\Adobe ExtendScript Toolkit CC\ExtendScript Toolkit.exe -run "alert('Hello World');"
    Thanks!

    You might be looking for something like this: javascript - Is it possible to execute JSX scripts from outside ExtendScript? - Stack Overflow
    Although that one is about executing JSX files, the solutions given (Applescript as well as COM/VBScript) can be adapted to simply run a javascript code snippet rather than JSX file because the solutions simply call the Adobe app's Applescript/COM API to "execute javascript" (actually execute ExtendScript technically), and in the solution, they using includes to pull in the JSX file. You'd simply replace the include with actual javascript code snippet inserted in.
    Though this would then require you to run a VBScript, Applescript, or other script (that calls the COM/Applescript API) rather than the ESTK command line option.

  • Problem with running a java program from the command line

    I have this code:
    package pkg;
    import jxl.*;
    import java.io.File;
    public class TestClass {
         public static void main(String[] args) {
              try{
                   Workbook book = Workbook.getWorkbook(new File("d:/testWorkspace/excFile.xls"));
                   Sheet sheet = book.getSheet(0);
                   String s=sheet.getCell(4, 2).getContents();
                   System.out.println(s);     
              }catch (Exception e){System.err.println(e);}
    }I've wrote it in Eclipse, added jxl.jar to the buildpath, and it works fine.
    Then I tried to run it from the command line and I did it like this:
    D:\testWorkspace\testProject\bin> java -cp \jxl.jar pkg.TestClassThe result was:
    Exception in thread "main" java.lang.NoClassDefFoundError: pkg/TestClass
    Caused by: java.lang.ClassNotFoundException: pkg.TestClass
    ...but the file TestClass.class DOES exist in the folder d:\testWorkspace\testProject\bin\pkg\ and the file jxl.jar IS on the root of drive D (like I already wrote, it worked fine inside the Eclipse).
    So, my question is: How to run this code from the command line?
    I have no idea what went wrong.
    Can someone help me, please?

    The current directory is not implied in the classpath.
    D:\testWorkspace\testProject\bin> java -cp .;d:\ pkg.TestClassor
    D:\testWorkspace\testProject\bin> java -cp .;d:\jxl.jar pkg.TestClassI always forget which is right since I never work with jars...

  • Is it possible to execute SAPGUI scripts from java program?

    Hi everyone..
         I need to develop an java applications that executes the SAPGUI script or any technique that execute set of transaction as client.
         Is it possible to execute SAPGUI scripts from java program? if so, how it can be achieved? is there any other technique to achieve above mention scenario?.
         it will be more helpful, if docs related to that are shared..
         Thanks in advance

    Oh, bummer. Would be much more convenient if I could just use iTunes for everything. Can't stand WMP. I wonder if WinAmp might be a good compromise?
    Thanks for this answer . . .
    Sharon

  • How to execute sql scripts from Powershell across multiple databases

    Re: How to execute sql scripts from Powershell across multiple databases
    I have an tsql script that I want to run across a list of databases. How is the best way to do this in Powershell? Thanks.

    My example below, using just the SMO and not breaking up the batches, the ExecuteWithResults give the following error when the .sql file contains a GO. My script files are as simple as a DECLARE and then a GO.
    WARNING: SQL Script Failed
    The object of type "Microsoft.PowerShell.Commands.Internal.Format.FormatStartData" is not valid or not in the correct sequence. This is likely caused by a user-specified "format-list" comm
    and which is conflicting with the default formatting.
        + CategoryInfo          : InvalidData: (:) [out-lineoutput], InvalidOperationException
        + FullyQualifiedErrorId : ConsoleLineOutputOutOfSequencePacket,Microsoft.PowerShell.Commands.OutLineOutputCommand
    Also, when executing from the ISE, is there a way to force the ISE to release the files. I am having to close the ISE and reopen my script every time I want to make a testing change to the .sql file.
    [reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo")
    $scriptspath = "C:\temp\psExecuteSQLScripts\scripts"
    $SQLServer = "fidevc10"
    $SQLDB = "Bank03"
    # Create SMO Server Object
    $Server = New-Object ('Microsoft.SQLServer.Management.Smo.Server') $SQLServer
    # Get SMO DB Object
    $db = $Server.Databases[$SQLDB]
    # Load All SQL Scripts in Directory
    $scripts = Get-ChildItem -Path (Join-Path $scriptspath "*") -Include "*.sql" -Recurse
    # Loop through each script and execute
    foreach ($SQLScript in $scripts)
    $fullpath = $SQLScript.FullName
    # Read the Script File into Powershell Memory
    $reader = New-Object System.IO.StreamReader($fullpath)
    $script = $reader.ReadToEnd()
    # Execute SQL
    Write-Host "Executing $SQLScript on $SQLDB...."
    try
    $ds = $db.ExecuteWithResults($script)
    Foreach ($t in $ds.Tables)
    Foreach ($r in $t.Rows)
    Foreach ($c in $t.Columns)
    Write-Host $c.ColumnName "=" $r.Item($c)
    Write-Host "Complete"
    catch [Exception]
    Write-Warning "SQL Script Failed"
    echo $_.Exception|format-list -force
    Write-Host " " -BackgroundColor DarkCyan

Maybe you are looking for

  • Need fix for microsoft visual C++ runtime library error

    everytime i want to open windows explorer, there will be a pop up saying"this application has requested runtime to terminate it in an unusual way. please contact the application's support team for more information." then when i press OK, it will have

  • Reader 10.1.1 Protected Mode

    Hello I am deploying Reader 10.1.1, but on some computers protected mode is blocking PDF files from being opened from a network drive. Is it possible to configure protected mode for a safe domain. The solutions I have so far, disable protected mode,

  • Problem formatting text

    I have this problem in formatting (I think the correct word is formatting) the text in a table of contents I'm making. What I want to do is the following: True out the document I have got these headers that look like this: 1.2.3. Dit - Is - Text Say

  • Turn off Ken Burns Effect?

    Hi - does anyone know how to turn off the ken burns effect? i see the option to do so in project preferences -- but it is only applying to the first photo in the series and I'd like to shut it off for all... can anyone help? thanks!!! rachel

  • Displaying types in SOAP envelope

    TCP tunnel displays my SOAP body as follows: <soapenv:Body><AddUpdate xmlns="uri:webservice.thenet.software.com"> <TheNetObject> <Reference xmlns="uri:thenet.software.com"><ID>BPELTest</ID></Reference> <AccountName xmlns="uri:thenet.software.com">BPE