|
Post by levievre on Jun 21, 2018 10:08:48 GMT 1
Just tried to install last vdos update and I probably missed something since I can't start a windows app from my dos app. Moreover %win_vdos% command in autoexec.txt does not work anymore.
Thank you for your help. Levievre
|
|
|
Post by Jos on Jun 21, 2018 10:20:02 GMT 1
Could you be more specific. You realize that starting a Windows app from your DOS app, the executable path is that of DOS/vDos not that of Windows?
You set the VDOS environment variable in the Windows command prompt, or start vDos with parameters, and the WIN_VDOS environment in vDos doesn’t reflect that?
Jos
|
|
|
Post by levievre on Jun 21, 2018 19:50:01 GMT 1
My dos app and the windows app (dosprinter) are located in the same directory.
I start Vdos with a parameter : "mydosapp.bat". The file Mydosapp.bat is located in the vdos directory.
|
|
|
Post by Jos on Jun 21, 2018 20:25:47 GMT 1
Normally DOSPrinter is executed by setting a printer port, see Printing.pdf. If you however want to start it from within your program: “DOSPrinter.exe” is no valid DOS 8.3 filename, you would have to use “DOSPRI~1.EXE”. Though something like LPT1 = “DOSPrinter.exe” WAIT DOSPrinter_options #lpt1.asc, and a file copy or writing to LPT1 seems a better alternative.
If you start vDos with “mydosapp.bat”: That only sets the WIN_VDOS environment variable to “mydosapp.bat”. %WIN_VDOS% should then start that, else add a PAUSE command to see what’s going wrong.
|
|
|
Post by levievre on Jun 21, 2018 21:11:49 GMT 1
I did rename dosprinter.exe in dp.exe so the problem is not an unvalid filename. I choose to launch dosprinter in my app because I can change dynamically the options to either add a background image, define the margins, make a pdf or send an email (very useful app by the way).
I wonder if the problem is not related to vdos setup program. I only have 5 files in the vdos directory after installation. Do I need to install a previous version first and then update to the 2018.05.01 version ?
|
|
|
Post by Jos on Jun 21, 2018 21:22:45 GMT 1
Well, DOSPrinter was once vDos external print processor. I selected it because it doesn’t need any installation and you can call it directly with parameters.
I guess you just use the wrong path to launch DOSPrinter, it has to be that of DOS, not Windows. Eventually start vDos with the log option (“…vDos.exe” /log parameters). That will create a vDos.log file, find the line where DOSPrinter/PR would have to be executed…
Note: If you want your program to wait for DOSPrinter to finish, precede the DOSPrinter command line with [WAIT] .
|
|
|
Post by levievre on Jun 21, 2018 21:34:46 GMT 1
I don't specify any path to launch dosprinter since dosprinter.exe (dp.exe) and myapp.exe are in the same directory.
Mydosapp.bat does only two things :
CD myappdir Mydosapp.exe
I will try to start vdos with the /log parameter
Thank you.
|
|
|
Post by Jos on Jun 21, 2018 21:44:21 GMT 1
“CD myappdir” sets C:\myappdir as the current DOS directory. If your program doesn’t change that later on, and you don’t specify a path, DOSPrinter.exe (dp.exe) is supposed to be DOS C:\myappdir (not C:\).
The vDos log file should confirm that.
|
|
|
Post by levievre on Apr 9, 2019 14:15:22 GMT 1
Problem solved by renaming dosprinter.exe in dp.exe.
Thank you.
|
|