How to  execute Registry file ?

Any one can help me how can run a Registry file at runtime using java code,
any one helpme please send me one example immediately.

>>
Any one can help me how can run a Registry file at
at runtime using java code,
any one helpme please send me one example
ple immediately.In Windows operating systems, you can use the "start"
command to do this.
(NOTE: "cmd" is the command interpreter for Windows
NT/2000/etc., "command" for Windows 95/98/ME). You
can determine which command shell to use by examining
the comspec environment variable).
   Runtime.getRuntim().exec("cmd /c start foo.reg");
Oh, and if you want to wait until the .reg file is processed, just use:   Runtime.getRuntim().exec("cmd /c start /wait foo.reg");

Similar Messages

  • APEX: How to execute Script file from APEX

    Hello All,
    Can anyone tell me how to execute script file from APEX?(Step by Step process)
    Thanks & Regards,
    Jiten Pansara

    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21677/sql_rep.htm#AEUTL193
    Regards,

  • How to execute batch file from JSP

    hi frens !
    i wanna know how to execute batch file from my JSP.i am using exec() method to get call the batch file. but its not working ....plz help
    here mine code:-
    File F = new File("C:/var.bat");
         try{
          if (F.exists())
            Runtime rt = Runtime.getRuntime();
            String url=F.getAbsolutePath();
             Process proc = rt.exec(url);
            proc.waitFor();
            proc.destroy();
            catch(Exception IOEx){
           System.out.println(IOEx);
      }Thanks and Regards
    Allwyn

    You might improve your chances of getting help if you do two things:
    1) Explain what "not working" means.
    2) ChangeSystem.out.println(IOEx); to IOEx.printStackTrace(); (in the eventhat is in fact related to "not working").

  • How to execute .sql file in Stored Procedure?

    Hi,
    I have an urgent requirement, where i have to execute .sql file form Stored Procedure.
    This .sql file will have set of update statement. I need to pass value to this update statement.
    Kindly please help me.
    Regards,
    Irfan

    This is required as part of Data Migration where  i have to do 100 of table's update. Each time update table will defer, so its better to have in separate script file (.sql). Can u paste some sample/syntax to exceute .sql file from stored procedure. I am new to this PL/SQL.
    How have you determined that it's "better" to have seperate scripts?  I assume you mean the table name will "differ" (and not "defer" - I assume that's just because English isn't your first language? no problem - I think I understand what you're asking).
    So what I think you're asking is that you have dynamic table names but each table needs to be updated in the same way?
    Question: Why do you have tables with different names that all need the same process doing to them?
    Assuming it's a valid requirement (and 99% of the time doing dynamic coding implies it's not).... you could use dynamic code, rather than 'scripts'...
    e.g.
    create procedure update_table(tbl_name varchar2) is
    begin
      execute immediate 'update '||tbl_name||' set lastupdate = null';
    end;
    As you haven't bothered to provide a database version, any example code/data or explanation of what you're actually doing, you're not going to get any detailed answer.  Please do take the time to read the FAQ and post appropriate details so people can help you.

  • How to execute jar file in java project

    hi,
    i have made a proj in java in which i have put all my files in a jar file.
    can somebody help me how to execute this jar file??
    thanks

    u can put that jar file in ur class path,,
    regards
    shanu

  • How to execute .msi files from java program

    Hi friends,
    i have written a java program which invokes and thereby execute any executable files like .exe and .bat.
    So its working fine with .exe and .bat files, but it is not working with .msi files.......can you please help me how can i execute .msi files as well??
    public class Executeexe {
         public static void main(String ar[])
              try
              Process p=null;
              Runtime rt=Runtime.getRuntime();
              p=rt.exec("D:\\mysql-essential-5.0.83-win32.msi");
              p.waitFor();
    catch(Exception e)
    }here is the program

    Make sure that the command that's being exec'd works from the cmd line.
    Then read this article and do what it says:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    Then if you still are having problems explain what "...it is not working with .msi files..." really means, and provide a [SSCCE Example program|http://mindprod.com/jgloss/sscce.html]

  • How to apply registry file using MDT task sequence

    Hi, I have exported the registry file and now i want to use this registry file in MDT TS so that the same changes will be deployed to all the user. How can i use registry file in MDT TS

    A simple way would be to place the file on the network and run cmd sequence
    regedit.exe /s \\xxx.xxx.xxx.xx\share\test.reg
    Best Regards,
    Jesper Vindum, Denmark
    Systems Administrator
    Help the forum: Monitor(alert) your threads and vote helpful replies or mark them as answer, if it helps solving your problem.

  • How to execute a file using jsp or java

    hi..
    i had a jsp file as front end with start and stop button,
    if i click the start button a file on my pc should execute.
    if stop button is clicked the file should stop execution.
    Any one know how to do this..especially how to run a file in ur system using java..
    Thanks in advance

    thanks for u r quick replies...
    Actually i want to run a file on a client machine
    only...
    Okay.
    for example, a client should execute a file which is
    in another client...
    This is not the same thing as what you just said.
    can u tell me the method to execute the file......java.lang.Runtime.exec

  • How to execute exe file from pl/sql

    How to execute an exe file or an operating system command from pl/sql in oracle 9i.

    If it is part of a pl/sql block, use the java suggestion. If you are not in a blck, you can use the "HOST" command. see
    http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a82950/ch2.htm#1001697

  • Error : How to execute *.BAT file

    Some of the friend said me to execute any file following code
    Runtime rt=Runtime.getRuntime();
    Process pr=null;
    pr = rt.exec("cmd.exe /c start " + "myfilename");
    I get error as
    CreateProcess: cmd.exe /c start myfilename error=0
    Press any key to continue . . .
    what is cmd.exe /c start in exec().
    Thanks..

    hi Bhavin
    try this code because i had the same problem an d this thing works for me here is the code
        // Get file name
        String File_Name = // What ever yr file name get as String
        // Get Operating System Name
        String os_name = System.getProperty("os.name");
        os_name = os_name.toUpperCase();
        // Declare command as array of string
        String[] command ;
        // on Windows XP, NT, 2000 command is different and on win 98, 95 is different
        if(os_name.indexOf("XP") != -1){
             command = new String[] {"cmd", "/C", "start", "\"\"", File_Name};
        else if(os_name.indexOf("NT") != -1){
             command =new String[] {"cmd", "/C", "start", "\"\"", File_Name};
        else if(os_name.indexOf("2000") != -1){
             command = new String[] {"cmd", "/C", "start", "\"\"", File_Name};
        else  {
             command = new String[] {"start", "\"\"", File_Name};
        try
            // Run the commands using Runtime
            Process process = Runtime.getRuntime().exec(command);
        catch(IOException ioe)
            //show Error message
                  JOptionPane.showMessageDialog((Component) null,
                                          "Unable to Locate the file..."+
                                          "\n"+ioe.getMessage(),
                                          "Error...",
                                          JOptionPane.ERROR_MESSAGE);
        }Regards
    Satinderjit

  • How to execute sql file from servlet

    Hi,
    I am using JSP, Servlets and Oracle 8i in my application. I want to execute .sql file from java code. Is it possible to do that,
    as we execute .sql file from sql plus prompt.
    Suppose I have abc.sql file and I want to execute it from java code.
    If any body have the solution then pl. reply with sample code.
    Thanks,
    Rajesh

    If any body have the solution then pl. reply with
    sample code.No, no, dec - s/he doesn't want the actual solution, but the full code!
    /k1

  • How to execute .sql file

    hi,
    i want to execute .sql files in sql plus from a fixed location whether it may be network location or from system drive. so that i can use it from other computers when i will be working on different pc.
    so please tell me for network location solution and from drive. by default it fetch from BIN directory
    i am using oracle 10g.
    thanks

    Hi FRNzzz!! wrote:
    if the .sql files are placed on some network place then also i just need to put the path of that directory ? Sure. You can either set up a desktop shortcut for SQL*Plus using the remote folder as the "Start in" location, or (what I usually do) drag the script file into your SQL*Plus window.
    Edited by: William Robertson on Feb 26, 2011 2:21 PM

  • How to execute .sql file using ODI

    Hi All,
    I need to execute .sql file using ODI.
    I tried @{path}{file} command in ODI procedure selecting oracle technology.but it is failing.
    Do any one have any other idea to execute .sql file.
    Thanks in advance

    Ohk...I think you can try creating batch file(.bat) if its Windows & call that from ODIOSCommand.
    The bat file should contain scripts which call .sql file using sqlplus  & there you can use @{path}{file} format.
    See if this helps.
    Regards,
    Santy

  • How to execute ".exe" files using java

    Hi,
      This is guruvulu,
         I have a problem in executing ".exe" files.For Example InternetExplorer.

    Hi,
    You can execute .exe files in JAVA using the following code.
    Runtime rt1 = Runtime.getRuntime();
    Process pc = rt1.exec("someexe.exe");
    you can get the output of the executed exe file in
    in = pc.getInputStream(); //this returns a InputStream
    hope this solves your problem.
    regards,
    P.Venkat

  • How to execute batch files or command in JSP environment

    Hi,
    I am new to Java in general and JSP too.
    I have an application that uses JSP code i need to make it run or execute a number of batch files that run under command prompt (ms-dos)?
    Can you provide me with sample code on how to do this?

    Simply put, you can't do that.
    (Outputs from executing .BATs can be used in a response strings, though.)
    Learn Java and JSP/Servlet basics.

Maybe you are looking for

  • Unloading Native Libraries in java

    Hi all, This is what i have read from a document. The VM calls JNI_OnUnload when the class loader containing the native library is garbage collected. When the class loader containing the native library is garbage collected, will the native library ge

  • KM Windows Drive

    Hi, We are trying to create a new file system repository on our Portal (EP 7.0 SPS 12) server, which isUNIX based and the file system repository is Windows based. The reference document we are following is: http://help.sap.com/saphelp_nw2004s/helpdat

  • Standby redolog files

    Hi I think standby redolog files are not required if I open the physical standby database in read/write mode by using flashback database techonology. Kindly let me know if I am wrong.

  • ME38 - Scheduling Agreements

    Hi Experts, In ME38 for the line items we are scheduling the line items internally for every line item. So when saved after scheduling spool is generated and we are able to see the output of a form. We would like to know which is the script configure

  • Updating KM Workflow "status"

    Hi All, As per KM workflow when documents are created its status is "In Process" after it is submitted for approval its status is "Awaiting Approval". The below code is to change the "Status" of document from "In Process" to "Awaiting Approval", but