Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

doskey command in shortcut or registry 1

Status
Not open for further replies.

talktwo

Technical User
Oct 16, 2002
19
US
We have new wk2 machines & one dosbased program that loads with a small screen even if we change the windows size. I can make the dos program window large by using the doskey mode con:lines=25. How do I use this command before loading the program command in my shortcut? If not there how do I put it in the current user registry? Any help appreciated?
 
Talktwo,

The quickest way is to create a shortcut to your DOS Program.

Right-click on the exe and create shortcut.
Right-click on the shortcut and go to properties.
Now you can set memory, path etc.
By default, it will open in a window.
Once open, right-click on the TOP LEFT and select properties.
In the layout page, you can set the window size etc.
Save for future windows ...

Ian
 
Thanks Ian,
I have the shortcut created, but I still need to add both the doskey command and the program.exe in the shortcut and I do not see where to add both. The doskey is needed before the program so the screen of the program will be full size and not just 1/3 of the screen. I tried a batch file with both in but the program locks down when I do this and it does not lock down when it is run in a regular cmd shortcut screen with only the program.exe in command line. Will try any suggestions!!
Thanks,
talktwo
 
talktwo,

You shouldn't need doskey. Open the shortcut properties and go to the Screen tab and set it to Full Screen. Check the Misc tab and untick Background, if you require it.

Ian
 
Hello talktwo,

In your case, you do it this way for current user. (For all user, it is slightly different, but essentially the same.)

[0] You say that "I can make the dos program window large by using the doskey mode con:lines=25." I do not quite get it. Do you really mean lines=25 or any number larger? What follows I put lines=50, just in case. You can change accordingly.

[1] Make out a .reg file

'-----below this line----
REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"AutoRun"="mode con:lines=50"

'-----above this line----

[2] Import the file by regedit.exe. (I presume you know well the registry. An examination and backup what you get there beforehand is a good practice. And you know from the above .reg what key you are looking for.)

[3] Other remarks.
[3.1] As one line suffices, your AutoRun key can be REG_SZ no problem.
[3.2] If you need to set it for all users, replace HKCU by HKLM.
[3.3] This will make all win-dos environment the way you specify in mode con for all applications, opening any data files before overriden. In particular, your dos-based program and data files. Hope this is what you desire to see.

regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top