• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 301
  • Last Modified:

command com for 98 , ME and 2000

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
TLTEO
Asked:
TLTEO
  • 14
  • 11
  • 2
1 Solution
 
tonnybrandtCommented:
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
 
TLTEOAuthor Commented:
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
 
tonnybrandtCommented:
>>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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
TLTEOAuthor Commented:
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
 
tonnybrandtCommented:
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
 
TLTEOAuthor Commented:
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
 
stevenlewisCommented:
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
 
TLTEOAuthor Commented:
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
 
TLTEOAuthor Commented:
Any solution yet?? Tks vm in advance
0
 
tonnybrandtCommented:
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
 
TLTEOAuthor Commented:
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
 
tonnybrandtCommented:
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
 
TLTEOAuthor Commented:
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
 
tonnybrandtCommented:
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
 
TLTEOAuthor Commented:
I can't get it out. So frustrating.
0
 
TLTEOAuthor Commented:
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
 
TLTEOAuthor Commented:
Any luck from anyone??

How come PIF  does not seems to wotk on windows 2000
0
 
tonnybrandtCommented:
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
 
TLTEOAuthor Commented:
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
 
tonnybrandtCommented:
How about just let the last line on the batchfile be
exit
0
 
TLTEOAuthor Commented:
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
 
tonnybrandtCommented:
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
 
tonnybrandtCommented:
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
 
TLTEOAuthor Commented:
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
 
stevenlewisCommented:
good call Tonny!!
TLTEO, glad you got it finally
0
 
TLTEOAuthor Commented:
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
 
tonnybrandtCommented:
Glad you got it solved.

My best regards to all.
Tonny
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 14
  • 11
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now