Launch a .bat file??

How do I get a button to launch a .bat file when clicked??
Thank you

The Open command should launch a bat file.

Similar Messages

  • Easier to launch using bat files?

    Isn't it really easy to launch Java using a bat file? There seems to be alot of discussion regarding exe files etc. but it seem to me that it works well using a bat file. That way you can use the -cp to set the classpath too if needed.
    Would it be possible to write code that checks the JVM and prompts the user to download the version required? Or possible to write a bat to launch a Java file, or even an applet to do the same thing.
    I need to distribute an application at work, but the install can't be any harder than a couple of clicks!
    Thanks,

    On the subject of jar files; I am having trouble
    running my app through a jar file because are probs
    with the manifest file. I know that I have to edit my
    manifest file to name, I believe, the method of my
    main class.
    howover , I did edit this file ( checked via textpad)
    and it had the two entries - one the default spiel
    about version and
    2) the line Main-Class: my methodyou have to enter the class name (without fileextension), not a method name.
    Main-Class: MyOwnClass

  • Running bat-files from Java

    Hello,
    I have been trying to launch a bat-file from my Java code, running under windows, but with no success.
    Here is my simple code:
    Runtime.getRuntime().exec(new String[] {
             "C:\\temp\\test.bat"
          });This does nothing at all and generates no exception. Any suggestions?

    It seems java has a real problem with this... if you
    want to run another java program, for instance, you
    cannot do that either with String cmd="cmd.exe /C
    java myProgram"
    I need to pass parameters from one program into the
    program I'm going to open using java, that is why I
    need to call it from my first program. It can open
    executables and shortcuts, but has a real big problem
    doing things with the command line.No it doesn't have a problem with it. You just must be doing something wrong. By the way, since "java(.exe)" is already an executable, there's little value in wrapping that by the "cmd.exe" shell (unless you want to use the command shell for some reason such as passing the redirector (>) symbols to it to let it redirect stdout / stderr to a file)

  • Convert .bat file to .msi

    Hi everyone!
    Please help....
    The case is that I first have to run a batch file (which takes about 2
    minutes, because it removes an application) and then AFTER it has run, I
    need to run an application packet. I know that it should be possible to
    just write the batch script into the "launch before" script of the app.
    packet. But it doesnt work. So therefore I will try to convert the .bat
    file into a .msi packet. In that way I can use the "depend on another
    app.packet"-function.
    So please does anyone know how to convert from .bat to .msi?
    Or maybe another solution?
    THANKS!!!
    Chrisitan

    Yes I´m deleting directories. Actually it´s uninstalling one anti virus,
    so it can install another vendors anti virus.
    But I solved the problem. I put an # before launching the .bat file in
    the login script.
    And after that I used Zenworks to distribute the app. packet.
    Since the .bat file takes about 2 minutes to run I added a copy of a
    simply file from the
    server to the computers harddrive. Then I use a "if exist....else goto
    exit" script. In that
    way it won´t run the .bat file on every login.
    But I still don´t understand why the "launch before" can´t read the .bat
    file script.
    But anyway....thanks for your reply....this case is solved.
    Marcus Breiden wrote:
    > Christian wrote:
    >
    >> Hi everyone!
    >> Please help....
    >>
    >> The case is that I first have to run a batch file (which takes about 2
    >> minutes, because it removes an application) and then AFTER it has run, I
    >> need to run an application packet. I know that it should be possible to
    >> just write the batch script into the "launch before" script of the app.
    >> packet. But it doesn?t work. So therefore I will try to convert the .bat
    >> file into a .msi packet. In that way I can use the "depend on another
    >> app.packet"-function.
    >
    > hmm... are you deleting directories? I would really try to get that batch to
    > run.. could you post it?
    >
    >> So please does anyone know how to convert from .bat to .msi?
    >> Or maybe another solution?
    >>
    > Software Packing which is part of the suite would allow that, but it would
    > only remove existing files... so if you delete a dir with 4 files during
    > creating of the msi it would afterwards only delete that dir with those 4
    > files... no other files..
    >
    > not a good approach IMHO..

  • Launch Java app through a bat file

    Hi,
    Because I have to launch my Java App through a batch file, I don't know if I can create a new java class to execute this bat file to launch my Java App? Is that gonna work?
    Henry.

    Yes I created a batch file and tested. If I execute my batch file, the java app will be lauched as expected.
    Here is my java class that execute my batch file
    import java.io.*;
    public class LaunchTest {
    public static void main(String args[])
    String cmd[] = new String[3];
    try
    String osName = System.getProperty("os.name" );
    //System will detect current operating system
    if( osName.equals( "Windows NT" ) || osName.equals( "Windows 2000" ) )
    cmd[0] = "cmd.exe" ;
    cmd[1] = "/C";
    cmd[2] = "c:\\Run.bat"; //Run.bat will set classpath and launch my java app
    else if( osName.equals( "Windows 95" ) || osName.equals( "Windows 98" ) )
    cmd[0] = "command.exe" ;
    cmd[1] = "/C";
    cmd[2] = "c:\\Run.bat";//Run.bat will set classpath and launch my java app
    Runtime rt = Runtime.getRuntime();
    //running the commands
    Process proc = rt.exec(cmd);
    // any error message?
    StreamGobbler errorGobbler = new
    StreamGobbler(proc.getErrorStream(), "ERROR");
    // kick them off
    errorGobbler.start();
                   // any error???
    int exitVal = proc.waitFor();
    catch (Throwable t)
    t.printStackTrace();
    System.out.println("error...");
    And here is my batch file
    @echo off
    set path=e:\jbuilder4\jdk1.3\bin
    set classpath=E:\JBuilder4\jdom-b7\jdom-b7\build\jdom.jar;E:\JBuilder4\jdom-b7\jdom-b7\lib\xerces.jar;.
    d:
    cd AutoTest\classes
    java FirmwareTestPack.FirmwareMainClass
    exit
    When I run the java class above, Dos prompt popped up for a second then disappeared. It did not launch my Firmware pplication.
    Thank you.

  • Can only launch sqlDev 3.0 via .bat file

    I just downloaded 3.0 and extracted to a new folder. (winXP) The older version worked fine. Whenever I launch sqldeveloper.exe, I get " UNable to create an instance of the Java Virtual Machine"
    However, I am able to successfully launch when executing the sqldeveloper.bat file. AM I missing a configuration step?

    Make sure you're pointing to a 1.6 JDK in \sqldeveloper\bin\sqldeveloper.conf or delete the entry to get prompted to browse for it on next startup:
    SetJavaHome C:\Archivos de programa\Java\jdk1.6.0_16Hope that helps,
    K.

  • Firefox Does Not Open a Link Pointing to a .bat file on a the network drive on local website

    Make and model of network drive?
    --HP Priliant DL580 G5
    How is you network set up?
    --Novell Netware 6.5
    What router are you using?
    --Cisco router c3825
    What are you trying to do with the batch file?
    --simple program that launches a batch file that is in the network drive
    Interent Explorer shows the following when launching the link.
    >File Download-Security Warning
    >do you want to run or save this file?
    >Name: johndoe.bat
    >Type: MS-DOS Batch File, 308 bytes
    >From T:\xx\xxxbat
    Has this worked in previous versions of FireFox?
    >no and it does not work with newer v11.
    Whats the issue with using IE if it works from IE?
    >we have users that use FF on regular bases and just for a link to switch browser it is not user friendly. all though we are supporting two browsers we do not want to take FF out of network.
    Is there a reason you want to use FireFox?
    >FF has gained popularity in our agency and it would be best to have this link work on FF as well.
    --HERE IS THE CODE--
    <td valign="top"><a href="file:///T:/Geosupport Desktop Edition/bat/Goat.bat"
    type="application/bat" target="_blank"><img src="../../images/technology/Goat.gif" alt="Goat" width="32" height="28" hspace="4" vspace="2" border="0" align="left"></a>Geosupport On-Line Address Translator, or GOAT, is an interactive Windows application that allows the user to request geographic data through Geosupport function calls. Use of GOAT requires no programming skills and provides valuable information to the casual user.<br>

    Firefox sees that (at least local or network dive located) .bat files are text and renders them as such. To download it as a .bat file, use save page as, (or Control-S) change "text file" to "all files" and type .bat onto the end of the filename, then hit save. Not ideal I know, but better than nothing.

  • How to call a java class in a bat file

    Hi
    I need to call a Test.java class in a bat files .It refer .DOM.jar
    in C:/url; How do i call the java class i need the syntax
    Thanks lot

    assuming lanch.bat, Test.class and DOM.jar are in c:\url
    assuming %JAVA_HOME% is defined (else substitue it with your java installation directory)
    here is the content of launch.bat:
    cd C:/url (or cd c:\url ) (or cd c: followed by cd url)
    %JAVA_HOME%\bin java -classpath .;DOM.jar Test
    hop that'd help,
    marvinrouge

  • Starting CS4 from bat file

    I can successfully start Photoshop from a .bat file (.bat file has the line "START Photoshop") when I'm logged onto my Vista user account.  But when I switch to the guest account and the bat file continues to run in my normal user session, it is unable to launch Photoshop.  A Microsoft Windows error box reports: "Adobe Photoshop CS4 has stopped working".  I'm able to start Bridge or notepad with this method, that is, with the bat file running in my normal account while logged in to the guest account.  Seems you have to be logged on directly for PS to launch.  Any experience with this?

    On what operating system? windows xp professional
    What script ? Ms Dos script (.bat file)
    With what version of Oracle? Oracle 9i
    and why would you want to? Every month I need a job which when called will load a certain file from a predefined path to the target Oracle database using sql loader.
    I haave not worked with control files in the recent past and have a faded memory regarding this usage.
    All i remeber is calling sqlldr from cmd prompt specifying the ctl files and stuff......
    any other ideas are welcome..... thnkx!

  • Need to run powershell script in a bat file

    I have a ps1 file with the following:
    Get-ADUser -Filter * -SearchBase "ou=<HOSPOU>,ou=Domain Users and Groups,dc=<hospdomain>,dc=local" -Properties Description,EmailAddress| Select-Object -Property Name,SamAccountName,Description,EmailAddress|Export-Csv "\\<server>\home2$\information
    services\IS STAFF\Documentation\AD Info\smcusers.csv";
    I have a bat file:
    @ECHO OFF
    SET ThisScriptsDirectory=%~dp0
    SET PowerShellScriptPath=%ThisScriptsDirectory%smcusers.ps1
    %windir%\system32\WindowsPowerShell\v1.0\powershell.exe -noexit -command import-module ActiveDirectory "%PowerShellScriptPath%";
    But while it launches powershell with the AD module, It apparently cannot read the ps1 file.
    I get:
    H:\>C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -noexit -command i
    mport-module ActiveDirectory "H:\smcusers.ps1";
    Import-Module : A positional parameter cannot be found that accepts argument 'H
    :\smcusers.ps1'.
    At line:1 char:14
    + import-module <<<<  ActiveDirectory H:\smcusers.ps1;
        + CategoryInfo          : InvalidArgument: (:) [Import-Module], ParameterB
       indingException
        + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell
       .Commands.ImportModuleCommand
    I have tried to modify the parameters 
    %windir%\system32\WindowsPowerShell\v1.0\powershell.exe -noexit -command import-module ActiveDirectory -File "%PowerShellScriptPath%";
    Still no luck.
    I need to be able to run this as a scheduled task.
    Karon W

    Apparently I don't know where to put everything.
    I have a single line:
    %windir%\system32\WindowsPowerShell\v1.0\powershell.exe -noexit import-module ActiveDirectory; -Command {Get-ADUser -Filter * -SearchBase "ou=Shannon Memorial,ou=Domain Users and Groups,dc=shannonhealth,dc=local" -Properties Description,EmailAddress|Select-Object
    -Property Name,SamAccountName,Description,EmailAddress|Export-Csv "\\svr-resource2\home2$\information services\IS STAFF\Documentation\AD Info\smcusers.csv"}
    This is the response:
    H:\>C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -noexit import-mod
    ule ActiveDirectory; -Command {Get-ADUser -Filter * -SearchBase "ou=Shannon Memo
    rial,ou=Domain Users and Groups,dc=shannonhealth,dc=local" -Properties Descripti
    on,EmailAddress  | Select-Object -Property Name,SamAccountName,Description,Email
    Address  | Export-Csv "\\svr-resource2\home2$\information services\IS STAFF\Docu
    mentation\AD Info\smcusers.csv"}
    'Select-Object' is not recognized as an internal or external command,
    operable program or batch file.
    I modified to 2 lines:
    %windir%\system32\WindowsPowerShell\v1.0\powershell.exe -noexit import-module ActiveDirectory;
    Get-ADUser -Filter * -SearchBase "ou=Shannon Memorial,ou=Domain Users and Groups,dc=shannonhealth,dc=local" -Properties Description,EmailAddress|Select-Object -Property Name,SamAccountName,Description,EmailAddress|Export-Csv "\\svr-resource2\home2$\information
    services\IS STAFF\Documentation\AD Info\smcusers.csv"
    This is the response:
    H:\>C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -noexit import-mod
    ule ActiveDirectory;
    PS H:\> exit ************I had to type*****************
    H:\>Get-ADUser -Filter * -SearchBase "ou=Shannon Memorial,ou=Domain Users and Gr
    oups,dc=shannonhealth,dc=local" -Properties Description,EmailAddress  | Select-O
    bject -Property Name,SamAccountName,Description,EmailAddress  | Export-Csv "\\sv
    r-resource2\home2$\information services\IS STAFF\Documentation\AD Info\smcusers.
    csv"
    'Get-ADUser' is not recognized as an internal or external command,
    operable program or batch file.
    If I paste the command in before I type exit, it works. 
    If I paste:
    %windir%\system32\WindowsPowerShell\v1.0\powershell.exe -noexit import-module ActiveDirectory;
    I am put in the ad powereshell
    Then I paste:
    Get-ADUser -Filter * -SearchBase "ou=Shannon Memorial,ou=Domain Users and Groups,dc=shannonhealth,dc=local" -Properties Description,EmailAddress|Select-Object -Property Name,SamAccountName,Description,EmailAddress|Export-Csv "\\svr-resource2\home2$\information
    services\IS STAFF\Documentation\AD Info\smcusers.csv"
    and I get the expected output.
    What do I need to have in the bat file so the 2nd line of the script will run? and where does it go?
    Karon W

  • Bat file shortcut can't be pinned to taskbar

    After fighting a running battle with the Truvero virus* I've finally give up. I have notice that it append "Search.net"
    to all my browser shortcuts but it leaves the exe file alone, so I dont get that Bing search Engine and Truvero on start up. 
    So I created a bat file that runs the chrome.exe file and saved it to the desktop. It works great but when i try to pin it to the
    taskbar I can't. Same for a shortcut to the bat file. 
    Why can't I do this? Is there a script that Win 7 recognizes that will pin to the taskbar?
    * I know Truvero is not really a virus, but it's just as hard to get rid of.
    Thanks,
    P3aul

    Hi,
    How is the current situation? I suggest you use your anti-virus to scan the whole computer.
    Is Truvero a file or something else?
    According to your description, it seems that your Internet Explorer can't work fine.
    If I am right, please let me know what's the symptoms when you attempt to launch Internet Explorer.
    If your computer works fine before, the easier way to resolve the issue is to use system restore to roll back to a previous time when everything worked fine.
    Karen Hu
    TechNet Community Support

  • .bat file startup

    I have used a setup wizard that someone has suggested after doing a search through the forum. Now my problem is I want to automatically set up the path on various machines!! These are a mixture of XP 98 and I don't always know but I can assume they will be running some version of Windows. I have created a .bat file but I have 2 problems.
    1) Can the path be set up like this on an XP machine?
    2) If they install a different version of the JRE then how can I specify the exact directory for the path if I don't know what it is on their machine??
    My .bat file is
    @ECHO OFF
    SET PATH=%PATH%;c:\jdk1.3.0_02\bin;
    SET WFDB=.
    Is there a way to get around this

    Hi,
    Try below thing:
    "If your UAC on Windows 2008 is enabled (if you didn't switch it off) you have to start sapehpi using a security elevated cmd.exe:
    Start -> execute -> cmd.exe --> press CTRLSHIFTENTER and confirm the dialog box.
    This is due to the new security model in Windows 2008.
    You can switch to ""Windows 2003 mode"" by executing ""msconfig"", scrolling down and launching ""disable UAC"" and reboot."
    Please paste the result here.
    Thanks
    Sunny

  • Can not run business rule with bat file

    Hi all,
    I've problem with using *.bat file to run business rule. My Essbase version is 11.1.1.3 and the syntax within
    *.bat is simple, but I always got the Usage message and can not execute the rule.
    The error result as blow(I already execute the syntax in command panel directly):
    C:\Hyperion\products\Essbase\eas\console\bin>CmdLnLauncher -SWILSON -Usynadmin -P111111 -r0004_COPYDATA
    Usage: CmdLineLauncher [-p:<passwordFile>] -Sservername -Uusername [-rBusiness R
    ule Name | -sSequence Name] [-fRun Time Prompts file] [-validate]
    My *.bat file content as below:
    cd c:\Hyperion\products\Essbase\eas\console\bin
    call CmdLnLauncher -SWILSON -Usynadmin -P1111111 -r0004_COPYDATA
    Is there something wrong? If anyone know about this problem, please help,thanks!!

    Hi,
    Here is a brief overview on how to use the command line launcher.
    You can create a file and put the following information into it filling in the servername,app name and db name
    ExecDB::"Planning/servername/appname/dbname"
    Save it as .xml file (don’t think it has to be an xml, could be .txt), so something like connect.xml
    Then when you run your command line do exactly like before Cmdlnlauncher -Sservername -Uusername -p:password.txt -rrule -fconnect.xml
    If you have variables in your rule you can
    In EAS right click over the rule and select "Automate Launch Variables", fill in the details and then save it is as an xml.
    You just need to reference the xml in the batch script as described above using the -f parameter, for sequences remove -rrule and use –sSequence
    update password.txt to the name of your password file.
    Cheers
    John
    http://john-goodwin.blogspot.com/
    Edited by: JohnGoodwin on Apr 30, 2010 8:17 AM

  • Running .bat files

    Hello,
    I recently uninstalled my Google Chrome to then reinstall it. Ever since, I have .bat files that used to open in Windows Explorer that now open new tabs in Google Chrome. How do I stop that from happening? I want the .bat files to open in Windows Explorer
    just like before. I already tried adding the batfile zip folder (that you guys created) in the registry and no change.
    Thanks in advance for the help.

    Could you please tell us the function of these .bat files? What application are these .bat files will launch? I suggest you check the default "open method" of these applications.
    Click Control Panel>Default Program, then set your default programs.
    Regards
    Yolanda
    TechNet Community Support

  • Not able to view the window when I run cim.bat file

    I have installed ATG web Commerce 10.0.3 and I need to configure MySql. For that I need to Start CIM by running the following file: <ATGdir>\home\bin\cim.bat and later I have to Type P to choose the products to configure, at a minimum ATG Platform and ATG Content Administration. But when I am not able to view the window to proceed further when I run thecim.bat file.Please let me know if anyone has any idea about this.

    Hi,
    Please find the error log while running in the command prompt.
    C:\Documents and Settings\******>c:\ATG\ATG10.0.3\home\bin\cim.bat
    Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version n
    umber in .class file
    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$100(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:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at atg.core.util.BeanUtils.instantiate(BeanUtils.java:427)
    at atg.core.util.BeanUtils.getBeanInfo(BeanUtils.java:395)
    at atg.nucleus.SimpleComponentState.getComponentClassDescriptor(SimpleCo
    mponentState.java:547)
    at atg.nucleus.SimpleComponentState.<init>(SimpleComponentState.java:91)
    at atg.nucleus.SimpleConfigurationState.<init>(SimpleConfigurationState.
    java:93)
    at atg.nucleus.PropertyConfiguration.configureService(PropertyConfigurat
    ion.java:756)
    at atg.nucleus.Nucleus.<init>(Nucleus.java:832)
    at atg.nucleus.Nucleus.<init>(Nucleus.java:717)
    at atg.nucleus.Nucleus.startNucleusCheckLicense(Nucleus.java:4144)
    at atg.nucleus.Nucleus.startNucleus(Nucleus.java:4021)
    at atg.cim.SessionContext.startNucleus(SessionContext.java:632)
    at atg.cim.SessionContext.startNucleus(SessionContext.java:610)
    at atg.cim.flow.CimFlowCreator.startDefaultCimFlow(CimFlowCreator.java:7
    4)
    at atg.cim.Launcher.startCimFlow(Launcher.java:168)
    at atg.cim.Launcher.main(Launcher.java:68)

Maybe you are looking for

  • Sales order cost estimate

    hi, While saving the sales order cost estimate its getting the GL account from GBB-ZG0. as we assigned Balance sheet account its asking the cost element. can you please explain what is link to get the gl from GBB-ZGO, can we change this to pick from

  • When I initially open Firefox it opens 2 tabs. One is my home page and the other is another bookmark but I do not know why it is happening or how to stop it.

    When I open Firefox 2 tabs always open. One is my homepage and the other is another page that I have bookmarked. I do not know why this happens or how to fix it. == This happened == Every time Firefox opened == first installed

  • How to get a single row column from a viewobject in java?

    I have a class file that goes out and gets a viewobject and sets its where clause this is it: vcRow = vc.createViewCriteriaRow(); vcRow.setAttribute("LogonId", "='" + strPcis_Login.toUpperCase() + "'"); vc.addElement(vcRow); vo.applyViewCriteria(vc);

  • 6120 messages problem

    When I got the phone it had the most recent messages at the top but now for the inbox and sent messages they are sort of in the middle of all my messages. I Noticed the sort option but when I select by date or any of the options nothing happens. I ha

  • PO Conditons changes table

    Dear all, I have one requirement saying that whenever anyone amending the po it should trigger a mail to the higher authorities. For this one i can get althose details except conditon split up. CDPOS i can get the net value item (total value of the i