Tech Support Guy banner
Status
Not open for further replies.
1 - 9 of 9 Posts

·
Registered
Joined
·
16 Posts
Discussion Starter · #1 ·
In Win Xp, am trying to do what i always did in Win 98
upon going into DOS...namely, running a BAT file automatically.

Win98 had a "start in" option, and a "batch file" option,
so that i could tell it what folder to put me into, and
what batch file to execute.

Win XP "Command Prompt Properties" has the
'start in' box, but not the "batch file" box.
Surely Win XP can do this....but how?

THANKS!
 

·
Gone but never forgotten
Joined
·
9,283 Posts
I've never done it, but the CMD command has parameters that appears that it will run a task specified in the registry. (at the C: prompt enter cmd /? )

So, you could create a BAT file that runs CMD with this AutoStart task (in your case the BAT job you wish to run), and use this as the entry to DOS vs the normal mechanism.
 

·
Gone but never forgotten
Joined
·
9,283 Posts
What Islandpilot was looking for was the capability of opening a DOS prompt and having a BAT file executed automatically. (and then, I am presuming, leaving them at the C:\ prompt to do whatever).

My "crude" solution, was to first review the parameters to CMD, which appear to allow it to execute a predefined task (which could obviously be that BAT file they wish to run).

Then, build a BAT file that contains only the CMD command, along with the needed parameters.

Now, instead of heading to DOS in the normal way, they would use this BAT file instead, which "should" open a DOS window, and run the BAT task, and leave them at the command prompt.
 

·
Gone but never forgotten
Joined
·
9,283 Posts
Squashman said:
Use this as the shortcut.

cmd /k batfilename.bat
Ah! Substantially easier. I got hung up on the BAT file and missed the whole forest.
BTW it appears the the "K" parameter needs the full path to the file, but regardless, this should fill the bill!! :)
 

·
Retired Trusted Advisor
Joined
·
19,935 Posts
WhitPhil said:
Ah! Substantially easier. I got hung up on the BAT file and missed the whole forest.
BTW it appears the the "K" parameter needs the full path to the file, but regardless, this should fill the bill!! :)
Probably because the file is not in your path.
 

·
Registered
Joined
·
11,852 Posts
I did not think there is a MS-DOS in Windows XP. The command prompt is as close as you are going to get but is isnot DOS.
 
1 - 9 of 9 Posts
Status
Not open for further replies.
Top