?
Solved

command com for 98 , ME and 2000

Posted on 2001-06-26
27
Medium Priority
?
296 Views
Last Modified: 2013-12-28
Hi

what is the diiference bet. the command com in 3 above.

I am working on a program that uses command com to run some java program.

98 and ME is using ms-dos promt while 2000 is using command com I thk.

Do I need to change the command for the 3 diiferent platform?  Is there one that interface with the 3 .

Can I use 2000 command com on win98?
Is ME and 98 the same command com?
0
Comment
Question by:TLTEO
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 14
  • 11
  • 2
27 Comments
 
LVL 10

Expert Comment

by:tonnybrandt
ID: 6230109
Actually win 98 and me is using command.com. Msdos prompt is only a "shortcut" to command.com.
You can also use command.com in win2000. It interacts with the normal command interpreter cmd.exe.

You should be fine , just using the command.com that is built in these OS'es, without having to use a specific one.
0
 

Author Comment

by:TLTEO
ID: 6230118
2000  seems to be using command prompt. It all looks the same, but if I want to execute a file like

start mypic.jpg          in 98  it works

in 2000 what do i do?   Is ity the same as NT?


I am not too sure about windows.  

How come my MSDOS promt is only about 16 lines to use, but ME and 2000 have about 50 lines,  I mean in the size of the viewable screen.


Also,  how can I solve the problem of DOS 8.3.

Seems 2000 command promt can see a directory longer than 8 characters. But dos in 98 cannot, extra will be trancated.
It is giving me problem.

0
 
LVL 10

Expert Comment

by:tonnybrandt
ID: 6230281
>>Start mypic.jpg

This works in win2000. You just have to be sure that the filetype jpg is associated with a program, and it will start. So will it in all other windows versions, except windows 3.1/3.11

>>How come my MSDOS promt is only about 16 lines to use, but ME and 2000 have about 50 lines,  I mean
in the size of the viewable screen.

Start a msdos prompt in windows 98. Rightclick the icon i the top/left corner and choose properties. On the leaf layout, find the item called window size and increase the Height value.

>>Also,  how can I solve the problem of DOS 8.3.

All windows versions except windows 3.1/3.11 understands and can use long filenames. If you want to specify a path on a commandline with spaces just enclose it in " signs. Like this:
start "c:\program files\some.jpg"

Hope this helps
Tonny
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:TLTEO
ID: 6230338
I have written a batch file like

java -cp c:\program files\somethg\thisfile.jar Runthis %1%2%3

whenever a file with extension .cpl is clicked, it will run this batch file.  But if I click a file with file name like  12345678910.cpl

the batch file will truncate the rest, becoming 123456~1.cpl.   In the end the wrong file or file not found is given.  This dont seems to have problem with 2000. But only 98.  

How do I solve this?


0
 
LVL 10

Expert Comment

by:tonnybrandt
ID: 6230457
I still belive that all you need to do is enclose the parameter, where the filename is passed to the batchfile in " signs.

