Re: Scheduling the running of a batch file
From: David H. Lipman (DLipman~nospam~_at_Verizon.Net)
Date: 02/08/05
- Next message: CM: "Re: Remote Assistance Client for Win2K"
- Previous message: CM: "Remote Assistance Offers"
- In reply to: John Steen: "Re: Scheduling the running of a batch file"
- Next in thread: John Steen: "Re: Scheduling the running of a batch file"
- Reply: John Steen: "Re: Scheduling the running of a batch file"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 8 Feb 2005 13:31:14 -0500
Glad to hear it !
Here is another idea. You can use the SBST.EXE command to create a drive letter for a
sub-folder.
For example; subst V: "C:\Program Files\Internet Explorer"
-- Dave "John Steen" <moderndads(nospam)@hotmail.com> wrote in message news:5FC63F08-8E07-437D-A46C-F90CB30316B8@microsoft.com... | Dave, just wanted you to know that I got the task working. I removed the ALL | parameter from the batch file, and then ran the batch file from a command | prompt. It still bombed out but this time it referenced "C:\Program" as the | ununrecognized command. The problem wasn't the application or the parameter, | it was that the path (c:\program files, where the .exe resided) wasn't being | recognized by the system. So I copied the .exe to the root of C:\, added the | ALL parameter back to the batch file and modified the path in the batch file | to point to the new location, and ran the scheduled task sucecssfully. | | Thanks again for the help. | | John | | | "David H. Lipman" wrote: | | > Study the concept of Redirection of Input and Output. | > | > In a command prompt, it I type; echo Dave | > | > The word Dave is shown on the screen | > | > it I type; echo Dave >c:\myfile | > | > The file "c:\myfile" would be created with the word Dave. | > | > it I type; echo Dave >>c:\myfile | > | > The file "c:\myfile" would be appended with the word Dave. | > | > Those are samples of Redirection of Output. | > | > If you have a program that requires the response "Y" five time, you can create a file such | > as"c:\myfile" with the following contents | > | > c:\myfile | > ----------- | > y | > y | > y | > y | > y | > | > | > | > I can then call my application (FOO.EXE) such that it uses the information in C:\MYFILE with | > the command... | > | > foo <c:\myfile | > | > Now FOO.EXE will obtain its responses from c:\myfile | > | > Of course, FOO.EXE has to be written to use Redirection of Input and Output. Most are, but | > not all. | > | > -- | > Dave | > | > | > | > | > "John Steen" <moderndads(nospam)@hotmail.com> wrote in message | > news:C204EF54-0D59-403E-B1A3-570006E6EA28@microsoft.com... | > | I checked, and the task runs under the administrar user, so rights aren't an | > | issue. | > | | > | How do I redirect input from an answers file? | > | | > | Thanks, | > | John | > | | > | "David H. Lipman" wrote: | > | | > | > You have to apply a user and password with sufficient rights to the job for the job to | > | > execute. If the application requires input redirect its input from an answer file. | > | > | > | > -- | > | > Dave | > | > | > | > | > | > | > | > | > | > "John Steen" <moderndads(nospam)@hotmail.com> wrote in message | > | > news:75CA9230-36A5-4C40-B613-E6905DE296FB@microsoft.com... | > | > | Setup: | > | > | | > | > | - Windows 2000 Server | > | > | - MS SQL2000 | > | > | | > | > | I have a VB6 application that modifies a SQL database that, when launched, | > | > | prompts the user to enter one of three parameters and press OK: | > | > | | > | > | X (cancels the application) | > | > | | > | > | ALL (modifies all records in the DB that have a null value in a particular | > | > | column, changing the null value in that column to a non-null value) | > | > | | > | > | <Registrant ID> (runs the application against the records with the above | > | > | parameters, but only for one particular registrant) | > | > | | > | > | The application runs fine when it's launched manually. I specify the ALL | > | > | option, click OK and it's done. It also runs fine when a batch file | > | > | containing the application name and option (application.exe ALL) is launched | > | > | from a command prompt. But when I create a scheduled task calling the batch | > | > | file at a particular time, the application fails to run at all. | > | > | | > | > | There is no indication of an error in Scheduled Tasks or Event Viewer, and | > | > | the status in Scheduled Tasks shows successful. But the records in the DB | > | > | are not modified, and the result window that appears when the application is | > | > | finished does not appear. | > | > | | > | > | Any idea why this is happening? I have other batch files that run fine as | > | > | scheduled tasks. Is there something about VB applications that prevent them | > | > | from running this way? | > | > | | > | > | Thanks! | > | > | | > | > | John Steen | > | > | | > | > | > | > | > | > | > | > | >
- Next message: CM: "Re: Remote Assistance Client for Win2K"
- Previous message: CM: "Remote Assistance Offers"
- In reply to: John Steen: "Re: Scheduling the running of a batch file"
- Next in thread: John Steen: "Re: Scheduling the running of a batch file"
- Reply: John Steen: "Re: Scheduling the running of a batch file"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|