Batch file on server

Hi
Is there any restriction on opening an excel file from on the server.
I m using JACOB to do so.My batch files fails at the point where it tries to open an excel file on the server.
Also is it possible to run a batch file from a form on the server but the batch file ll b on a different machine and will run on that machine.
Thanks in Advance

Since you want to run the batch file on the app server, there is no need to use webutil's client_host. You can use host to run the script.
But "unable to run on the Application Server" is not a very clear indication of the problem.
First make a very simple script to trace where the problem arises, e.g. in Windows:
echo "hello world" > c:\temp\temp.txt
Then make sure that the user who runs the Forms services has execute privilige on the script.
See what happens.

Similar Messages

  • To run a java program via a batch file,when called from a web server

    REM This batch file runs the Spider with the [-v] option.
    REM Lines 51 through 54 are simple DOS commands..they call the Spider
    REM The location of the Spider package is the important piece of information here...
    REM a batch file has access to the whole computer where the server resides.
    setlocal
    set JDK=C:\j2sdk1.4.1_01
    set PATH=%JDK%\bin;.;%PATH%
    CLASSPATH=%JDK%\jre\lib\*.jar;.;%JDK%\jre\lib\ext\*.jar;.;%CLASSPATH%
    java spiderpackage.EntryPoint -v
    endlocal
    I am trying to run this batch file from my web server.I can see nothing on my browser.I can run the same program from my machine but unable to run from web server.what should I do?

    I am making my question more clear...
    I have a Windows batch (*.bat) file that echoes some html, then calls a java program the output of which is html as well, then echoes the final html.
    To make sure that the java program gets properly executed, I set the necessary environment variables (e.g., JDK, PATH, CLASSPATH, etc.). The script looks something like this:
    setlocal
    set JDK=path_to_JDK
    set PATH=path_to_java
    set CLASSPATH=path_to_java_classes
    echo ^<html^>^<body^>
    call java foo
    echo ^</body^>^</html^>
    endlocal
    The idea, of course, is to call this script through a browser, on a web server.
    Curiously, both echo lines return to the browser just fine, but any output from
    the java program (which just writes html to STDOUT) does not make it back.
    Can someone explain to me why this is happening? How do I set things up so that the output (STDOUT and STDERROR) from the java program make it back to the browser?

  • Running a batch file kept on the server

    Hi ,
    I need to upload a file onto the application server then i have to call a batch file from my ABAP code kept on the same server .
    The batch file takes 3 inputs the uploaded filename onto the server the new file name ( that can be any name ) and the delete flag parameter ( 0 or 1 ).
    Is there any function module to do the same ??

    Hi,
    Follow the steps:
    1) Define external operating system command say zcopytm1 using SM69 by using the following parameters:
    Command name                            Operating system       Type
    ZCOPYTM1                                Windows NT             Customer
    Operating system command
    e:\tm1out\tm1ph.bat
    Parameters for operating system command
    Leave this blank
    tm1ph.bat is the batch file which it will execute.
    2) First test it using SM49. Once satisfied use the following code to execute it thru ABAP:
    DATA: BEGIN OF t_copy OCCURS 1.
            INCLUDE STRUCTURE btcxpm.
    DATA: END OF t_copy.
    DATA:      statusline LIKE btcxp3-exitstat.
      CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
             EXPORTING
                commandname            = 'zcopytm1'
                status                              = statusline
             TABLES
                exec_protocol                       = t_copy
             EXCEPTIONS
                no_permission                       = 1
                command_not_found                   = 2
                parameters_too_long                 = 3
                security_risk                       = 4
                wrong_check_call_interface          = 5
                program_start_error                 = 6
                program_termination_error           = 7
                x_error                             = 8
                parameter_expected                  = 9
                too_many_parameters                 = 10
                illegal_command                     = 11
                wrong_asynchronous_parameters       = 12
                cant_enq_tbtco_entry                = 13
                jobcount_generation_error           = 14
            OTHERS                              = 15
      CASE sy-subrc.
        WHEN 0.
          MESSAGE s999 WITH 'File has been copied in G:\public\tm1ph'.
        WHEN 1.
          MESSAGE s999 WITH 'No_permission'.
        WHEN 2.
          MESSAGE s999 WITH 'Command_not_found'.
        WHEN 3.
          MESSAGE s999 WITH 'Parameters_too_long'.
        WHEN 4.
          MESSAGE s999 WITH 'Security_risk'.
        WHEN 5.
          MESSAGE s999 WITH 'Wrong_check_call_interface'.
        WHEN 6.
          MESSAGE s999 WITH 'Program_start_error'.
        WHEN 7.
          MESSAGE s999 WITH 'Program_termination_error'.
        WHEN 8.
          MESSAGE s999 WITH 'X_error'.
        WHEN 9.
          MESSAGE s999 WITH 'Parameter_expected'.
        WHEN 10.
          MESSAGE s999 WITH 'Too_many_parameters'.
        WHEN 11.
          MESSAGE s999 WITH 'Illegal_command'.
        WHEN 12.
          MESSAGE s999 WITH 'Wrong_asynchronous_parameters'.
        WHEN 13.
          MESSAGE s999 WITH 'Cant_enq_tbtco_entry'.
        WHEN 14.
          MESSAGE s999 WITH 'Jobcount_generation_error'.
      ENDCASE.
    I hope this helps,
    Regards
    Raju Chitale
    Edited by: Raju Chitale on Dec 22, 2008 5:38 AM

  • Running a batch file on ftp server

    HI All,
    i am trying to use Command line facility of file adapter to run a batch file..
    i batch file i have a single command as
    mkdir ranjeet.
    how should i call this batch file from file adapter..
    i tried putting batch file name in the command line section. I had copied the batch file on ftp server at location of Target Directory..but in audit log of adapter i am getting error as OS command cannot be executed..

    Ranjeet,
    >>ok..but what will command to be run of ftp run..
    How do you expect any one of us to know what your ftp server is based on.
    The previous reply by Carme has answered your XI query and to the point. You acknowledge it with a <b>ok</b>!! I guess it is too rude on your part.
    Anway answering your question, that depends on your FTP server. Log in to your FTP server manally and try executing these commands and check.
    Regards,
    Jai Shankar

  • Running a batch file on  a web server

    hi,
    i am facing a problem regarding running a batch file(with a java command in that file) on a web server.
    i am having a batch file which is running a chatapplication (this file is having a single line -- "java ChatServer 8080")
    i want to execute this command ( file ) on my web server
    can u help me plz ( i think u can)
    thanx 4 reading my problem...
    -ashish

    thanx 4 replying
    but as i am a developer and i am developing the aplication for a client, so should i speak to the client for this or can i do this without interrupting them?
    -ashish

  • How to execute a batch file on different remote server using TFS Build

    I have a build server and have 2 web servers. I am deploying using TFS Builds. Now, I have a requirement to execute a batch file which is kept on these 2 web servers. i.e. C:\MyBatch\CreateMe.bat
    After my build is successful, I need to execute this batch from the build server.
    Note, I cannot make any shared folder.

    Hi Sameer, 
    Thanks for your post.
    What’s the version of your TFS?
    How do you deploy solution using TFS Build, run MSBuild deploy command or using Release Management?
    That C:\MyBatch\CreateMe.bat file stay on your two web server machines separately? 
    If you want execute this bat file on your two web server machines separately using build process template, you need configure your web server machine as build agent, then add the InvokeProcess activity in build process template to run the bat file on build
    agent machine after build, please refer to Hari’s answer reply in this post:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/b8bcb19f-1296-441c-8356-e701b949445a/tfs-2010-how-to-execute-a-batch-file-after-build?forum=tfsbuild.
    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.

  • Error Happened at RFC Server Cannot Open the Job Batch File.

    We have BW 7.0  and Data services 12.1. We are scheduling a Infopackage in BW that triggers a job in Dataservices server.
    We had checked the connection between Dataservices source system in BW and RFC server on Dataservices side and these connections are good. on the 3rd party sellections tab in infopackage we specify the batch file name that we exported in Dataservices server. When we execute the infopackage we get the following error.
    Error Happened at RFC Server Cannot Open the Job Batch File.
    This error started occuring from yesterday and prior to that it was working fine. We are not understanding what changed in the system to cause this error.
    Can anyone suggest any solutions for the above issue.
    Thanks,
    Naveen.

    I'm not sure what the root cause would be here. Is the file still available ? Did file permissions change ? ...
    But I wanted to point your attention to the fact that in Data Services/Data Integrator XI 3.2 (=12.2) we significantly enhanced the integration with BW. In XI 3.2, the RFC server is now integrated into the Data Services Management Console (so no need to start as a seperate executable) and you can start jobs from BW by just specifting the job's name in the repo (no need anymore to export execution commands to .bat files). So if upgrading to XI 3.2 is an option, things should go much smoother.
    More details on the wiki  : http://wiki.sdn.sap.com/wiki/display/BOBJ/Loading+BW
    Thanks,
    Ben.

  • Execution of a batch file within SSIS fails in Sql Server Agent Job

    Hi All,
    I have an SSIS Package, which simply runs a batch file , the code for the batch file is
    MOVE \\cambosnapp01\Claims\Analytics\NICB\CurrentAlerts\* \\cambosnapp01\Claims\Analytics\NICB\AlertsArchive
    If i run the SSIS package manually it runs fine and moves all the files, however if i run the package through a Sql Agent Job it fails with the following error
    The directory "\\Cambosnapp01\Claims\Analytics\NICB" does not exist
    This is where the batch file is located, i am not able to understand if the SSIS package is running fine then why not the sql agent job?
    I also tried to create a sql agent job using Operating System(CmdExec) and i copied my batch file code in the command i am running it as SQL Server Agent Service Account , and here it fails as
    Executed as user: CAMELOT\svcDW. Access is denied.  Process Exit Code 1.  The step failed
    Does this mean this user doesnt have the rights to excute a batch file? how did this user even come up i am not running it from this user i am running it from SQL Server Agent Service Account . I dont know who is that user and if he even has the rights to
    execute a batch file.
    Can someone please help me with any solution for this? either first way or second way anything works fine for me.
    Thanks

    Hi SQLDEV,
    According to your description, you are experiencing the issue "The directory "\\Cambosnapp01\Claims\Analytics\NICB" does not exist" when run the SSIS package
    in SSMS by using SQL Server Agent, right?
    In your scenario, since you can run the package in SSDT manually. So as per my understanding, the issue can be caused by that the Services Account of your SQL Server Agent do not have the permission on that folder. To avoid this issue, you can set the folder
    permission for your SQL Server Agent account or change the services account to an account who have the corresponding permission. Please refer to the link below to see the details.
    https://msdn.microsoft.com/en-us/library/bb727008.aspx
    https://msdn.microsoft.com/en-us/library/ms345578.aspx
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    Charlie Liao
    TechNet Community Support

  • HOST IN 10g to run batch file on application server

    Hi,
    I am trying to deploy a form from 6i to 9i. the form use Host builtin to run batch file on machine. this works fine when i run form on client server environment. but when i run the same form after compiling in 9i and run on 3 tier model and try to run batch file from form it give me error that
    'ftp' is not recognized as an internal or external command,
    operable program or batch file.
    any suggestion?

    It could be because the Host session doesn't have any environment variables set i.e. there is no PATH variable, so it simply doesn't know where to look to find the 'ftp' executable. You could try supplying the explicit path of the ftp executable and see if that works. (This was a problem I had running Host commands on a Unix application server.)
    James

  • Use batch file to determine if computer is a terminal server

    Hello experts,
    I am trying to create a batch file that I can use to install MS Office 2013 and another software on Windows Server 2003 R2,
     Windows Server 2008 R2, and Windows Server 2012 terminal servers (Remote Desktop Services) via GPO. The installation files are NOT
     "msi" files.  Can you please tell me how I can use command line in a batch or script file to determine if a machine is a terminal server or not? I tried the Change user /query command on a Windows Server 2008 R2
    terminal server and a Windows 7 machine and both machines returned the following status
    Application EXECUTE mode is enabled.
    which will be a problem because the installation batch file would treat the Windows 7 machines as a terminal server when it's not really a terminal server.
    Basically, I want the batch file to check to determine if the machine is a terminal server. If it is a terminal server, then it would run change user /install, install the software, reboot server, then run change user
    / execute.  Your help will be greatly appreciated.

    Hi,
    For Office 2013 there should not be any concerns since it is windows installer based and things will be handled automatically.  For the other software you could simply put the session in install mode in every case.  For the servers/workstations
    where install mode doesn't apply the change user /install and change user /execute will simply fail without any harmful effects.
    You may check whether or not the machine is a terminal server using WMI, for example:
    wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TerminalServiceSetting Get TerminalServerMode
    0 = Remote Administration mode (not a RDSH/TS)
    1 = Application Server mode (aka RDSH/Terminal server)
    -TP
    When I run the command from the command line, it works, but when I try it in a "IF" statement, nothing happens.  I am I doing something wrong using the wmic code in the IF statement?

  • Unable to run batch files in my EP server

    Hi,
       I'am unable to run batch files(go.bat and configtool.bat) on my EP server.Anbody please give me a solution.
    With Regards
    Pradeep.B

    If your EP Server is on non-windows based environment then you cannot use go.bat & configtool.bat or else you can. If you are trying to execute these on unix based machines then you have to use go.sh & configtool.sh files.
    Pradeep

  • Executing the batch file from SQL Server Agent job

    Hi - I have a simple batch file (.bat) which connects the SFTP server and drop the files to location machine.  When I run the .bat file manually its working fine but when I schedule it in SQL Agent its keep on running and never shows success message. 
    Could you please tell me how can i resolve it.  Its very urgent for me.
    thanks

    If you trust this host, enter "y" to add the key to
    PuTTY's cache and carry on connecting.
    If you want to carry on connecting just once, without
    adding the key to the cache, enter "n".
    If you do not trust this host, press Return to abandon the
    connection.
    Store key in cache? (y/n) Remote working directory is /
    When you connect via putty you get prompted to accept a key in interactive mode. At this point your batch file is waiting for someone to type in y or n.  
    Try running putty in batch mode to get around this.
    http://the.earth.li/~sgtatham/putty/0.52/htmldoc/Chapter6.html#6.1.8
    6.1.8 -batch: avoid interactive prompts
    If you use the -batch option, PSFTP will never give an interactive prompt while establishing the connection. If the server's host key
    is invalid, for example (see section 2.2), then the connection will simply be abandoned instead of asking you what to do next.
    This may help PSFTP's behaviour when it is used in automated scripts: using -batch, if something goes wrong at connection time, the batch
    job will fail rather than hang.

  • Batch file to Start / stop Import server

    Hi,
    I would like to know any approach or example to make a batch file to start and stop Import/Syndication server in MDM.
    Appreciate a small sample for better understanding to start with.
    Thanks,
    Reo

    Hi Reo,
    the proper way to handle the Import Server is not to start it and restart it with a batch. This was the way the Import Manager Batch worked -> to execute an import one time.
    You can define an time interval in the ini file how often the import should be executed.
    If you want to use the Import Server anyway:
    Write a little batch file which executes a DOS service start tool like "ntscmgr.exe". With that you can start and stop a service. If you want this to happen at a certain time of the day, just schedule the batch file under your operating system.
    I hope that helps.
    Best regards
    Nicolas

  • Converting old server time check batch file to PowerShell

    Hi Guys,
    I have batch file that checks the offset between our time servers and two external ones.  This batch file works in XP, but not in Windows 7 pro.  Where it breaks down is it doesn't display the offset correctly.  Can this batch be converted
    to Powershell, so that it would be compatible?  Here is the batch code:
    CLS
    @ECHO OFF
    @ECHO.
    @ECHO.
    @ECHO ************************* Time Checking Script *************************
    @ECHO *** Check the offset between government time server, our internal
    @ECHO *** time server and domain controllers.
    @ECHO.
    @ECHO *** time.nist.gov:
    @w32tm /monitor /computers:time.nist.gov /domain:cooley-dickinson.org |FIND "offset"
    @ECHO.
    @ECHO *** time.cooley-dickinson.org:
    @w32tm /monitor /computers:tock.usno.navy.mil /domain:cooley-dickinson.org |FIND "offset"
    @ECHO.
    PAUSE
    @ECHO.
    @Net Time \\server1 | find "Current"
    @Net Time \\server2 | find "Current"
    @Net Time \\server3 | find "Current"
    @Net Time \\server4 | find "Current"
    @Net Time \\server01 | find "Current"
    @Net Time \\server02 | find "Current"
    @Net Time \\server03 | find "Current"
    @Net Time \\server04 | find "Current"
    @Net Time \\server05 | find "Current"
    @Net Time \\server06 | find "Current"
    @Net Time \\server07 | find "Current"
    @Net Time \\server08 | find "Current"
    Below is the output we get from the batch file in Windows 7.  Where it says delayoffset, is normally where the offset is in seconds.
    *** time.nist.gov:
    Analyzing:Analyzing:Analyzing:Analyzing:Analyzing:delayoffset from DC01.coole
    y-dickinson.org
    delayoffset from DC01.cooley-dickinson.org
    delayoffset from DC01.cooley-dickinson.org
    delayoffset from DC01.cooley-dickinson.org
    delayoffset from DC01.cooley-dickinson.org
    *** time.cooley-dickinson.org:
    offset from DC01.cooley-dickinson.org
    delayoffset from DC01.cooley-dickinson.org
    delayoffset from DC01.cooley-dickinson.org
    delayoffset from DC01.cooley-dickinson.org
    delayoffset from DC01.cooley-dickinson.org
    The rest of the script displays the date/time for individual servers correctly.  If this could be converted to powershell, it would be a whole lot easier to deal with.
    Thank you!
    Larry

    Hi Bill,
    My main concern is getting a means script-wise to mimic the functionality of the batch I posted.  The syncing has never been an problem for our engineers (that I know of).  The batch is but a task we can only run on xp, so I wanted to be able to
    try to migrate the task over to windows 7.  If the task is outdated and unnecessary, as I told jrv, I'll suggest that it is to the sys admin.  To me it is a scripting question, I'm a programmer at heart and look to find ways of automating tasks with
    code.  I'm new to Powershell and not experienced with system architecture design. 
    Thank you!
    Larry
    Again - there is no way to do what you are asking. w32tm is the only utility that matches time but you are not using it correctly.  You are reporting the offset but not the delay.  The only accurate way to test sync quality is by running a tape. 
    This is a function of w32tm.   THe tape will show you the variance over time.  The other way I have used is to set the time service to generate a log and scan the log.
    Win32_UTCTime will tell you the time at remote servers but it cannot tell you the network delay.
    If you are only interested in matching seconds then you can use it as well as the w32tm query that returns network time.  These can be extracted and converted into time objects.
    As an exercise to learn PowerShell this could be useful.  Just capture the output of w32tm and parse it in PowerShell.
    See the "Learning" resources on this site for examples.
    You should also use your search engine to learn more about what is available and how it is used.
    A simple search for me returned this:
    http://gallery.technet.microsoft.com/scriptcenter/Get-Network-NTP-Time-with-07b216ca
    There are many more things available including GUIs that report in real time.
    You desktop guys need to get out more often.  Learn to use computers.  They can be very helpful.  Stop plating with hardware.  Desktop support will be gone within a few years as we move to the cloud.  Only application support will
    remain.  The classic PC and member server are pretty much obsolete.
    ¯\_(ツ)_/¯

  • Unable to run batch file through BO XI 3.1 server

    IHi,
    I am unable to run batch file (.bat) from BO XI CMC. the batch file is running fine through command prompt but fails at server. Error msg is "Running this type of program is disabled by your administrator".
    Can you help?
    Thanks in advance,
    Avijit

    Have your administrator enabled the running of that type of program in the CMC?
    Sincerely,
    Ted Ueda

Maybe you are looking for

  • Why do I have time machine disk problem after closing and later reopening clamshell.

    I consistently see the following after closing and later reopening my Macbook Pro (5,1). I have to unplug and replug my Time Machine USB drive. The only thing new is Mountain Lion. The Time Machine disk has 229 GB free of 1.5 TB. I never had to unplu

  • AVI with DIVX compression

    Hi, Is it possible to get an AVI with DIVX compression out of Premiere or Media Encoder (CS6)? I have a client who's 'in house' screen system requires this format. Thanks

  • I can't get this thing to work!!!!

    I plug my ipod into my computer at work where I have itunes installed and it shows that the ipod is updating, actually showing the songs getting transfered! When the update is complete, no songs appear on my ipod, no memory is used according to the "

  • Aix server ( WebLogic 11)

    Hi Obiee Experts how to config weblogic deployment in obiee link. could you please let me know thnks satya

  • Video length in drop zones

    Is there a limit on the length of videos I can put in drop zones?