views:

54

answers:

1

I have created a batch file to run an application automatically but it seems my CMD does not run it. I typed this (using notepad as an example):

CMD /C "C:\notepad2\notepad2.exe"

If I run this from Windows Vista it worked. But running this from Windows Server 2008 (64-bit) it just doesn't work. I even try using that line from the Run menu but no go.

What do I do? My aim is to run a scheduled task that runs the batch file every now and then.

A: 

Stupid question, but does the program you're trying to run actually exist on the Server 2k8 machine?

There are no differences in cmd between Vista and Server 2k8 whatsoever.

Besides, why do you need to execute it via cmd? Can't you just run the application directly? Using cmd /c is only necessary for shell built-ins, such as dir or start.

Also remember that there is no NTVDM on 64-bit Windows—you can't run 16-bit programs. I doubt one would still use them nowadays but it may be the only thing I can think of why it doesn't work in 64-bit.

Joey
I need to run a command line to run a program's command to sync some files from a shared network at about 10 minutes interval.Anyway, this is besides the point but is it possible to actually automatically connect to a shared folder on a network when not logged in yet? I am trying to do the sync above in case the server reboots.
darnpunk
@darnpunk: Well, shared folders belong to your user. They aren't connected while you're not logged in. You can use `net use` to connect to them. Don't forget to remove the drive letter afterwards again.
Joey