Invoke command line from remote computer

Hi everyone, I'm new for abap, I have a problem need to be solved. the problem can be describe like this:
I have a text file ("abc.txt" for example) from an application server. I need to upload that file to another Win 32 computer, which already has a program "PGP Command Line". From application server, I need to call a command to encrypt abc.txt file. THe problem is that I don't know how to invoke a command of Win32 server from my computer. I think 'SXPG COMMAND EXECUTE' can not help much because it cannot run command from remote server.
Anyone have any idea?
Thank you in advance.
Regrad,
Long Le Hoang

Sure, using the exec method in the class Runtime. You have to be careful with it though...
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

Similar Messages

  • Executing powershell script from remote computer using RSAT

    Hi.
    I want to execute powershell script on AD server from remote computer (in the same domain). I installed and tested RSAT - it is working fine. But i cant execute PS from c# code.
    ps.Commands.AddCommand("Import-Module").AddArgument("ActiveDirectory");
    ps.Invoke();
    ps.Commands.AddCommand("Get-ADOrganizationalUnit -Filter 'Name -like \"*\"'");
    var res = ps.Invoke();
     And i get exception:
    An unhandled exception of type 'System.Management.Automation.CommandNotFoundException' occurred in System.Management.Automation.dll
    Additional information: The term 'Get-SBNamespace' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

    Hi
    CapitanPlanet
    For the
    CommandNotFoundException, it means the command cannot be found.
    On the other hand, your issue is about the PowerShell, if you still have the issue, I suggest that you should post it in the
    PowerShell forum for efficient response.
    Here are some useful information, please check
      Powershell
    commands from C# not working (System.Management.Automation.CommandNotFoundException)
    Powershell, Service Bus For Windows Server Programmatically: Command found, module could not be loaded
    https://msdn.microsoft.com/en-us/library/dn282152.aspx
    Best regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Execute command line from Java

    I have an easy one for you!
    I would like to know how I can execute a command line from my java code.
    The only thing I want to do is to launch a html page with the default browser in my computer when I press one button of my java application but I dont know wich class I should use to do it. My application will already know what is the file name.
    Thank for your help
    Eric

    Javaworld has some source code that does this:
    http://www.javaworld.com/javaworld/javatips/jw-javatip66.html

  • How to execute unix command line from cocoa?

    how to execute unix command line from cocoa?
    for example, if I want to call "ping" from cocoa, how should I do it? and how can I obtain the return value?
    thank you.
    Power G5 Quad Mac OS X (10.4.3)

    The following article may also help:
    http://cocoadevcentral.com/articles/000025.php
    Mihalis.
    Dual G5 @ 2GHz   Mac OS X (10.4.6)  

  • Command line from ExtendScript

    I would like to call a command line from a FrameMaker ExtendScript script. Is this possible? Any help or pointers will be appreciated. Thanks.
    Rick Quatro

    Hi Rick,
    AFAIK there's no direct way to call a process with parameters by ExtendScript.
    If want to call a process without parameters, you can execute this file with method "execute" with is provided by "File" class .
    If I have to call this process with parameters, I write write a batch file by script and execute this file.
    Bye
    Markus

  • Unable to get command line from client!

    Does anyone know what this means? My G5 shuts itself down and I don't know what is causing it.
    Mac OS X Version 10.4.11 (Build 8S165)
    2009-02-12 11:01:19 -0800
    2009-02-12 11:01:21.760 SystemUIServer[199] lang is:en
    Feb 12 11:01:33 mDNSResponder: NAT Port Mapping (LLQ event port.): timeout
    Feb 12 11:01:37 cups-lpd[221]: Unable to get command line from client!
    Feb 12 11:10:48 Zelle-Olson cups-lpd[233]: Unable to get command line from client!
    Feb 12 11:17:37 cups-lpd[235]: Unable to get command line from client!

    Hello golferky,
    CUPS stands for Common Unix Printing System and is just one of the many background processes that is running on your system and is of no harm. What you are seeing in your message console is your Mac attempting to talk to a printer you have may have had or still have it connected to.
    Here is more information if you want to look into it.
    http://www.cups.org/
    B-rock

  • Execute command lines from Xcelsius 2008

    Hello,
    Is there any possible way to execute command lines from Xcelsius 2008 swf?
    Thank you.

    Hi,
    You cannot call out to command-line from a Flash SWF, it is sandboxed so does not know how to do any of that.
    One (complicated) option would be to write your own app to embed the SWF into, a real app can then call out to do whatever you want, then you just have to get the SWF to communicate with your app using External Interface, it would be a lot of work.
    Regards
    Matt

  • Help Please: How to invoke unix command lines from java?

    I have read past topics. Those are really helpful, but I still haven't got my job done. I tried the following:
    String command1 = "ls -la > ls1.txt";
    Runtime.getRuntime().exec(command1);
    String command2 = "tcsh -c ls -la > ls2.txt";
    Runtime.getRuntime().exec(command2);
    String command4 = "cp keywords.txt copyversion1.txt";
    Runtime.getRuntime().exec(command4);
    String command5 = "tcsh -c cp keywords.txt copyversion2.txt";
    Runtime.getRuntime().exec(command5);
    String command6 = "tcsh -c 'cp keywords.txt copyversion3.txt'";
    Runtime.getRuntime().exec(command6);
    Only "command4" works. Any input will be greatly appreciated.

    Thank you very much Gautam. Your solution certainly works. If you don't mind, I would like to ask you (or anybody who is willing to answer) something else. I am trying to run other types of unix command lines as well. I thought that the format you gave would work for everything. But it doesn't seem so:
    String command1[] = {"tcsh", "-c", "ls -la > ls1.txt "}; // this works as you suggested
    Runtime.getRuntime().exec(command1);
    String command12[] = {"tcsh", "-c", "lynx -dump http://www.yahoo.com > webpage.txt"}; //working fine.
    Runtime.getRuntime().exec(command12);
    String command10[] = {"tcsh", "-c", "ngram-count -text keywords.txt -lm LM10 &"}; //doesn't work
    Runtime.getRuntime().exec(command10);
    String command[] = {"tcsh", "-c", "/u/drspeech/sun4/bin/ngram-count -text keywords.txt -lm LM0 &"}; // doesn't work
    Runtime.getRuntime().exec(command);
    String command13[] = {"tcsh", "-c", "ngc -text keywords.txt -lm LM13"}; // doesn't work
    Runtime.getRuntime().exec(command13);
    String command8 = "ngram-count -text keywords.txt -lm LM8 &"; //doesn't work
    Runtime.getRuntime().exec(command8);
    String command9 = "/u/drspeech/sun4/bin/ngram-count -text keywords.txt -lm LM9 &"; //doesn't work
    Runtime.getRuntime().exec(command9);
    I tried "commandd1" and "command12". Those worked fine. No problemo. However, there's someting else I need to get done for my job; that is "command10". But it just didn't work. I thought maybe, it's because "ngram-count" is not part of the standard UNIX commands. So, I thought I might just add another alias for it in the ".cshrc" file and call it "ngc" instead. Then I tried to call the alias "ngc" instead. But it didn't work also. Then I thought, maybe, I should call it by referencing it from its original directory "/u/drspeech/sun4/bin/ngram-count". That didn't work either. I tried a couple of other combinations. None worked. I would really like to see how to solve this.

  • Uninstall software from remote computer

    Hi All,
    I confirmed that windows remote management is enable...
    I wanted to create a script to remove software to one of the machine in AD environment but after run my script is nothing happen...
    My scrip as below:
    Import-Module ActiveDirectory
    $Compt= Read-Host "Please enter the Computer Name/ IP Address that need software uninstall"
    $compt1= Get-ADcomputer -filter 'name -like $compt' | select -expand name
    $compt1
    $soft = Read-Host "Please provide the software name you wanted to uninstall (example: Winzip)"
    $soft2= "*$soft*"
    $soft3= Get-WmiObject -Class win32_product -comp $Compt| Where {$_.Name -like "$soft2"}
    $soft4= $soft3 | FL Name, Vendor,version, LocalPackage
    "Please confirm the software you wanted to uninstall:"
    $soft4
    $confirmed= Read-Host "Please copy (right click -> mark -> enter to copy) and paste the local package to proceed uninstallation"
    $arguments = '/x' + $confirmed + "/passive"
    $uninstall= Invoke-expression "msiexec $arguments"
    Invoke-command -computername $compt1 -scriptblock {$uninstall}
    If I remove last 3 line and replace by below command that it works on my own machine but won't work on other remote machine:
    msiexec /x $confirmed /passive
    Please feel free to contact me at [email protected]

    Use the uninstall method for the Win32_Product object.
    $soft3= Get-WmiObject -Class win32_product -comp $Compt| Where {$_.Name -like "$soft2"}
    $soft3.Uninstall()

  • Get-DfsrBacklog cmdlet doesn't work from remote computer (pssession)

    Hi there!
    I try to manage our Server 2012 R2 boxes from a Windows 7 remote machine using PowerShell. For some reason the cmdlet "Get-DFSRbacklog" seems not working remotly. The same cmdlet work when logging in locally to the server(s) with the
    same credentials. UAC is turned off on the target machines and i have local admin permissions on this servers using my domain account.
    What i do is:
    Enter-PSSession <servername>
    Get-DfsrBacklog -SourceComputerName <servername> -DestinationComputerName <servername>
    Then i receive the following error:
    Get-DfsrBacklog : Could not retrieve the backlog information. Replication group: "*" Replicated folder: "*" Source
    computer: <servername> Destination computer: <servername> Confirm that you are running in an elevated Windows PowerShell
    session and are a member of the local Administrators group on the destination computer. The destination computer must
    also be accessible over the network, and have the DFSR service running. This cmdlet does not support WMI calls for the
    following or earlier operating systems: Windows Server 2012. Details: WinRM cannot process the request. The following
    error with errorcode 0x8009030e occurred while using Kerberos authentication: A specified logon session does not
    exist. It may already have been terminated.
     Possible causes are:
      -The user name or password specified are invalid.
      -Kerberos is used when no authentication method and no user name are specified.
      -Kerberos accepts domain user names, but not local user names.
      -The Service Principal Name (SPN) for the remote computer name and port does not exist.
      -The client and remote computers are in different domains and there is no trust between the two domains.
     After checking for the above issues, try the following:
      -Check the Event Viewer for events related to authentication.
      -Change the authentication method; add the destination computer to the WinRM TrustedHosts configuration setting or
    use HTTPS transport.
     Note that computers in the TrustedHosts list might not be authenticated.
       -For more information about WinRM configuration, run the following command: winrm help config.
        + CategoryInfo          : ProtocolError: (zursf1003:String) [Get-DfsrBacklog], DfsrException
        + FullyQualifiedErrorId : Get-DfsrBacklog.CimException,Microsoft.DistributedFileSystemReplication.Commands.GetDfsr
       BacklogCommand
    Any ideas?

    This article
    suggests that you're logged into your Win7 management machine with local credentials. You should try the Get-DfsrBacklog command with domain credentials:
    Client is in a domain: Attempting to connect to a remote server by using implicit credentials that are the local administrator's credentials on the client. Instead, use domain credentials that are recognized by the domain of the target server, or right-click
    the server entry in the Servers tile, click Manage As, and then specify credentials of an administrator on the target server.
    Sam Boutros, Senior Consultant, Software Logic, KOP, PA http://superwidgets.wordpress.com (Please take a moment to Vote as Helpful and/or Mark as Answer, where applicable) _________________________________________________________________________________
    Powershell: Learn it before it's an emergency http://technet.microsoft.com/en-us/scriptcenter/powershell.aspx http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx

  • JDBC connect from remote computer fails

    Hi all,
    I have successfully installed the XE server and I can connect over JDBC from clients running locally on the machine where the XE server is installed.
    However when I try to connect from a remote computer using the same client I get an error saying: The Network Adapter could not establish the connection
    I can ping the machine with XE installed and all firewalls on the machines are turned off.
    Any ideas on the subject of JDBC remote connect to XE server? Or is it simply that it is not supported?
    Appreciate all the help I can get.
    Thanks,
    /Anders

    On my machine I have the listener bound to local interface.
    Listener.ora has hostname in it, and this is the listener status:
    As status shows the hostname is resolved to localhost, on this machine I am unable (with this configuration) to share the db to other machines (I do not have oracle client on my other pc, but telnet is unable to connect to port 1521).
    Changing hostname to ipaddres solves.
    [andrea@bones ~]$ lsnrctl status
    LSNRCTL for Linux: Version 10.2.0.1.0 - Beta on 15-DEC-2005 21:28:51
    Copyright (c) 1991, 2005, Oracle.  All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=bones)(PORT=1521)))
    STATUS of the LISTENER
    Alias                     LISTENER
    Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Beta
    Start Date                15-DEC-2005 21:28:40
    Uptime                    0 days 0 hr. 0 min. 11 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Default Service           XE
    Listener Parameter File   /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
    Listener Log File         /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=8080))(Presentation=HTTP)(Session=RAW))
    Services Summary...
    Service "PLSExtProc" has 1 instance(s).
      Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "XE" has 1 instance(s).
      Instance "XE", status READY, has 1 handler(s) for this service...
    Service "XEXDB" has 1 instance(s).
      Instance "XE", status READY, has 1 handler(s) for this service...
    Service "XE_XPT" has 1 instance(s).
      Instance "XE", status READY, has 1 handler(s) for this service...
    The command completed successfully
    [andrea@bones ~]$

  • Cannot log into T61 from remote computer with wired network and Windows Explorer.

    Hi,
    I am using a T61 7662-cto with Windows 7 Professional
    When the T61 is connected on the home network with the wired network, I am not able to log into it remotely from another computer. On my second computer, I see the T61 with Windows Explorer but instead of getting the login window, it appears a Network Error with the message:
    “Check the spelling of the name. Otherwise, there might be a problem with your network.” With a error code 0x80070035, “The network path was not found.” I tried the “Diagnose” button but it doesn’t give solution.
    When the T61 is wireless connected, there is no problem. I can access it from my second computer.
    I never have problem to connect to the second computer from the T61 with any connection type . I just updated the Intel Wireless LAN (bg, abg, abgn) for Windows 7 – ThinkPad, with the drivers required but it changes nothing.
    http://www-307.ibm.com/pc/support/site.wss/document.do?sitestyle=lenovo&lndocid=MIGR-73611
    Do you have a hint for this issue why the wired network gives problem?
    Thanks

    Open this post, go to the flagged message. On its right is a button
    to turn off the flag.
    I went to the site. The only problem I had was one has to sign in
    to see anything. Even the main page had a very large ''Please
    Sign In'' covering the window.
    Many site issues can be caused by corrupt cookies or cache.
    * Clear the Cache and
    * Remove Cookies<br> '''''Warning ! ! '' This will log you out of sites you're logged in to.'''
    Type '''about:preferences'''<Enter> in the address bar.
    * '''Cookies;''' Select '''Privacy.''' Under '''History,''' select Firefox will '''Use Custom Settings.''' Press the button on the right side called '''Show Cookies.''' Use the search bar to look for the site. Note; There may be more than one entry. Remove '''All''' of them.
    * '''Cache;''' Select '''Advanced > Network.''' Across from '''Cached Web Content,''' Press '''Clear Now.'''
    If there is still a problem,
    '''[https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode Start Firefox in Safe Mode]''' {web link}
    While you are in safe mode;
    Type '''about:preferences#advanced'''<Enter> in the address bar.
    Under '''Advanced,''' Select '''General.'''
    Look for and turn off '''Use Hardware Acceleration'''.
    Poke around safe web sites. Are there any problems?
    Then restart.

  • Running a report or command line from a dtored procedure

    Is there a way I can call a report to run from a stored
    procedure or execute an os command line to do the same ting from
    a stored procedure?

    hello,
    if you are using the reports-server you can use UTL_HTTP to
    submit an HTTP-request to submit the job.
    regards,
    the oracle reports team --pw                                                                                                                                                                                                                                                                                                                       

  • Run command line from receiver

    Hello,
    I write script to transfer file from our local drive to sFTP server.
    I try to run  the script from Run Operating System Command After Message Processing in CC
    The script not run.
    When I try to run this script from our XI server from CMD the script running.
    I add the script command line:
    "C:\Program Files\WinSCP\WinSCP.exe" /console /script="C:\Program Files\WinSCP\fromnetafim.txt"&"C:\Program Files\WinSCP\script.bat"
    I'll be happy to hear what I need to add to this line to run the script from communication channel.
    Elad

    Hi,
    You just post ur output file in some folder , lets say /usr/sap/sapout/test/.and the shell script in this path /usr/sap/bin/convert.sh.
    Inside the File access parameters put target directory and filename scehme and for shell script give processing parameters as File construction mode , File type and OS Command and use a space after the shell script name and the %F.
    And for input can use it directly.
    Check out these links. First one will help you in acheiving want you want.
    /people/sameer.shadab/blog/2005/09/21/executing-unix-shell-script-using-operating-system-command-in-xi
    /people/michal.krawczyk2/blog/2007/02/08/xipi-command-line-sample-functions
    /people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching
    http://help.sap.com/saphelp_nw70/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
    Also have a look on this thread.
    Re: RUN OPERATING SYSTEM COMMAND BEFORE MESSAGE PROCESING?
    regards
    Aashish Sinha
    PS : reward points if helpful

  • To execute command line from java programmin

    Hi,
    I need to execute a command line like ping command from java applications can any help me on this. Thanks in advance.

    Runtime.exec
    Also read: When Runtime.exec() won't: Navigate yourself around pitfalls related to the Runtime.exec() method

