Batch File Error Windows 7 x64


  1. Posts : 33
    win 7 x64
       #1

    Batch File Error Windows 7 x64


    Hey Guys,

    Tried writing a batch file to open a few programs I use together regularly, but which I don't want all the time on startup.

    I've tried:

    start “Maxivista” /d “C:\Program Files\MaxiVista Pro Server\MaxiVistaAll.exe"
    start “Netbeans” /d "R:\Program Files\NetBeans 6.9.1\bin\netbeans.exe"
    start “OfficeTime” /d "C:\Program Files (x86)\OfficeTime\OfficeTime.exe"
    Start "WampServer" /d "R:\wamp\wampmanager.exe"
    start “Firefox” /d “C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
    start “Outlook” /d “R:\Program Files\Microsoft Office\Office14\OUTLOOK.EXE" /recycle
    start “Filezilla” /d "R:\Program Files\FileZillaFTPClient\filezilla.exe"
    start "CiscoVPN" /d "C:\Program Files\Cisco Systems\VPN Client\vpngui.exe"


    and : (to see if name or /d was an issue)

    start "C:\Program Files\MaxiVista Pro Server\MaxiVistaAll.exe"
    start /d "R:\Program Files\NetBeans 6.9.1\bin\netbeans.exe"
    start /d "C:\Program Files (x86)\OfficeTime\OfficeTime.exe"
    Start /d "R:\wamp\wampmanager.exe"
    start /d “C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
    start /d “R:\Program Files\Microsoft Office\Office14\OUTLOOK.EXE" /recycle
    start /d "R:\Program Files\FileZillaFTPClient\filezilla.exe"
    start /d "C:\Program Files\Cisco Systems\VPN Client\vpngui.exe"

    But I keep getting an error with unusual font types:
    ---------------------------
    [Window Title]
    ôMaxivistaö

    [Content]
    Windows cannot find 'ôMaxivistaö'. Make sure you typed the name correctly, and then try again.

    [OK]
    ---------------------------
    And then the same error for each program...

    Any ideas on what might be happening?

    I've tried setting it to run as Admin, but the check-box is greyed out....

    Thanks,
    D
      My Computer


  2. Posts : 1,261
    Windows 7 Professional 32-bit SP1
       #2

    Try this (I've completely removed the "title" parameters:

    Code:
     
    start /D “C:\Program Files\MaxiVista Pro Server" /B MaxiVistaAll.exe
    start /D "R:\Program Files\NetBeans 6.9.1\bin" /B netbeans.exe
    start /D "C:\Program Files (x86)\OfficeTime" /B OfficeTime.exe
    Start /D R:\wamp /B wampmanager.exe
    start /D “C:\Program Files (x86)\Mozilla Firefox" /B firefox.exe
    start /D “R:\Program Files\Microsoft Office\Office14" /B OUTLOOK.EXE /recycle
    start /D "R:\Program Files\FileZillaFTPClient" /B filezilla.exe
    start /D "C:\Program Files\Cisco Systems\VPN Client" /B vpngui.exe
    Note that in the above code, only those path names (/D) containing spaces need to be enclosed in quotes. This whould apply too to command names (/B) if they contained spaces.

    Note also that you do not have to use "start":

    Code:
    "C:\Program Files\MaxiVista Pro Server\MaxiVistaAll.exe"
    "R:\Program Files\NetBeans 6.9.1\bin\netbeans.exe"
    "C:\Program Files (x86)\OfficeTime\OfficeTime.exe"
    R:\wamp\wampmanager.exe
    "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
    "R:\Program Files\Microsoft Office\Office14\OUTLOOK.EXE" /recycle
    "R:\Program Files\FileZillaFTPClient\filezilla.exe"
    "C:\Program Files\Cisco Systems\VPN Client\vpngui.exe"
      My Computer


  3. Posts : 33
    win 7 x64
    Thread Starter
       #3

    Hey Dzom,

    Thanks for the above -

    When I try to run

    start /D “C:\Program Files\MaxiVista Pro Server" /B MaxiVistaAll.exe
    start /D "R:\Program Files\NetBeans 6.9.1\bin" /B netbeans.exe
    start /D "C:\Program Files (x86)\OfficeTime" /B OfficeTime.exe
    Start /D R:\wamp /B wampmanager.exe
    start /D “C:\Program Files (x86)\Mozilla Firefox" /B firefox.exe
    start /D “R:\Program Files\Microsoft Office\Office14" /B OUTLOOK.EXE /recycle
    start /D "R:\Program Files\FileZillaFTPClient" /B filezilla.exe
    start /D "C:\Program Files\Cisco Systems\VPN Client" /B vpngui.exe

    I get:

    [Window Title]
    Files\MaxiVista

    [Content]
    Windows cannot find 'Files\MaxiVista'. Make sure you typed the name correctly, and then try again.

    [OK]

    and

    [Window Title]
    Files

    [Content]
    Windows cannot find 'Files'. Make sure you typed the name correctly, and then try again.

    [OK]

    and

    [Window Title]
    Files\Microsoft

    [Content]
    Windows cannot find 'Files\Microsoft'. Make sure you typed the name correctly, and then try again.

    [OK]

    I've double checked the file is MaxiVistaAll.exe and the path is C:\Program Files\MaxiVista Pro Server, likewise with outlook.

    Netbeans, Filezilla, OfficeTime, Wamp and VPN open okay.....

    Any ideas?

    Thanks again,

    D
      My Computer


  4. Posts : 33
    win 7 x64
    Thread Starter
       #4

    Hey Dzom,

    Figured it out.

    In the command prompt window that opens up, I saw some odd characters:


    C:\>start /D ôC:\Program Files\MaxiVista Pro Server" /B MaxiVistaAll.exe
    The system cannot find the file Files\MaxiVista.

    C:\>start /D "R:\Program Files\NetBeans 6.9.1\bin" /B netbeans.exe

    C:\>start /D "C:\Program Files (x86)\OfficeTime" /B OfficeTime.exe

    C:\>Start /D R:\wamp /B wampmanager.exe


    The launcher has determined that the parent process has a console and will reuse
    it for its own console output. Closing the console will result in termination o
    f the running program.
    Use '--console suppress' to suppress console output.
    Use '--console new' to create a separate console window.

    C:\>start /D ôC:\Program Files (x86)\Mozilla Firefox" /B firefox.exe
    The system cannot find the file Files.

    C:\>start /D ôR:\Program Files\Microsoft Office\Office14" /B OUTLOOK.EXE /recycl
    e
    The system cannot find the file Files\Microsoft.

    C:\>start /D "R:\Program Files\FileZillaFTPClient" /B filezilla.exe

    C:\>start /D "C:\Program Files\Cisco Systems\VPN Client" /B vpngui.exe

    where the " character should be - so I deleted the characters and re-typed. Sorted. I think there must have been a glitch copying/ pasting from your post and into Notepad ;0)

    One other thing - if I wanted to close a program within the batch file, do you know the command for that?

    Thanks again - that's made life a little easier ;-)

    D
      My Computer


  5. Posts : 1,261
    Windows 7 Professional 32-bit SP1
       #5

    You can get a list of command-line commands and utilities to use by openning a command prompt, typing "help" (without quotes) and pressing <ENTER>. Additional help can be read for each command by typeing the command followed by "/?" (without quotes)

    You may want to pay attention to TASKKILL:

    Code:
     
    TASKKILL [/S system [/U username [/P [password]]]]
             { [/FI filter] [/PID processid | /IM imagename] } [/T] [/F]
    Description:
        This tool is used to terminate tasks by process id (PID) or image name.
    Parameter List:
        /S    system           Specifies the remote system to connect to.
        /U    [domain\]user    Specifies the user context under which the
                               command should execute.
        /P    [password]       Specifies the password for the given user
                               context. Prompts for input if omitted.
        /FI   filter           Applies a filter to select a set of tasks.
                               Allows "*" to be used. ex. imagename eq acme*
        /PID  processid        Specifies the PID of the process to be terminated.
                               Use TaskList to get the PID.
        /IM   imagename        Specifies the image name of the process
                               to be terminated. Wildcard '*' can be used
                               to specify all tasks or image names.
        /T                     Terminates the specified process and any
                               child processes which were started by it.
        /F                     Specifies to forcefully terminate the process(es).
        /?                     Displays this help message.
    Filters:
        Filter Name   Valid Operators           Valid Value(s)
        -----------   ---------------           -------------------------
        STATUS        eq, ne                    RUNNING |
                                                NOT RESPONDING | UNKNOWN
        IMAGENAME     eq, ne                    Image name
        PID           eq, ne, gt, lt, ge, le    PID value
        SESSION       eq, ne, gt, lt, ge, le    Session number.
        CPUTIME       eq, ne, gt, lt, ge, le    CPU time in the format
                                                of hh:mm:ss.
                                                hh - hours,
                                                mm - minutes, ss - seconds
        MEMUSAGE      eq, ne, gt, lt, ge, le    Memory usage in KB
        USERNAME      eq, ne                    User name in [domain\]user
                                                format
        MODULES       eq, ne                    DLL name
        SERVICES      eq, ne                    Service name
        WINDOWTITLE   eq, ne                    Window title
        NOTE
        ----
        1) Wildcard '*' for /IM switch is accepted only when a filter is applied.
        2) Termination of remote processes will always be done forcefully (/F).
        3) "WINDOWTITLE" and "STATUS" filters are not considered when a remote
           machine is specified.
    Examples:
        TASKKILL /IM notepad.exe
        TASKKILL /PID 1230 /PID 1241 /PID 1253 /T
        TASKKILL /F /IM cmd.exe /T 
        TASKKILL /F /FI "PID ge 1000" /FI "WINDOWTITLE ne untitle*"
        TASKKILL /F /FI "USERNAME eq NT AUTHORITY\SYSTEM" /IM notepad.exe
        TASKKILL /S system /U domain\username /FI "USERNAME ne NT*" /IM *
        TASKKILL /S system /U username /P password /FI "IMAGENAME eq note*"
    For example, to terminate Notepad, you would use:

    taskkill /IM notepad.exe

    To force it to close, even if a program contains unsaved documents, you would use:

    taskkill /F /IM notepad.exe
      My Computer


  6. Posts : 33
    win 7 x64
    Thread Starter
       #6

    That's great help Dzom - thanks again ;-)

    D
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 14:05.
Find Us