Dot BAT files in Windows 8.1

How do you activate the dot Bat file for execution on the workspace and/or in the startup menu?
Jim

Hi Jim,
Could you please explain a bit for the activate here refers to?
If you mean to run the bat files, we may consider take use of group policy to run it at startup, or use the Scheduled Tasks, for more information, please check the articles below:
Use Startup, Shutdown, Logon, and Logoff Scripts
Batch Files – Basic Error Checking and Running as Scheduled Tasks
If I have any misunderstandings, please feel free to let me know.
Best regards
Michael Shao
TechNet Community Support

Similar Messages

  • Run .bat file as windows service

    want to ran a .bat file as windows service kindly help me on this through step by step guide.

    Wrong forum. This one is for Forum Issues. So we could move it if you have a forum in mind.
    Thanks!
    Ed Price, Power BI & SQL Server Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • How do I reset the default file association for .bat files on Windows 8.1?

    Windows 8.1 allows the user to change the file association for .bat files. I made the mistake of using this facility to change the default file association for .bat files to Notepad++. Now when I attempt to run a .bat file, the script for the .bat
    comes up in Notepad++, instead of its being run as an executable file!  All my .bat files are now useless. I tried finding a way to change this back to the original executable setting, including deleting Notepad++ from my system, but nothing
    has worked. 
    There are discussions that I found on the Internet about this problem, and the solutions to which I was led have not worked either. Most of the solutions apply to Windows 7 or Vista, but not to Windows 8. There are a few solutions that purport to apply to Windows
    8 and 8.1, but they do not work for me.  
    (Disconcertingly, some of the solutions presented for the problem that apply to Vista or Windows 7 and are dated as early as 2009, so this problem has apparently been around for some time, but Microsoft still keeps .bat files on the Control Panel facility that
    enables the change to be made. I cannot see why, but there it remains.)
    Can someone please help me change this file association back to the original setting for Windows 8.1? Remember, most if now all the links that address this issue are focused on Windows 7. I need an answer that has been tried and proven to apply to Windows 8.1.
    Nothing I have tried works.

    Hi,
    For the issue, we can restore Default File Extension Type Associations through adding the registry entries.
    1. Download the .reg file from the following link.
    http://www.eightforums.com/attachments/tutorials/8025d1345781188-default-file-associations-restore-windows-8-bat.reg
    Note: Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.
    2. Save the .reg file to your desktop.
    3. Double click on the downloaded .reg file to Merge it.
    4. If prompted, click on Run, Yes (UAC), Yes, and OK to approve the merge.
    5. Sign out and in, or restart the computer to apply.
    6. If you are logged in as a standard user and this still does not help, then have the administrator also merge the needed .reg file for the listed file extension or protocol below while logged into their administrator account.
    Hope this helps.
    Regards,
    Kelvin hsu
    TechNet Community Support

  • Setting Oracle environment variable using batch (.bat) file in windows

    Hi,
    Oracle 9i db
    Windows OS
    I am in process to create the database (Considered that Oracle9i software is already installed) by running one batch file which consist of all the scripts for the database creation.
    But i also want to set the environment variables at MyComputer(right click)>properties>advance>environment, permenently by running the batch (.bat) file
    ORACLE_HOME
    ORACLE_BASE
    ORACLE_SID
    So, how can it be done ?
    With Regards

    Hi,
    *@echo off*
    set ORACLE_SID=iprsdb
    set ORACLE_BASE=C:\oracle
    set ORACLE_HOME=C:\oracle\ora92     
    call C:\install_bkp\test_env_var.bat
    echo Test Successfull.
    Above mentioned is the code written in the batch (.bat) file
    In that i have also called another .bat file which test the env. variable values which is as below:
    c:\>test_env.bat
    ===================
    Testing oracle sid
    ===================
    iprsdb
    =====================
    Testing oracle base
    ===================
    C:\oracle
    =====================
    Testing oracle home
    =====================
    C:\oracle\ora92
    Test Successfull.
    But when i checked at MyComputer(right click)>properties>advance>environment variables
    there, I saw none of the entries from the above, why so ?
    how to set env. variables permanently using the DOS commands. ?
    With Regards

  • Stopping/Starting Portal via BAT file on Windows

    In our landscape we have the ABAP and JAVA stack installed on separate servers for security reason.  We are trying to implement windows updates via SUS and need to automate the stopping and starting of SAP.  The bat file that was created works when stopping and starting the ABAP portion of SAP but on the Portal server it will take it down but when trying to start Portal, the J2ee Server will not start, but when I use the SAP MMC all servers starts up without any problem.  Below is the start up bat file, any assistance will be greatly appreciated:
    REM start of script
    PATH=%path%;G:\usr\sap\QBE\SYS\exe\uc\NTAMD64
    SET ORACLE_SID=QBE
    SET SAPDATA_HOME=K:\ORACLE\QBE
    REM
    REM
    REM ***** starting Oracle Services *****
    REM
    net start OracleQBE102TNSListener
    net start OracleServiceQBE
    net start OracleQBE102iSQL*Plus
    REM
    REM ***** starting SAP services *****
    REM
    net start SAPOsCol
    net start SAPQBE_00
    net start SAPQBE_01
    REM
    REM ***** starting SAP Instances ******
    REM
    G:\usr\sap\QBE\SYS\exe\uc\NTAMD64\startsap.exe name=QBE nr=00 SAPDIAGHOST=SAPEPQA
    G:\usr\sap\QBE\SYS\exe\uc\NTAMD64\startsap.exe name=QBE nr=01 SAPDIAGHOST=SAPEPQA
    REM
    REM end of script

    I looked up some training material and in TADM10 - Unit4 - Starting and Stopping a SAP NetWeaver AS Java.. the following is stated:
    Under Windows, the SAP system can also be started and stopped without a GUI by
    calling a command by means of the executable files startsap.exe and stopsap.exe. This
    can be done using a simple telnet access.
    To start an instance of the SAP system, open a telnet connection and enter the
    following command: startsap name=<SID> nr=<instance nr.>
    SAPDIAHOST=<hostname>
    To stop an instance of the SAP system, open a telnet connection and enter the
    following command: stopsap name=<SID> nr=<instance nr.>
    SAPDIAHOST=<hostname>
    For the SAPDIAHOST parameter, enter the name of the host on which the instance is
    to be started.
    So the script is correct, its all according to SAP advice... very strange

  • Making bat file in Window Mobile - Oracle application command line

    I have Windows mobile 6.I have installed Cre-ME+, & command line.In the command line we need to type below command & execute to load oracle Mobile Application.
    Command is : \Windows\CrEme\bin\CrEme.exe -Of -classpath \Windows\CrEme\lib\AWTclasses.zip;\XONTMWA\lib\j4205328.zip oracle.apps.mwa.awt.client.StartGUI
    This is working fine.
    But proble is making bat/cmd file to excute this application, without type each & everytime.
    I know that window mobile won't support bat/cmd file extension. But there may be any other ways.
    Please tell me how can i create the bat/cmd file in windows mobile 6.
    Please anybody help me out from this issue.
    I am looking forward your reply.
    Thanks in advance.
    Regards;
    Piraba
    Edited by: user10702520 on Jan 6, 2012 5:06 AM

    We use a third party application (AppCenter) on our Motorola devices. It's a lock down tool that can present only specific application to the user, and can auto-launch the command line (<filename.lnk> in our scenario).
    -Vince

  • Scheduled task won't run .bat file

    Hi. On Windows Server 2008 I have a scheduled task that calls a .bat file. The fist step in the .bat file is write to a log file to the same directory in which the .bat file exists. This allows me to find out if it is ever run. When the .bat file is run from a command prompt it runs as expected writing to the log file and completing its actions. My problem is that when I run the scheduled task manually or allow it to run when scheduled it appears to run but the .bat file is never run. No log file is ever created. The History tab in the properties of the scheduled tasks shows the task being started and running then completing with an operation code of 2. I've disabled the UAC for the user account. I've set the task to run as the Administrator user and verified the permissions for that user. I know the password is correct for the task because I can make changes to the properties and save those changes with the username/password. I'm at a loss for further troubleshooting steps. Can anyone point me in the right direction to figure out why these .bat files are not being run? 

    So I had this problem, I double clicked on the .bat and notepad opened the .bat.  I ran through this whole long and very absorbing thread of this forum.   I wanted to save the entries that were most helpful, so I copied and pasted into
    a notepad document (.txt)  I could not find a way to attach it here, so I copied and pasted that below. I called it a synopsis....  Did I spell that right?
    As you can see, I added my experience at the top (A and B).  The stuff I copied is noted with the original author. This is the first time I posted anything to these here microsoft forums, although I have been telling computers what to do for 40+ years. 
    So hope I did not break any social protocols here.
    ==================================== Begin ====================================
         Running A Dot Bat File in Windows Server 2008 Vista 7 etc and beyond V01
    ============================================================================
    This was created as a synopsis of the entries at the following forum location:
    http://social.technet.microsoft.com/Forums/en/winservermanager/thread/d47d116e-10b9-44f0-9a30-7406c86c2fbe
    A) manually
         This is an opinion added by Thomas Rock
        1) Open a command window (that would be cmd.exe)
        2) In the command window navigate to the directory containing the .bat file and it's dependents
               ex...  C:\Program Files (x86)\Bobs\Your\Uncle
        3) Run the .bat file by typing the name including the .bat extension (in the command window of course)
                 TheBatFile.bat
           Note: Using this method, the .bat file will run in the current command window directory (the directory where the .bat file is located)
                             (this is the key for getting it to run in the task scheduler... Start in folder option)
    B) The double click
                This is an opinion added by Thomas Rock
         1) Using Windows exlporer, find the .bat file
         2) use the mouse or other device to double click on the .bat file
         3) if it does not run (in my case the wordpad application opened the .bat file)
              a) make sure that the .bat file extension is associated with the program c:\windows\system32\cmd.exe
              b) make sure the profile you are using has rights to run the cmd.exe
              c) make sure the profile has the rights to the directories, the .bat and any other objects used or affected by the .bat file processing.
    C) As a task using task scheduler
         Proposed As Answer by Brian Vandemark Wednesday, September 02, 2009 9:36 PM
    1) Make sure that the task is set to "configure for Windows Vista or Windows 2008" on the first page of the task properties (under the "general" tab)
    2) Make sure that the task is set to "start in" the folder that contains the batch file:
          a) open the task properties
          b) click on the "actions" tab
          c) click on the action and then the "edit" button at the bottom. 
          d) In the "Edit Action" Window there is a field for "start in (optional)" that you set to the path to the batch file.
          e) be sure to include an end backslash for the start in path "C:\dir1\dir2\"    (the last backslash is not optional)
    3) Make sure that the task is running as an account that has explicit "Full access" permissions to all these things:
          a) the .bat file itself
          b) the folder containing the .bat file
          c) the target files/folders that are affected by the .bat script. 
               Note:  Inherited permissions did not seem to work.
    4) Make sure that the account running the task is a member of the local "administrators" group for this machine
    5) Make sure that the task is set to "run whether logged on or not"
    6) Tick the box "Run with highest privileges".    
           Note: Point 6 here was from Edson F. Lima Wednesday June 30 2010 1:35 PM
                      The original point 6 was moved to point 7.
    7) The Task should run successfully with expected output when you right-click on the task and select "run" 
            If it does that then it will run successfully when you are logged off.
    D) Still another way as a task using task scheduler
          Proposed As Answer byDarren Wallace Thursday, July 15, 2010 1:41 AM
    This has been bugging me for 6 or 7 months.
    I don't have admin rights to the box and the guy who does is very busy...
    so I've felt the range of emotions mentioned above.
    I tried most everything above as well. But what seemed to get my processes processing, was ...
       • on the General tab, I clicked the Change User or Group button
       • in Select User or Group (first smaller dialog box)  I clicked the Advanced... button
       • in the next Select User or Group (second bigger dialog box) I clicked the Find Now button
       • in the Search results I selected the Administrators (a group) and it returned SERVERname\Administrators into the "Enter the object name to select" entry in the previous dialog box
       • then I clicked OK and returned to the General tab above
       • the options to Run only when user is logged on and Run whether user is logged on or not are no longer available
       • then I made sure that the Run with highest privileges was checked
       • then I clicked OK and during the next scheduled time to run ... it ran
       Note: See note in A) Manually above.
    E) Task scheduler recommendation
         Proposed As Answer byTamusJRoyceThursday, December 01, 2011 3:42 PM
    I have found .bat and .cmd files do not run correctly either.
        My solution:  Don't run the batch file directly. 
           Have TaskScheduler run:  cmd.exe
              with parameter:  /C YourBatchFile.bat
             and start in: C:\SomePath\ (without quotes!) where C:\SomePath\YourBatchFile.bat exists. 
            And then select the radio button for it to run regardless if you are logged in or not.
    Exit errors may not be logged to the Event Log (they weren't when the .bat ran directly from Task Scheduler when I was logged in), so I find it best to manually log your own Event in case a error occurs and you want to send an email.
     REM Logs an event which causes eventlog to send an email when it fails.  Also, "/l application" needs to be lowercase.
    eventcreate /t error /id 203 /l application /d "your logged description."
    And then make a completely separate task with a trigger:  On an event.  Basic Selected.  Log: Application.  Source: EventCreate. Event ID: 203.  And have the action on this task send an email (attaching any generated log files, if needed).
    Hopefully helpful (took me 3 days to figure all this out...gar)
    ===================================== End ===================================
         Running A Dot Bat File in Windows Server 2008 Vista 7 etc and beyond V01
    ============================================================================
     

  • Java class to connect Windows server and excecuting bat file

    Hi All,
    Could some please provide or let me know how to connect windows server and executing bat file in windows box.
    All i have in hand to connect is Host name,Username and Password.
    Basically i am SOA guys and facing difficult in building class to do.
    I want to use Java code in my integration project in order to achieve the above case.
    I am using Linux OS. And i want to run Java code in Linux Box and to connect to Windows server
    Thanks in advanace
    Regards,
    Tarak.
    Edited by: Tarak on Aug 8, 2012 4:08 PM
    Edited by: Tarak on Aug 11, 2012 9:08 PM

    I'm afraid few if any of us are going to know anything more about connecting to Windows Server than you do. All I can suggest is to check if its client interface is publicly documented and try reverse engineering it from that.

  • Bat File execution Problem in Win Server 2k3

    I have a jar that is calling a .bat file.
    It executes the bat file in Windows XP, and Windows 2000
    But when I run it in Win Server 2k3 it can't execute.
    I get Exit Value 1
    Does anyone know any differences between the Operating Systems that could cause this?
    Thanks
    Paul

    I don't know enough about the difference in system or even between your two installation. An exit 1 error could happen for any reason, such the batch file not being found or other reason.
    The best thing to do is get a handle to the stderr and stdout of the process and display them. To do this you would write a class that reads from an InputStream (the output of the process is read using an InputStream) and displays to System.out. Follows is some code that illustrates this (done off the top of my head, more or less, so it won't necessarily execute as is):
       void runExternalTask()
          String cmd = new String { "myexecutable.exe" };
          Process proc = Runtime.getRuntime().exec(cmd);
          ProcessOutputHandler procOut = new ProcessOutputHandler(proc.getInputStream(),0);
          ProcessOutputHandler procErr= new ProcessOutputHandler(proc.getErrorStream(),0);
       public static class ProcessOutputHandler implements Runnable {
            InputStream _in;
            //PrintStream _out;
            boolean run = true;
             * Constructor for ProcessOutputHandler.
            public ProcessOutputHandler( InputStream in, int procID ) {
                _in = in;
                (new Thread(this,"output.handler."+procID)).start();
            public void close () {
                run = false;
            public void run() {
                try {
                    int i = 0;
                    while ( run && (i=_in.read()) != -1 ) {
                        System.out.print((char)i);
                } catch (IOException e) {
                  e.printStackTrace(System.err);
        }

  • Bat file to hide the ms dos windows when running SWING component

    Hi guys,
    Could somebody tell me how to do the following?:
    I want to create a .bat file which will be installed on my desktop, so that the swing jar file component is run, and open an application, but with the peculiarity that I don't want the MSDOS console open.
    The best example about this, is Oracle Enterprise Manager, which is built on java and doesn't show any MSDOS (CMD) windows while executing.
    Tx.

    Correct.
    Also note that if your code runs on multiple platforms, javaw is only on Windows.
    Rob

  • How to run the cmd or bat files in the con current program R12 Windows

    Hi,
    I would like to run one cmd or batch file, usually it is looking exe file only.
    How do we register the cmd or bat files?
    We encountered lot of problems to call the exe files, now we want to know to use the cmd file or batch or prog file (abc.cmd or abc.bat or abc.prog)
    Application: R12.0.4
    OS: Windows 2003
    Awaiting for your sincere response,
    Thanks,
    M.K.Thamaraiselvan

    Hi Hussien,
    Please help me that
    1. Create a file under the %FND_TOP%\bin directory called testhost.cmd
    In the file put the following two lines:
    ls >> testhost.txt
    exit
    2. From the %FND_TOP%\bin directory, do the following:
    copy fndcpesr.exe testhost.exe
    I understood the above 2 steps, the below one, is making confusion. Can you explain that what application i have to choose. 3. Register testhost (use 'testhost' for the Execution File Name) as a concurrent executable in Oracle Applications.
    4. Register a testhost host program as a concurrent program in Oracle Applications.
    5. Add the program to your report group.
    Awaiting for your explanation clearly to go ahead.
    Please explain me that which application i can choose while define the executable and program.
    awaiting.
    Thanks
    M.K.Thamaraiselvan

  • Unable to run script (.bat file) on a windows server

    Hi,
    I have a job definition which execute cmd command (such as cd, echo, etc) through a platform agent installed on a Windows server but when I try to execute scripts (i.e. .bat file) it doesn't work.
    Can someone help, please ?
    Regards.

    Hi,
    The PA is running with the same account executing the .bat file on the server.
    Yes, the bat file can be executed with that user outside of CPS.
    Regards

  • 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)

  • Windows and bat files

    Hi
    I've made some bat files to compile java sources and run the program.
    After the termination of the program i want the bat file to stop and let me see the messages on console but it closes automatically.
    I tried put pause at the end of the bat file but it does not work.
    Just after finish the java program the console exits and never executes the pause command.
    Why ?
    how Can I do ?

    I tried this one windows XP and it worked fine:
    Test program: public class Test {
        public static void main(String[] args) {
         System.out.println("Test program running");
         System.exit(1);
    }Batch file (called runtest.bat): java -classpath c:\temp Test
    pauseThen I created a shortcut to "runtest.bat". It opened a console window and paused with this output: C:\temp>java -classpath c:\temp Test
    Test program running
    C:\temp>pause
    Press any key to continue . . .How are you running the batch file? Is it from a shortcut on Windows, or from a third party tool, like an editor?
    What is the command line you're using to run the batch file?
    Tim

  • Process .bat files through the terminal Window?

    Hi,
    I have a large number of .bat file which have been generated from Rendering out of Maya (3D Application) on PC.
    Usually I would process the bat files from within maya's script editor which would generate the Photoshop images.
    The down side is it ties my PC up and I cant really do anything while these are processing .. and it take quiet a while.
    I have Mac which doesn't have Maya... does anybody know if I can process .bat files maybe through the terminal window?. Problem is theres well over 10,000 images to process.
    If it is possible to do this is there a way I can automate this process from the Terminal for all the files?
    Any help would be much appreciated
    Thanks
    Wayne

    No problem, Kurt. There are several possible solutions for the OP (who seems to have disappeared!):
    You mentioned already running Windows on the Mac. I have found Parallels great, so it should be as simple as setting up his virtual machine, installing his app and copying over the batch files. But he would need to purchase Parallels and have a Windows licence.
    Unix has a much more sophisticated range of scripting facilities than the old DOS batch files, and there are free tools that do a lot of graphics processing.
    Applescript can be used to control Graphic Converter (amongst others) - but OP refers to rendering, and I don't know if GC can do that (in fact I am fairly sure it can't).
    So, to advise wr_uk we really need to know what those bat files are doing!
    AK

Maybe you are looking for