Maybe you are looking for

  • If condition in PLD

    I am trying to get special text to appear on the pick list when the oitm.qrygroup2 field is Yes.  I have 2 operator fields: f_398 is the text field with the special text, link to f_400 f_399 is a database field, table is oitm, field is property 2, re

  • Need help - Moving my Itunes to an external hard drive

    Help! Help! Help! Am tearing my hair out here! I recently got my first Ipod so please excuse if I'm being thick here! Basically, I'm about two thirds of the way downloading my not insignificant CD collection onto my Ipod, which I'm doing via Itunes.

  • Getting Total number of pages in Reports 3.0?

    In the layout model of a report I want to access the value of Total Pages in a format trigger on a repeating frame. You can use srw.get_page_num to get the current page number but I want the curent value of Total Pages. Can this be done? null

  • Photobooth won't display old photos taken after cache cleared

    Hi everyone! My cache was accidentally cleared last night (I was working on cleaning my computer out, d/led Cocktail and I guess it did it automatically) and all my settings were reset. Everything has been put back to normal, except for my Photobooth

  • Logical Block corruption - not enough RMAN backups

    I have to deal with logical block corruption but these guys do not have enough rman backups to go back enough to recover blocks. All bad blocks are in SYSAUX and it seems because of it EM doesn't work as it's suppose to do. I dropped and recreated EM