TLTEO
asked on
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?
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?
ASKER
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.
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.
>>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
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
ASKER
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?
java -cp c:\program files\somethg\thisfile.jar
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?
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)
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)
ASKER
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\myPro g.jar myApp "C:\WINDOWS\LOCALS~1\TEMPO R~1\CONTEN T.IE5\CXAZ 43O7\XP15I SVU.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?
C:\>java -cp c:\progra~1\myprog~1\myPro
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?
when using the quotes, don't use the 8.3 naming convention example
"C:\WINDOWS\LOCALS~1\TEMPO R~1\CONTEN T.IE5\CXAZ 43O7\XP15I SVU.CPL"
=
"C:\WINDOWS\LOCALServer\TE MPORary internet files\CONTENT.IE5\CXAZ43O7 \XP15ISVU. CPL"
"C:\WINDOWS\LOCALS~1\TEMPO
=
"C:\WINDOWS\LOCALServer\TE
ASKER
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
java -cp c:\program files\somethg\thisfile.jar
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
ASKER
Any solution yet?? Tks vm in advance
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)
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)
ASKER
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"""
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"
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.
ASKER
Tks . eagerly awaiting your answer. I have tested a few thing s but to no avail. Hope you can help me through this. Cheers
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
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
ASKER
I can't get it out. So frustrating.
ASKER
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.
But in win 2000 professional, It can even call the batch file properly at all.
PIF files have a button call exit on close.
ASKER
Any luck from anyone??
How come PIF does not seems to wotk on windows 2000
How come PIF does not seems to wotk on windows 2000
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.
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.
ASKER
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
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
How about just let the last line on the batchfile be
exit
exit
ASKER
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.
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.
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
tks tonnybrandt
you have been a great help. Finally it is solved.
would definitely post for your answer again if I have any. Cheers
you have been a great help. Finally it is solved.
would definitely post for your answer again if I have any. Cheers
good call Tonny!!
TLTEO, glad you got it finally
TLTEO, glad you got it finally
ASKER
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
Glad you got it solved.
My best regards to all.
Tonny
My best regards to all.
Tonny
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.