If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
program association with .cmd batch file in windows 98se
I needed a batch file with .cmd extension.But, I had no programs
associated with *.cmd files. So, I associated them with 'Notepad' program. But when I am trying to associate the action with the prescribed file, it is not accepted. Then, I tried to associate it with MS DOS prompt (COMMAND.COM). But, this association also failed. What should I do? Any help out there? Thank you. |
#2
|
|||
|
|||
program association with .cmd batch file in windows 98se
Just give it a .bat extension, then at a DOS prompt type the name of the
..bat file and press enter to run it. Note that if it is not in C:\ you will have to type the path to the file to run it. If you're trying to run a program from the batch file you could use in the .bat: Start /M "C:\path to file\filename.exe" Start runs the app. /M opens it maximized. Between quotes is the path to the app and app to run. Perhaps some of this will help: http://www.computerhope.com/batch.htm#11 -- Brian A. Sesko { MS MVP_Shell/User } Conflicts start where information lacks. http://basconotw.mvps.org/ Suggested posting do's/don'ts: http://www.dts-l.org/goodpost.htm How to ask a question: http://support.microsoft.com/kb/555375 "rb" wrote in message oups.com... I needed a batch file with .cmd extension.But, I had no programs associated with *.cmd files. So, I associated them with 'Notepad' program. But when I am trying to associate the action with the prescribed file, it is not accepted. Then, I tried to associate it with MS DOS prompt (COMMAND.COM). But, this association also failed. What should I do? Any help out there? Thank you. |
#3
|
|||
|
|||
program association with .cmd batch file in windows 98se
On 17 Jan 2006 11:01:34 -0800, "rb" put finger to
keyboard and composed: I needed a batch file with .cmd extension.But, I had no programs associated with *.cmd files. So, I associated them with 'Notepad' program. But when I am trying to associate the action with the prescribed file, it is not accepted. Then, I tried to associate it with MS DOS prompt (COMMAND.COM). But, this association also failed. What should I do? Any help out there? Thank you. Be aware that not all XP batch commands are supported in DOS/Win9x, so even if you were able to create an appropriate association, the result may not be what you expect. - Franc Zabkar -- Please remove one 'i' from my address when replying by email. |
#4
|
|||
|
|||
program association with .cmd batch file in windows 98se
Am I missing something?
quote Be aware that not all XP batch commands are supported in DOS/Win9x /quote Or is that just additional information. I see no reference to XP by the OP. -- Brian A. Sesko { MS MVP_Shell/User } Conflicts start where information lacks. http://basconotw.mvps.org/ Suggested posting do's/don'ts: http://www.dts-l.org/goodpost.htm How to ask a question: http://support.microsoft.com/kb/555375 "Franc Zabkar" wrote in message ... On 17 Jan 2006 11:01:34 -0800, "rb" put finger to keyboard and composed: I needed a batch file with .cmd extension.But, I had no programs associated with *.cmd files. So, I associated them with 'Notepad' program. But when I am trying to associate the action with the prescribed file, it is not accepted. Then, I tried to associate it with MS DOS prompt (COMMAND.COM). But, this association also failed. What should I do? Any help out there? Thank you. Be aware that not all XP batch commands are supported in DOS/Win9x, so even if you were able to create an appropriate association, the result may not be what you expect. - Franc Zabkar -- Please remove one 'i' from my address when replying by email. |
#5
|
|||
|
|||
program association with .cmd batch file in windows 98se
On Wed, 18 Jan 2006 19:11:18 -0600, "Brian A."
gonefish'n@afarawaylake put finger to keyboard and composed: Am I missing something? quote Be aware that not all XP batch commands are supported in DOS/Win9x /quote Or is that just additional information. I see no reference to XP by the OP. AFAIK, .bat files are associated with command.com whereas .cmd files are associated with cmd.exe. It appears to me that the OP may be trying to run an NT class batch file on a Win9x system. http://www.microsoft.com/resources/d...-us/batch.mspx "A batch file is an unformatted text file that contains one or more commands and has a .bat or .cmd file name extension. When you type the file name at the command prompt, Cmd.exe runs the commands sequentially as they appear in the file." http://www.microsoft.com/resources/d...loverview.mspx "The Windows XP command shell uses the command interpreter Cmd.exe. .... You can use the command shell to create and edit batch files (also called scripts) to automate routine tasks." - Franc Zabkar -- Please remove one 'i' from my address when replying by email. |
#6
|
|||
|
|||
program association with .cmd batch file in windows 98se
I catch your drift and see your point.
Actually I believe .cmd files are scripts which can/do run .bat files on NT. True that .cmd scripts AFAIK won't run under 9x, but .bat files will run on both 9x and NT. From what I understand, cmd.exe passes off .bat files to the NT DOS command interpreter, command.com, which takes care of some DOS commands and passes most internal commands on to a second instance of cmd.exe for execution in NT. If a batch/script file executes something that can be run on 9x and NT, then a .bat extension will do. If it will only run on NT then either a .bat or .cmd extension can be used, although it's safer using the .cmd to keep it from mistakenly being run on 9x. -- Brian A. Sesko { MS MVP_Shell/User } Conflicts start where information lacks. http://basconotw.mvps.org/ Suggested posting do's/don'ts: http://www.dts-l.org/goodpost.htm How to ask a question: http://support.microsoft.com/kb/555375 "Franc Zabkar" wrote in message ... On Wed, 18 Jan 2006 19:11:18 -0600, "Brian A." gonefish'n@afarawaylake put finger to keyboard and composed: Am I missing something? quote Be aware that not all XP batch commands are supported in DOS/Win9x /quote Or is that just additional information. I see no reference to XP by the OP. AFAIK, .bat files are associated with command.com whereas .cmd files are associated with cmd.exe. It appears to me that the OP may be trying to run an NT class batch file on a Win9x system. http://www.microsoft.com/resources/d...-us/batch.mspx "A batch file is an unformatted text file that contains one or more commands and has a .bat or .cmd file name extension. When you type the file name at the command prompt, Cmd.exe runs the commands sequentially as they appear in the file." http://www.microsoft.com/resources/d...loverview.mspx "The Windows XP command shell uses the command interpreter Cmd.exe. ... You can use the command shell to create and edit batch files (also called scripts) to automate routine tasks." - Franc Zabkar -- Please remove one 'i' from my address when replying by email. |
#7
|
|||
|
|||
program association with .cmd batch file in windows 98se
FWIW, I'd not associate .CMD with batfile in Win9x, because specific
use of .CMD is a convenient way to prevent NT-dependent syntax from being interpreted by a Win9x that can't understand it. There are lovely syntax extensions available for XP batch files, but Win9x will error or fall through on such lines. That can be disasterous in some cases, e.g. where a CD before a DELTREE is ignored because the CD used syntax Win9x couldn't understand. Problems also arise with comparisons (e.g. IF "%Label%"=="literal") especially where these involve undefined environment variables. Win9x and DOS will substitute the null string in such cases, whereas XP will treat the variable name as literal text (% syntax notwithstanding)... @Echo Off Set UnDefined= If "%UnDefined%"=="" GoTo Win9x Echo This is processed in NT GoTo End :Win9x Echo This is processed in Win9x :End ---------- ----- ---- --- -- - - - - Don't pay malware vendors - boycott Sony ---------- ----- ---- --- -- - - - - |
#8
|
|||
|
|||
program association with .cmd batch file in windows 98se
cquirke wrote...
@Echo Off Set UnDefined= If "%UnDefined%"=="" GoTo Win9x Echo This is processed in NT GoTo End :Win9x Echo This is processed in Win9x :End Well well well - that didn't work as I expected in my XP system heh :-) ---------- ----- ---- --- -- - - - - Don't pay malware vendors - boycott Sony ---------- ----- ---- --- -- - - - - |
#9
|
|||
|
|||
program association with .cmd batch file in windows 98se
On Thu, 19 Jan 2006 17:46:36 +1100, Franc Zabkar
On Wed, 18 Jan 2006 19:11:18 -0600, "Brian A." gonefish'n@afarawaylake put finger to keyboard and composed: Be aware that not all XP batch commands are supported in DOS/Win9x AFAIK, .bat files are associated with command.com whereas .cmd files are associated with cmd.exe. It appears to me that the OP may be trying to run an NT class batch file on a Win9x system. Yes and no. Yes, .BAT is the traditional extension for DOS/Win9x batch files, whereas .CMD is a newer extension added to NT along with the new extended batch file syntax. But it may not be as simple as whether Command.com or Cmd.exe are used as the interpreter; it may be that Command.com passes batch file interpretation to Cmd.exe (or deeper code) so that NT syntax is supported either way. I remember that sort of effect, but I can't pin it down either way on cursory testing right now. ---------- ----- ---- --- -- - - - - Don't pay malware vendors - boycott Sony ---------- ----- ---- --- -- - - - - |
#10
|
|||
|
|||
program association with .cmd batch file in windows 98se
What did you expect?
I copied/pasted/ran it in SystemScripter, ran it and got the Win9x echo. Then I saved it to the desktop as both a .bat and a .cmd file, and from what I believe it ran/closed in a blink of an eye. From what I've read on using it in XP the .bat/.cmd opens cmd.exe, passes it off to command.com which in turn passes it off to a second instance of cmd.exe and closes. To test: I ran cmd.exe, at the command prompt I ran name.bat and then name.cmd. Both resulted in the Win9x echo without closing cmd.exe. Then I edited the files a touch and they ran fine when opened from the desktop. @echo off set path UnDefined= if "%UnDefined%"=="" goto Win9x if not "%undefined%"=="" echo This is processed in NT pause goto end :Win9x echo This is processed in Win9x pause goto end :end -- Brian A. Sesko { MS MVP_Shell/User } Conflicts start where information lacks. http://basconotw.mvps.org/ Suggested posting do's/don'ts: http://www.dts-l.org/goodpost.htm How to ask a question: http://support.microsoft.com/kb/555375 "cquirke (MVP Windows shell/user)" wrote in message ... cquirke wrote... @Echo Off Set UnDefined= If "%UnDefined%"=="" GoTo Win9x Echo This is processed in NT GoTo End :Win9x Echo This is processed in Win9x :End Well well well - that didn't work as I expected in my XP system heh :-) ---------- ----- ---- --- -- - - - - Don't pay malware vendors - boycott Sony ---------- ----- ---- --- -- - - - - |
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Win 98 Error Message | Arbaca | General | 20 | July 21st 05 11:59 PM |
WINDOWS GURU - DAN GOOKIN | AAH | General | 0 | June 22nd 05 09:37 AM |
Windows 98 machine boot problem due to ndiswan.vxd missing file | Martin Healy | Setup & Installation | 1 | May 10th 05 07:38 PM |
ERROR: Invalid page fault in module EXPLORER.EXE at 015f:00401f31 | tgregg99 | General | 47 | March 18th 05 03:44 PM |
New Install of Windows & W-TShooters question | Star | General | 26 | August 30th 04 07:48 AM |