Batch File Error Windows 7 x64

darren13

New member
Member
Local time
4:27 AM
Messages
33
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ö

Contents

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

Computer type
PC/Desktop
Computer Manufacturer/Model Number
AMD Phenom II X6 1055T 2.80 GHz
OS
win 7 x64
CPU
AMD Phenom II X6 1055T 2.80 GHz
Motherboard
msi 870a-g54
Memory
8Gb - 4x Kingson Hyper X 2Gb 1600 (KHX1600C9D3B1 / 2GB)
Graphics Card(s)
1 x MSI R5770 Hawk (ATI Radeon HD 5700) / 1 x ATI HD 2400
Sound Card
Onboard Realtek HD Audio
Monitor(s) Displays
Dell 21", Dell 17", Asus 22"
Screen Resolution
1680 x 1050, 1280 x 1024, 1920 x 1080
Hard Drives
Intel X25-M SATA SSD 80Gb
Raptor 300Gb
2 x Barracuda 1Tb (eco / 5200 rpm)
PSU
700W Super Flower 80 Plus Gold
Case
Coolermaster CM 690 Plus
Cooling
Coolermaster V6
Keyboard
Dell
Mouse
Logitech M705
Internet Speed
60M down / 5M up
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

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Virtual Machine
OS
Windows 7 Professional 32-bit SP1
CPU
AMD A4/A6
Motherboard
Intel Corporation 440BX Desktop Reference Platform
Memory
3.00GB EDO
Graphics Card(s)
VMware SVGA 3D
Sound Card
High Definition Audio Device
Monitor(s) Displays
Generic Non-PnP Monitor on VMware SVGA 3D
Screen Resolution
1440x900
Hard Drives
1 x 60GB VMware Virtual SATA Hard Drive ATA Device
Antivirus
Kaspersky Total Security
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

Contents

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

[OK]

and

[Window Title]
Files

Contents

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

[OK]

and

[Window Title]
Files\Microsoft

Contents

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

Computer type
PC/Desktop
Computer Manufacturer/Model Number
AMD Phenom II X6 1055T 2.80 GHz
OS
win 7 x64
CPU
AMD Phenom II X6 1055T 2.80 GHz
Motherboard
msi 870a-g54
Memory
8Gb - 4x Kingson Hyper X 2Gb 1600 (KHX1600C9D3B1 / 2GB)
Graphics Card(s)
1 x MSI R5770 Hawk (ATI Radeon HD 5700) / 1 x ATI HD 2400
Sound Card
Onboard Realtek HD Audio
Monitor(s) Displays
Dell 21", Dell 17", Asus 22"
Screen Resolution
1680 x 1050, 1280 x 1024, 1920 x 1080
Hard Drives
Intel X25-M SATA SSD 80Gb
Raptor 300Gb
2 x Barracuda 1Tb (eco / 5200 rpm)
PSU
700W Super Flower 80 Plus Gold
Case
Coolermaster CM 690 Plus
Cooling
Coolermaster V6
Keyboard
Dell
Mouse
Logitech M705
Internet Speed
60M down / 5M up
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

Computer type
PC/Desktop
Computer Manufacturer/Model Number
AMD Phenom II X6 1055T 2.80 GHz
OS
win 7 x64
CPU
AMD Phenom II X6 1055T 2.80 GHz
Motherboard
msi 870a-g54
Memory
8Gb - 4x Kingson Hyper X 2Gb 1600 (KHX1600C9D3B1 / 2GB)
Graphics Card(s)
1 x MSI R5770 Hawk (ATI Radeon HD 5700) / 1 x ATI HD 2400
Sound Card
Onboard Realtek HD Audio
Monitor(s) Displays
Dell 21", Dell 17", Asus 22"
Screen Resolution
1680 x 1050, 1280 x 1024, 1920 x 1080
Hard Drives
Intel X25-M SATA SSD 80Gb
Raptor 300Gb
2 x Barracuda 1Tb (eco / 5200 rpm)
PSU
700W Super Flower 80 Plus Gold
Case
Coolermaster CM 690 Plus
Cooling
Coolermaster V6
Keyboard
Dell
Mouse
Logitech M705
Internet Speed
60M down / 5M up
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

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Virtual Machine
OS
Windows 7 Professional 32-bit SP1
CPU
AMD A4/A6
Motherboard
Intel Corporation 440BX Desktop Reference Platform
Memory
3.00GB EDO
Graphics Card(s)
VMware SVGA 3D
Sound Card
High Definition Audio Device
Monitor(s) Displays
Generic Non-PnP Monitor on VMware SVGA 3D
Screen Resolution
1440x900
Hard Drives
1 x 60GB VMware Virtual SATA Hard Drive ATA Device
Antivirus
Kaspersky Total Security
That's great help Dzom - thanks again ;-)

D
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
AMD Phenom II X6 1055T 2.80 GHz
OS
win 7 x64
CPU
AMD Phenom II X6 1055T 2.80 GHz
Motherboard
msi 870a-g54
Memory
8Gb - 4x Kingson Hyper X 2Gb 1600 (KHX1600C9D3B1 / 2GB)
Graphics Card(s)
1 x MSI R5770 Hawk (ATI Radeon HD 5700) / 1 x ATI HD 2400
Sound Card
Onboard Realtek HD Audio
Monitor(s) Displays
Dell 21", Dell 17", Asus 22"
Screen Resolution
1680 x 1050, 1280 x 1024, 1920 x 1080
Hard Drives
Intel X25-M SATA SSD 80Gb
Raptor 300Gb
2 x Barracuda 1Tb (eco / 5200 rpm)
PSU
700W Super Flower 80 Plus Gold
Case
Coolermaster CM 690 Plus
Cooling
Coolermaster V6
Keyboard
Dell
Mouse
Logitech M705
Internet Speed
60M down / 5M up
Back
Top