How to run batch files in the backround ??????

please anyone tell me how to run the batch files in the background i dont want anyone to interfere the batch file..The batch file has to run for a long time even days so it will be safe if the batch file is running in the bachgroung somewhere ..
please help me in this regards
Thanking u
Regards
Santhosh

The easiest way is to write a native application which starts the batch file in hidden mode (the target batch file could be an argument).
Under Windows it would be done with the API call
ShellExecute(NULL, "open", "C:\mybatch.bat", NULL, NULL, SW_HIDE);
Then compile the native tool as windows application with no user interface. Now you are able to execute applications in invisible mode.

Similar Messages

  • How to run batch file from oracle forms 9i

    Hi everyone.
    i have a data in csv file. i want to upload it to my database. i am using sql loader for it.
    i have made a batch file which run the sql loader and transfer my data to database.
    How to run batch file from oracle forms 9i.
    when i press the button, nothing uploads in my database. (when i simply run the batch file it works).
    here is my code
    Begin
    HOST('C:\temp\batchfile.bat');
    message('done');
    end;
    Thanks in advance
    regards
    sajid

    this is my log file, when i run manually.
    SQL*Loader: Release 10.2.0.1.0 - Production on Thu Jul 1 23:27:53 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Control File: file_to_upload.ctl
    There are 2 data files:
    Data File: sk.csv
    Bad File: sk.bad
    Discard File: none specified
    (Allow all discards)
    Data File: sk1.csv
    Bad File: sk1.bad
    Discard File: none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array: 64 rows, maximum of 256000 bytes
    Continuation: none specified
    Path used: Conventional
    Table KHAN, loaded from every logical record.
    Insert option in effect for this table: APPEND
    Column Name Position Len Term Encl Datatype
    SR FIRST * , O(") CHARACTER
    DATES NEXT * , O(") CHARACTER
    AGENT NEXT * , O(") CHARACTER
    COUNTRY NEXT * , O(") CHARACTER
    TRANSACTIONS NEXT * , O(") CHARACTER
    PKR NEXT * , O(") CHARACTER
    USD NEXT * , O(") CHARACTER
    BANK NEXT * , O(") CHARACTER
    Table KHAN:
    11088 Rows successfully loaded.
    0 Rows not loaded due to data errors.
    0 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    Space allocated for bind array: 132096 bytes(64 rows)
    Read buffer bytes: 1048576
    Total logical records skipped: 0
    Total logical records read: 11088
    Total logical records rejected: 0
    Total logical records discarded: 0
    Run began on Thu Jul 01 23:27:53 2010
    Run ended on Thu Jul 01 23:27:54 2010
    Elapsed time was: 00:00:00.63
    CPU time was: 00:00:00.17

  • How to Run Batch files from inside Reports.

    Hi All,
    I have 2 questions.
    1) How to change the direction of the reports with Arabic orientation i.e Right to left Change without changing the registry.
    2) How to execute a batch file from report or before execution of the report i.e before opening the report.
    I want to set few environmental variables before opening the report. How do i achieve this?
    Request the forum community to discuss and help me out on this issue.
    Thanks in advance

    Thanks Inol
    Though my report is running NLS variable values given in the batch file is not getting picked.
    Here is my batch file contents. My NLS Variables are not getting picked in the reports. I want that to be picked up and the reports orientation should change automatically as per the NLS variables given in the batch file.
    Please go through my batch file code.
    set NLS_LANG                   = AMERICAN_AMERICA.UTF8
    set NLS_CALENDAR            = GREGORIAN
    set NLS_DATE_FORMAT      = dd/MON/yyyy
    set FORMS60_PATH           =   <Enter Relevant Path>
    set REPORTS60_PATH        =  <Enter Relevant Path>
    set PATH=%PATH%;c:\forms6i\bin
    set ORACLE_HOME             =   c:\forms6i
    set TNS_ADMIN                 =   c:\forms6i\NET80\ADMIN\TNSNAMES.ORA
    rwrun60.exe d:\DOTNETORION17_bin\elist_rg1.rdf userid=scott/tiger@thai P1=10Please help me out in getting this value picked and run the report.

  • LabView equivalent to running batch files using the "shell" command (VisualBasic)

    I'm converting a VisualBasic app to LabView and am having trouble figuring out how to run a batch file with LabView.
    The VB code that I'm trying to replicate is:
    'UNLOAD RTX DRIVERS
    Dim ProcessId As Long
    ProcessId = Shell(App.Path + "\UnloadReloadRTX.bat", vbNormalFocus)
    Wait 400
    I haven't found a LabView equivalent to the Shell command. Any suggestions will be appreciated.
    thanks,
    Todd

    It seems as if this question pops up every week. Use the System Exec.vi found under Funtions - Communications palette. It is the equivalent of Shell.
    - tbob
    Inventor of the WORM Global

  • How to run batch file using trigger?

    Hi, i am trying run a batch file using a trigger on a table.
    say i have a table XYZ(col_1 varchar2 primary key, col_2 varchar2)
    the values of col_2 keeps changing and col_1 are constant
    whenever the value of col_2 in any row changes from "on" to "off" i want to run a batch file C:\Users\ABC\Desktop\test.bat
    i did some searching but couldn't find any solution. Thanks in advance
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

    >
    the script will be started around 60-70 times a day
    >
    No - as marwim said the script will be executed every time the trigger is fired. And that trigger, depending on how it is written, might be fired several times for the same transaction.
    And if the trigger is fired the script will be executed even if the transaction that caused the trigger to fire issues a ROLLBACK.
    Triggers are non-transactional. You need to clearly define the business rules for when the script should run. Should it run only when the transaction is COMMITTED? Or should it run if the transaction executes even if the transaction performs a ROLLBACK?
    A trigger is the wrong solution for your problem.
    Please clarify what the business rules are that should control the execution of the script.

  • How to run python files on the browser?

    Good day,
    I am trying to run any python file on the Leopard web server, accesing it via safari.
    also I have set the permissions of the file to 777...
    then I have copied the file to library/webserver/documents.When I open this file in Safari, the file is listed, but it is not executed.
    also I have copied the file to library/webserver/cgi-executables, but the file is not executed, an error appears:
    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    More information about this error may be available in the server error log
    the python file contains only 2 lines:
    #!/usr/bin/env python
    print 2
    I have tested the file in the command line in the terminal python test.py and it runs fine... but I dont know what should I have to do to run it on the browser...
    I am using python 2.5.2 and leopard 10.5.2
    do I have to enable any mime types for python on leopard client? how to do it?
    have a nice day

    Goto the Install directory on your Oracle installed directory and have a look at the 'readme' file. You will find all the info you wanted.
    Regards.

  • Error running batch files from java source file???

    Dear Friends,
    hi,
    this is with response to a doubt i had earlier ,
    i want to run batch files from the java source file ,i tried using this code (here batrun is the batch file name that contains commands to run other java files)
    try
    String [] command = {"c:\\vishal\\finalmain\\batrun"};
    Runtime.getRuntime().exec(command);
    catch(Exception e)
    but i got the following error.
    java.io.IOException: CreateProcess: gnagarrun error= 2
    plz. help me, i tried all combination w/o success,
    in anticipation(if possible give the code after testing)
    Vishal.

    hello there,
    i solved the prob. by using
    cmd /c start filename ,but i need to pass parameters ie
    cmd /c start java "c:/vishal/runfile a b" where a and b are the parameters. but it is not accepting this in Runtime.getRuntime.exec(),
    any solutions ?????????
    regards,
    Vishal

  • How to run .sql file in tsql or powershell

    Hi All,
    HOw to run .sql file inside the TSQL or powershell using with IF else condition. This below query works fine but when i executing through the SQL Agent it's geeting an error.Please could help how to run through the SQL agent already using execution type
    in agent as 'Operating system(CmdExec)'
    Declare @computerName varchar(100), @InstanceName varchar(50)                             
    SET @ComputerName = REPLACE(CAST(SERVERPROPERTY('ComputerNamePhysicalNetBIOS') AS varchar),'\','$')  
    SET @InstanceName = REPLACE(CAST(SERVERPROPERTY('instancename') AS varchar),'\','$')
    IF (@InstanceName = 'SQL2008R2')
    Begin  
    :r C:\BackupFolder\Test1.sql    
    :r C:\BackupFolder\Test2.sql    
    End
    IF (@InstanceName = 'SQLINS2')
    BEGIN
    :r C:\BackupFolder\Test3.sql
    END
    IF (@InstanceName = 'SQL2012')
    BEGIN
    :r C:\BackupFolder\Test4.sql
    END
    Thansk in Advance
    A-ZSQL

    In T-SQL, you can try using sqlcmd to invoke sql file
    if @@SERVERNAME='abcd'
    begin
    Master..xp_cmdshell 'sqlcmd -S <ServerName> -i BackupDetails.sql -E'
    end
    OR 
     PowerShell 
    Load the snapins
    Add-PSSnapin SqlServerCmdletSnapin100
    Add-PSSnapin SqlServerProviderSnapin100
    Function Get-SqlInstances {
    Param($ServerName = '.')
    $localInstances = @()
    [array]$captions = gwmi win32_service -computerName $ServerName | ?{$_.Name -match "mssql*" -and $_.PathName -match "sqlservr.exe"} | %{$_.Caption}
    foreach ($caption in $captions) {
    if ($caption -like "MSSQLSERVER") {
    $localInstances += $ServerName
    } else {
    $temp = $caption | %{$_.split(" ")[-1]} | %{$_.trimStart("(")} | %{$_.trimEnd(")")}
    $localInstances += "$ServerName\$temp"
    $localInstances
    $instance=Get-SqlInstances -ServerName HQDBSP17
    foreach($i in $instance)
    if($i -like 'CRM2011')
    write-host 'CRM Database'
    invoke-sqlcmd -inputfile 'F:\PowerSQL\test.sql' -ServerInstance 'abcd'
    if( $i -like 'SQL2012')
    write-host 'SQL 2012 instance'
    invoke-sqlcmd -inputfile 'F:\PowerSQL\test.sql' -ServerInstance 'abcd'
    --Prashanth

  • How do I make a batch file if the .class file uses a foreign package?

    I am trying to make an MS-DOS batch file using the bytecode file from the Java source file, called AddFields.java. This program uses the package BreezySwing; which is not standard with the JDK. I had to download it seperately. I will come back to this batch file later.
    But first, in order to prove the concept, I created a Java file called Soap.java in JCreator. It is a very simple GUI program that uses the javax.swing package; which does come with the JDK. The JDK is currently stored in the following directory: C:\Program Files\Java\jdk1.6.0_07. I have the PATH environment variable set to the 'bin' folder of the JDK. I believe that it is important that this variable stay this way because C:\Program Files\Java\jdk1.6.0_07\bin is where the file 'java.exe' and 'javac.exe' are stored. Here is my batch file so far for Soap:
    @echo off
    cd \acorn
    set path=C:\Program Files\Java\jdk1.6.0_07\bin
    set classpath=.
    java Soap
    pause
    Before I ran this file, I compiled Soap.java in my IDE and then ran it successfully. Then I moved the .class file to the directory C:\acorn. I put NOTHING ELSE in this folder. then I told the computer where to find the file 'java.exe' which I know is needed for execution of the .class file. I put the above text in Notepad and then saved it as Soap.bat onto my desktop. When I double click on it, the command prompt comes up in a little green box for a few seconds, and then the GUI opens and says "It Works!". Now that I know the concept of batch files, I tried creating another one that used the BreezySwing package.
    After I installed my JDK, I installed BreezySwing and TerminalIO which are two foreign packages that make building code much easier. I downloaded the .zip file from Lambert and Osborne called BreezySwingAndTerminalIO.zip. I extracted the files to the 'bin' folder of my JDK. Once I did this, and set the PATH environment variable to the 'bin' folder of my JDK, all BreezySwing and TerminalIO programs that I made worked. Now I wanted to make a batch file from the program AddFields.java. It is a GUI program that imports two packages, the traditional GUI javax.swing package and the foreign package BreezySwing. The user enters two numbers in two DoubleField objects and then selects one of four buttons; one for each arithmetic operation (add, subtract, multiply, or divide). Then the program displays the solution in a third DoubleField object. This program both compiles and runs successfully in JCreator. So, next I moved the .class file from the MyProjects folder that JCreator uses to C:\acorn. I put nothing else in this folder. The file Soap.class was still in there, but I did not think it would matter. Then I created the batch file:
    @echo off
    cd \acorn
    set path=C:\Program Files\Java\jdk1.6.0_07\bin
    set classpath=.
    java AddFields
    pause
    As you can see, it is exactly the same as the one for Soap. I made this file in Notepad and called it AddFields.bat. Upon double clicking on the file, I got this error message from command prompt:
    Exception in thread "main" java.lang.NoClassDefFoundError: BreezySwing/GBFrame
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
    4)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    Caused by: java.lang.ClassNotFoundException: BreezySwing.GBFrame
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    ... 12 more
    Press any key to continue . . .
    I know that most of this makes no sense; but that it only means that it cannot find the class BreezySwing or GBFrame (which AddFields extends). Notice, however that it does not give an error for javax.swing. If I change the "set path..." command to anything other than the 'bin' folder of my JDK, I get this error:
    'java' is not recognized as an internal or external command,
    operable program or batch file.
    Press any key to continue . . .
    I know this means that the computer cannot find the file 'java.exe' which I believe holds all of the java.x.y.z style packages (native packages); but not BreezySwing or any other foreign packages. Remember, I do not get this error for any of the native Java packages. I decided to compare the java.x.y.z packages with BreezySwing:
    I see that all of the native packages are not actually visible in the JDK's bin folder. I think that they are all stored in one of the .exe files in there because there are no .class files in the JDK's bin folder.
    However, BreezySwing is different, there is no such file called "BreezySwing.exe"; there are just about 20 .class files all with names like "GBFrame.class", and "GBActionListener.class". As a last effort, I moved all of these .class files directly into the bin folder (they were originally in a seperate folder called BreezySwingAndTerminalIO). This did nothing; even with all of the files in the same folder as java.exe.
    So my question is: What do I need to do to get the BreezySwing package recognized on my computer? Is there possibly a download for a file called "BreezySwing.exe" somewhere that would be similar to "java.exe" and contain all of the BreezySwing packages?

    There is a lot of detail in your posts. I won't properly quote everything you put (too laborious). Instead I'll just put your words inside quotes (").
    "..there are some things about the interface that I do not like."
    Like +what?+ This is not a help desk, and I would appreciate you participating in this discussion by providing details of what it is about the 'interface' of webstart that you 'do not like'. They are probably misunderstandings on your part.
    "Some of the .jar files I made were so dangerously corrupt, that I had to restart my computer before I could delete them."
    Corrupt?! I have never once had the Java tools produce a corrupt Jar. OTOH, the 'cannot delete' problem might relate to the JRE gaining a file lock on the archive at run-time. If the file lock persisted after ending the app., it suggests that the JRE was not properly shut down. This is a bug in the code and should be fixed. Deploying as .class files will only 'hide' the problem (from casual inspection - though the Task Manager should show the orphaned 'java' process).
    "I then turned to batch files for their simple structure and portability (I managed to successfully transport a java.util containing batch file from my computer to another). This was what I did:
    - I created a folder called Task
    - Then I copied three things into this folder: 1. The file "java.exe" from my JDK. 2. The program's .class file (Count.class). and 3. The original batch file.
    - Then I moved the folder from a removable disk to the second computer's C drive (C:\Task).
    - Last, I changed the code in the batch file...:"
    That is the +funniest+ thing I've heard on the forums in the last 72 hours. You say that is easy?! Some points.
    - editing batch files is not scalable to 100+ machines, let alone 10000+.
    - The fact that Java worked on the target machine was because it was +already installed.+ Dragging the 'java.exe' onto a Windows PC which has no Java will not magically make it 'Java enabled'.
    And speaking of Java on the client machine. Webstart has in-built mechanisms to ensure that the end user has the minimum required Java version to run the app. - we can also use the [deployJava.js|http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html#deplToolkit] on the original web page, to check for minimum Java before it puts the link to download/install the app. - if the user does not have the required Java, the script should guide them through installing it.
    Those nice features in deployJava.js are available to applets and apps. launched using webstart, but they are not available for (plain) Jar's or loose class files. So if 'ensuring the user has Java' is one of the requirements for your launch, you are barking up the wrong tree by deploying loose class files.
    Note also that if you abandon webstart, but have your app. set up to work from a Jar, the installation process would be similar to above (though it would not need a .bat file, or editing it). This basic strategy is one way that I provide [Appleteer (as a downloadable ZIP archive)|http://pscode.org/appleteer/#download]. Though I side-step your part 1 by putting the stuff into a Jar with the path Appleteer/ - when the user expands the ZIP, the parts of the app. are already in the Appleteer directory.
    Appleteer is also provided as a webstart launched application (and as an applet). Either of those are 'easier' to use than the downloadable ZIP, but I thought I would provide it in case the end user wants to save it to disk and transport the app. to a machine with no internet connection, but with Java (why they would be testing applets on a PC with no internet connection, I am not sure - but the option is there).
    "I know that .jar and .exe files are out because I always get errors and I do not like their interfaces. "
    What on earth are you talking about? Once the app. is on-screen, the end user would not be able to distinguish between
    1) A Jar launched using a manifest.
    2) A Jar launched using webstart.
    3) Loose class files.
    Your fixation on .bat files sounds much like the adage that 'If the only tool you have is a hammer, every job starts to look like a nail'.
    Get over them, will you? +Using .bat files is not a practical way to provide a Java app. to the end user+ (and launching an app. from a .bat looks quite crappy and 'second hand' to +this+ user).
    Edit 1:
    The instructions for running Appleteer as a Jar are further up the page, in the [Running Appleteer: Application|http://pscode.org/appleteer/#application] section.
    Edited by: AndrewThompson64 on May 19, 2009 12:06 PM

  • How to use batch files to send the load from ODC to UCM?

    Hello all.
    We're trying to do this along this week and, until now, we couldn't figure out how to use batch files containing metada on ODC and commit the output files to UCM.
    So these are our specs:
    VM 1
    ODC - 10gR3
    OS - Windows XP 32 bits SP3
    DB - Oracle DB 11.2
    VM 2
    No ODC
    UCM 11.1.1.6
    OS - Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)
    We've opened a ticket with Oracle Support to know how we should do this. The number is SR 3-6108348211.
    Let me try to explain what we want to do:
    1 - we have a batch file with all metadata of many files from UCM
    2 - we want to use this file in ODC, so the application will convert the images and commit them to UCM
    3 - we should see all these files, their metadata, thumbnails and related content in UCM
    4 - this is a batch file example we want to send to ODC:
    @Properties LocalData
    IdcService=CHECKIN_UNIVERSAL
    dRevLabel = 1
    primaryFile=/tra/Relatorio_UHPF-03-04-2008-M-RL-EA.pdf
    dDocName=TRA_33
    dDocTitle=UHPF-03-04-2008-M-RL-EA
    dSecurityGroup=MAM_TRA
    dDocType=Document
    dDocAuthor=luis.neotropical
    dInDate=14/05/08
    xC_CLASSIFICACAO=EA - Educação Ambiental
    xC_DATA=01/04/08
    xC_DATAVALIDADE=30/04/08
    xC_LOCALIZACAOFISICA=N/D
    xC_USUARIO_DEP=LUIS FERNANDO DA CAMARA
    xC_TIPO=RL - Relatório
    xC_USINA=UHPF - USINA HIDRELÉTRICA PASSO FUNDO
    xC_FICHA=MAM - Relatorios Ambientais
    xC_IDDOCMAN=TRADocID=157
    xC_IDANEXODOCMAN=TRAFileID=33
    xC_DESTINOINICIAL=Tractebel
    xC_ORIGEM=Neotropical
    xC_FORMATODOCUMENTO=Digital
    xC_GENERODOCUMENTO=
    xC_DOCPRINCIPAL=Sim
    @end
    <<EOD>>
    5 - So, when we use this batch file on ODC, the file (or image) will be converted, all metadata attached and then sent to UCM.
    But we don't know how to do the link between ODC and UCM. The Oracle Support says it is necessary to do some customization. In the books I could not find any info about how to do, just generic information or how to use ODC.
    Is there a way (without customization) to do that? Can anyone give us a step-by-step guide?
    Thanks for all help and guidance.
    Fernando

    What is the one-sentence requirement or issue you're trying to solve?
    If you only want content to be converted to pdf, then you should already have that with your items checked into UCM (if you have IBR enabled).
    if you really want to feed content into ODC using a batchfile, my first thought would be to create a transformation utility/app that will convert your batchfiles to the expected ODC import server folder job format. then you'll have to move or map the content to match.
    Again, without knowing the exact issue/business requirement you're trying to work through, I'd say a redesign of your ingestion process may be in order.
    If you feed content directly into ODC through any supported ODC method (watch folder, email, scanner, fax, etc), then you'll be able to use everything ootb as you'll be able to auto-commit directly into UCM or add an indexing step and manual commit to UCM.
    ODC is basically a front end for indexing and extra ingestion options to your content repo.
    IPM is basically the same, but it includes some extra process-related details (process metadata, process integrations/bpel/bpm, other system integrations/ebs/crm, etc). I don't feel that IPM would help with the transformation-specific question you've put out there.
    -ryan

  • How to run media file after Runtime.exc the real player?

    Hi
    How to run media file after Runtime.exc the real player application

    String command = "cmd /c start videotest.rm";
    Runtime.getRuntime().exec(command);

  • Why do I get error -17500 when calling a batch file using the call executable step type?

    I am calling a batch file using the call executable step type. If the path to the batch file contains a space I get error -17500 and a message stating there was an error in "Post". For example the path to the batch file is "c:\TestWin\Test Files\...\Program.bat" When I run this I get the above mentioned error, however if I change my directory structure so the path is now "c:\TestWin\TestFiles\...\Program.bat" it runs fine. I use the browse feature to find my batch file so it is not me typing in a path incorrectly. I have removed the batch file and I get a different error stating that it couldn't find the file so it appears that for my error it can find the file but can't run it. I am
    sure that this has something to do with the fact that batch files are written in DOS but really don't want to resort to changing my directory structure on all my test stations. Is there any way to fix this problem so I can leave a space in my path?

    It appears I have figured it out. This was on another computer so I was unaware of how they used their computer. I like you got it to work in the temp directory and in fact got the program.bat file to work as long as I put it under the temp directory, but when I switched out to my TestWin directory it wouldn't work, so I removed everything from the directory except the batch file it self and it work. What I found out after adding files in one at a time is that the person had a file called "Test" with no file extension in there "c:\TestWin\" directory. Removing this file made it work. Putting the file back broke it. So it appeares that when teststand was running it followed the path saw a space and attempted to grab the "Test" file instead of bro
    wsing into the "Test Files" directory. If you create a file in your temp directory called "temp" with no file extension you will see the same problem. Thank you for your help.

  • Running batch files thraugh java by passing parameters

    Hi
    I want to run a batch file by passing some parameters.
    Eg: copy.bat "D:\live\hoe.txt" "D:\test"
    while doing this from command prompt its working and i have written some java code for running this batch file.
    String live="D:\\live\\how.txt";
    String test="D:\\test";
    String bat="D:\\copy.bat";
    String[] command = new String[3];
    command[0] = bat;
    command[1] = live;
    command[2] = test;
    try {
    Runtime.getRuntime().exec(command);
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    but this time its not copying the file;
    Please help.

    Just another cross poster.
    [http://www.java-forums.org/new-java/15005-running-batch-files-thraugh-java-passing-parameters.html]
    db

  • How to run .cmd file from a Powershell script

    Hi,
    I would like to know how I run commands from a powershell script? how to use the invoke-command?
    This powershell script doesnt work for me
    Invoke-Command C:\setup.cmd -ArgumentList install-setupforced

    To run a batch file from powershell, just type its name with arguments. I'd recommend explicitly including the .CMD file type and, if it is located in the current folder, powershell rules require you to explicitly say so, i.e.:
       ./mybatch.cmd inputfile.txt outputfile.txt
    To run a single cmd.exe command, just prefix it with cmd.exe /c as Mike says:
        cmd.exe /c color 48
    to run a series of "&"- separated cmd.exe commands you need to enclose the complete command string in double quotes:
        cmd.exe /c "color 37 & dir"
    Beyond that it can get complicated due to various characters that are special to powershell and those special to cmd.exe. If you need to run a series of cmd.exe commands, your best short term bet is to put them in a batch file. The best long-term bet is
    to move more completely to the powershell way of doing things...
    Al Dunbar -- remember to 'mark or propose as answer' or 'vote as helpful' as appropriate.

  • PDQ - run batch file on user current folder...

    Hi,
    I'm running batch file:
    cd %USERPROFILE%\AppData\Local\Microsoft\Windows\Temporary Internet Files\
    but it's not opening the current logged on user
    how to deploy it on current logged on user?
    thanks,,,
    This topic first appeared in the Spiceworks Community

    This is not working for me in Windows 8.  I have a shortcut to an EXE file located in"C:\Users\admin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup".  If I set the shortcut to run as administrator (screenshot attached) then it does
    not run at all on startup.  If I uncheckmark "Run as Administrator" then it starts fine (but does not have enough privileges to do what it needs to do).  In Windows 7 this was not an issue since the current user was a local administrator and did
    not need to elevate its privileges further.
    Any ideas how I can work around this problem?  Thanks!
    Ugh... it won't let me attach a screenshot until my "account is verified", whatever that means.

Maybe you are looking for

  • Sharing internet from macbook pr

    I have a sprint wireless card for my internet connected to the express slot in my MBP. Previously, I turned on internet sharing in the system preferences and shared from my express card to ethernet. The ethernet would connect to the wan port on the A

  • How to get JAX-WS server to generate SSL endpoint URLs?

    Working on a project which requires web services in an SSL environment. But the soap:address location attribute it creates is for http, not https. How do I configure jax-ws so that the wsdl it generates has the correct https urls? I do not explicitly

  • Process order  TECO cannot be done

    Dear Gurus When I am trying to do teco of a particular process order the message is coming like this. System status CRCR is active (ORD 1000045) Message no. BS013 Diagnosis Object ORD 1000045 has system status CRCR (Control recipe created). According

  • Adusting Bridge Window Panel size/positions

    How do I adjust the window panels in Bridge horizontally?  It is easy to adjust the width of them vertically, but I cannot recall how to adjust them horizontally.  I had to Reset Preferences and cannot seem to figure out how to "stack" the window pan

  • Is the LDC package actually LDC?

    For those of you that don't know what ldc is, its a llvm front-end for D. There is a package for it in aur, and looks legit enough looking at the comment and dependances, but the package doesn't seem to install ldc. There is no ldc binary (there shou