Please give an example that shows where exactly, the filename is passed to the batchfile. (there is no spaces between %1 and %2 so it's unlikely that it is there)


0
 

Author Comment

by:TLTEO
ID: 6231972
for example in a email attachment.  When I double click it, it calls for this batch file and runs

C:\>java -cp c:\progra~1\myprog~1\myProg.jar myApp  "C:\WINDOWS\LOCALS~1\TEMPOR~1\CONTENT.IE5\CXAZ43O7\XP15ISVU.CPL"

it works if the filename is shorter than 8 characters

but if the filename is longer than 8 characters like
XP15ISVU145.CPL ..  it becomes XP15IS~1.CPL

everytime it gives me a error of file not found.

How can I resolve this?



0
 
LVL 41

Expert Comment

by:stevenlewis
ID: 6233491
when using the quotes, don't use the 8.3 naming convention example
"C:\WINDOWS\LOCALS~1\TEMPOR~1\CONTENT.IE5\CXAZ43O7\XP15ISVU.CPL"
=
"C:\WINDOWS\LOCALServer\TEMPORary internet files\CONTENT.IE5\CXAZ43O7\XP15ISVU.CPL"
0
 

Author Comment

by:TLTEO
ID: 6233688
The fact is that when the batch file is called, the command line is

java -cp c:\program files\somethg\thisfile.jar Runthis %1%2%3


the file is name is chosen by %1%2%3.This automatically calls for 8.3 naming. How can I stopped the 8.3 naming convention
0
 

Author Comment

by:TLTEO
ID: 6235319
Any solution yet?? Tks vm in advance
0
 
LVL 10

Expert Comment

by:tonnybrandt
ID: 6235967
TLTEO: i can't check this untill i get to work, where i have access to a windows 98 machine. You have explained your problem very well, but one thing is missing in the picture:
You say: When i doubleclick it, it.....

How is that set up ?. in file associations ?
If it is, you must post the exact syntax for the doubleclick command here, so i have something to troubleshoot from. (Just copy it from fileassociations)
0
 

Author Comment

by:TLTEO
ID: 6236498
I use an installation program to install the file type in the key registry.  So whenever it sees .cpl  it runs myApp.bat

I did not use the Folder options to change manually

The installation script is :

Root: HKCR; Subkey: ".cpl"; ValueType: string; ValueName: ""; ValueData: "myApp"; Flags: uninsdeletevalue

Root: HKCR; Subkey: "myApp\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\myApp.bat"" ""%1%2%3%4"""

0
 
LVL 10

Expert Comment

by:tonnybrandt
ID: 6237379
I see you problem now. I have performed a test on both win 98 and win 2000, where i "echo'ed" the parameter passed to the batch file. The win 2000 passes Long filename enclosed in " , but the win 98 passes in 8+3 format. I have no solution for this at this time, but will keep looking, and post back if i find an answer.
0
 

Author Comment

by:TLTEO
ID: 6239224
Tks .  eagerly awaiting your answer. I have tested a few thing s but to no avail.  Hope you can help me through this. Cheers
0
 
LVL 10

Expert Comment

by:tonnybrandt
ID: 6239811
Haven't found any answers, but just thought of one thing.
How about running the java program directly from the shell\open command, meaning replace the ""{app}\myApp.bat"" ""%1%2%3%4""" with a call directly to the java command.

It seems that it is only when the parameter "hits" command.com that it get's truncated.

Just a thought, maybe you can use it.
Tonny

0
 

Author Comment

by:TLTEO
ID: 6241901
I can't get it out. So frustrating.
0
 

Author Comment

by:TLTEO
ID: 6241913
Now i have a new prob.  I am trying to use a pif shortcut to call the batch file.  It works fine in 98 and ME.

But in win 2000 professional,  It can even call the batch file properly at all.  

PIF files have a  button call exit on close.

0
 

Author Comment

by:TLTEO
ID: 6253425
Any luck from anyone??

How come PIF  does not seems to wotk on windows 2000
0
 
LVL 10

Expert Comment

by:tonnybrandt
ID: 6253766
Sorry, i haven't been around lately, but i have failed to find a solution for you. I can see what is happening, but i simply don't know how to work around it or fix it.

With regards to pif files, they are different for the win 9x/me and the NT/2000. Although they serve the same purpose, you cannot use a win 9x pif file on a 2000 or a 2000 pif file on a 98.
0
 

Author Comment

by:TLTEO
ID: 6254100
Hmm

So is there any short cut that I can use instead of PIF files.

I have seen .lnk  files,  but they dont have functions that says closed on exit
0
 
LVL 10

Expert Comment

by:tonnybrandt
ID: 6254430
How about just let the last line on the batchfile be
exit
0
 

Author Comment

by:TLTEO
ID: 6256247
Effectively,  if I put

cls
exit

the ugly screen will only go off once I finish my program
system.exit(1)  in java.  

ie  (close on exit)


But if I use a short cut (PIF) to call this batch file, the batch file will automatically close itself oce the program is started.


Therefore, without a shortcut, I can get rid of the ugly MS DOS screen.  Just wonder why windows have to be build in this way!!!!!.  It is perfectly fine in 98 n ME

But not 2000...  so funny


Perhaps in 2000, only a shortcut to call a .exe works.  ie my thinking I think.



0
 
LVL 10

Expert Comment

by:tonnybrandt
ID: 6256623
The shortcuts to msdos programs in win2000 is actually pif-files.
The pif files are autocreated in the same folder as where the exe file is located when you rightclick a dos program in windows 2000 and choose properties. Try it and make a search for *.pif and you will see.
0
 
LVL 10

Accepted Solution

by:
tonnybrandt earned 200 total points
ID: 6266136
I accidently fell over this page. I think you might be able to find some usefull info in here:
http://www.ericphelps.com/batch/samples/filename.bat.txt
0
 

Author Comment

by:TLTEO
ID: 6267409
tks tonnybrandt

you have been a great help. Finally it is solved.

would definitely post for your answer again if I have any. Cheers
0
 
LVL 41

Expert Comment

by:stevenlewis
ID: 6267426
good call Tonny!!
TLTEO, glad you got it finally
0
 

Author Comment

by:TLTEO
ID: 6267480
Tks.  You guys have been very very helpful.  Apprec it vm. Cheers.  I just wonder how much more incompatability  win2000 will cause in the  future to come
0
 
LVL 10

Expert Comment

by:tonnybrandt
ID: 6268269
Glad you got it solved.

My best regards to all.
Tonny
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Configuring Remote Assistance for use with SCCM
Windows 10 Creator Update has just been released and I have it working very well on my laptop. Read below for issues, fixes and ideas.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question