Hi, I have just found this program, and quite keen on testing it, to see if it will do what I need.
I have a DOS program that I run with commandline options on the end, eg to simplify, it is like this:
abc.exe C:\test.txt
in 16 and 32bit OS, this opens abc.exe, and loads the text file C:\test.txt in.
How would I provide a command line in vDOS, when the commandline option always changes.
So in my autoexec.txt I have the line
abc.exe C:\test.txt
and this works. But the commandline option or filename in this case is always different. It needs something like what works in bat files, like
abc.exe %1
Is this possible please ?
Thanks,
Grant
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You want to start a DOS program in vDos with a variable that’s set outside of vDos?
Set some Windows environment variable: %filename%=c:\test.txt.
Then in autoexec.txt:
abc.exe %filename%
Jos
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks Jos, that works. Just to help others, with your help, I expanded on that, and here is what I did.
Contents of abc.bat
SET filename=%1
C:\vDos\vDos.exe
exit
And in autoexec.txt
abc.exe %filename%
Then to run with a filename, from command prompt type the following:
C:\path\abc.bat c:\test.txt
This runs abc.bat passing the filename as first parameter. In bat file it shows as %1, and this is set to the environment variable, in this case the filename. Then from in autoexec.txt the environment variable holds the filename set from the bat file, and so launches abc.exe c:\test.txt
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To add to this:
If a DOS variable isn’t found, the Windows environment is searched by vDos.
So %filename% can be found by vDos’s shell, not being a DOS environment variable!
To make this available to DOS programs, you would have to SET filename=%filename% in autoexec.txt.
Until now, I’m reluctant to add %1, %2… to starting vDos, it’s confusing at least.
Jos
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "General" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi, I have just found this program, and quite keen on testing it, to see if it will do what I need.
I have a DOS program that I run with commandline options on the end, eg to simplify, it is like this:
abc.exe C:\test.txt
in 16 and 32bit OS, this opens abc.exe, and loads the text file C:\test.txt in.
How would I provide a command line in vDOS, when the commandline option always changes.
So in my autoexec.txt I have the line
abc.exe C:\test.txt
and this works. But the commandline option or filename in this case is always different. It needs something like what works in bat files, like
abc.exe %1
Is this possible please ?
Thanks,
Grant
You want to start a DOS program in vDos with a variable that’s set outside of vDos?
Set some Windows environment variable: %filename%=c:\test.txt.
Then in autoexec.txt:
abc.exe %filename%
Jos
View and moderate all "General" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Thanks Jos, that works. Just to help others, with your help, I expanded on that, and here is what I did.
Contents of abc.bat
SET filename=%1
C:\vDos\vDos.exe
exit
And in autoexec.txt
abc.exe %filename%
Then to run with a filename, from command prompt type the following:
C:\path\abc.bat c:\test.txt
This runs abc.bat passing the filename as first parameter. In bat file it shows as %1, and this is set to the environment variable, in this case the filename. Then from in autoexec.txt the environment variable holds the filename set from the bat file, and so launches abc.exe c:\test.txt
To add to this:
If a DOS variable isn’t found, the Windows environment is searched by vDos.
So %filename% can be found by vDos’s shell, not being a DOS environment variable!
To make this available to DOS programs, you would have to SET filename=%filename% in autoexec.txt.
Until now, I’m reluctant to add %1, %2… to starting vDos, it’s confusing at least.
Jos
View and moderate all "General" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Thanks so much for this program. It works well, and I have made a donation today.