![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-09-15 12:37 |
47,812 topics / 349,917 posts / today 0 new / 48,268 members |
| DOS批处理 & 脚本技术(批处理室) » About the selection of various methods to achieve P full screen [slore to solve the networking problem] |
| Printable Version 3,073 / 15 |
| Floor1 dosmania | Posted 2007-09-22 04:30 |
| 初级用户 Posts 54 Credits 172 | |
|
This is the code everyone knows to achieve full screen. After using it, the following problems are found: 1. The font appearance after achieving full screen is very poor, and it has a feeling of being squashed. 2. The movement of the cursor will be fully displayed, and it doesn't look good when the space is output and the cursor is displayed. 3. The most serious problem is that ping can reach the external network, but VBS network connection cannot be used. For example, the VBS for downloading web page source code in CMD cannot be used in this full screen mode, which I have tested. 4. It seems that Kaspersky reports "changing the input and output direction..." The second method to achieve full screen: Press ALT+ENTER, this is also known to everyone. Using this method, there are none of the four problems mentioned above. However, everyone doesn't know if there is a way to use ALT+ENTER full screen automatically without manual pressing. The third method to achieve full screen: This is a permanent full screen. Modify the following registry key value: HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe "FullScreen"=dword:00000001 If there is no such sub-item %SystemRoot%_system32_cmd.exe, then create one. The full screen mode achieved by this method has exactly the same effect as the second one, except that the full screen is permanent, unless you change the value of FullScreen to 0. Then can the batch file change the value of FullScreen in the registry at the beginning? The answer is yes, but the memory of the batch program opened at the beginning will not be refreshed That is to say, even if you change the registry at the beginning, full screen cannot be achieved. It will be achieved when the batch is started next time. So I hope that experts can solve this problem. What I want is to achieve full screen without the second run, or someone tells me that this is forever impossible, so that I can give up, but there must be basis. --------------------------------------------------------------- The preliminary solution is seen in building 13 Defect: I found that there was a problem with the network connection when using the method of modifying the registry. The specific details are in the following post: http://www.cn-dos.net/forum/viewthread.php?tid=33750&fpage=1 [ Last edited by dosmania on 2007-9-23 at 08:07 PM ] |
|
| Floor2 slore | Posted 2007-09-22 13:06 |
| 铂金会员 Posts 2,478 Credits 5,212 | |
|
Both need to be run twice... Didn't you see exit and %ComSpec% in the debug you sent?
|
|
| Floor3 dosmania | Posted 2007-09-22 18:37 |
| 初级用户 Posts 54 Credits 172 | |
|
I know that it needs to be run twice.
Using start to start a new window to run the batch file itself will re-read the registry - related settings, so the window started by start will be full - screen The problem is, how to close the original window after starting a new window with start This is a way to deceive people. The main thing is that I don't want to close it and then open it again to achieve full - screen. |
|
| Floor4 slore | Posted 2007-09-22 19:06 |
| 铂金会员 Posts 2,478 Credits 5,212 | |
|
Give BAT a parameter...
Judge whether it is the first time or the second time through the parameter... When there is no parameter, modify the registry... Then exit and call itself + parameter |
|
| Floor5 zh159 | Posted 2007-09-22 20:53 |
| 金牌会员 Posts 1,467 Credits 3,687 | |
Originally posted by slore at 2007-9-22 19:06: No need to judge the first time or the second time, just use REG QUER to judge whether there is the key value to handle Example |
|
| Floor6 yoyodos | Posted 2007-09-22 23:15 |
| 初级用户 Posts 59 Credits 128 | |
|
The landlord is also a person who cares about details, haha, learn something
|
|
| Floor7 dosmania | Posted 2007-09-23 00:24 |
| 初级用户 Posts 54 Credits 172 | |
|
TO all above:
Such code I still can't judge it... Actually you made a mistake here This is correct! Don't just have a bunch of theories, everyone. You should actually test it to see if your theories work. Judge FullScreen, then if it exists, no need to change it; if it doesn't exist, change it. Generally, there is no full screen. Then we don't care whether it originally exists or not, just directly change FullScreen to 1. It's just that you modify the registry after running the batch script. Then you need to read the Fullscreen in the registry before running the batch script. If it was originally 0, your batch script will run in the default window. Then how you change the registry later will only take effect when the batch script runs next time or start a batch script, then you can achieve full screen. Just how to close the original batch script! [ Last edited by dosmania on 2007-9-23 at 01:16 AM ] |
|
| Floor8 zh159 | Posted 2007-09-23 03:21 |
| 金牌会员 Posts 1,467 Credits 3,687 | |
Originally posted by dosmania at 2007-9-23 00:24: I have noted "Example", so it's for reference only Just like the execution command of slore, judge the "FullScreen" value. If it is not "1", change it to "1", and start "" "%~nx0"&&exit (automatically start the second time after exiting) If the "FullScreen" value is "1", do not execute the modification command and start "" "%~nx0"&&exit [ Last edited by zh159 on 2007-9-23 at 03:22 AM ] |
|
| Floor9 slore | Posted 2007-09-23 09:04 |
| 铂金会员 Posts 2,478 Credits 5,212 | |
|
dosmania:
Don't be too serious... You are the "wrong" one... Maybe the running environment is different, directly in the console under XP system... But one point I want to make is that my meaning is not to judge the registry... if "%1"=="" goto FullScreen: Code in full-screen mode... Goto EOF :FullScreen Change the registry FS to 1 here, then exit, and then call yourself casually with a parameter... To do it well, pass the read registry value to your P, and restore it to the default value at the end of P (If convenient, directly package a shortcut... Set the CMD startup in the shortcut to full-screen) |
|
| Floor10 HAT | Posted 2007-09-23 12:34 |
| 版主 Posts 5,017 Credits 9,023 | |
|
Brother slore's idea is really brilliant
|
|
| Floor11 slore | Posted 2007-09-23 13:40 |
| 铂金会员 Posts 2,478 Credits 5,212 | |
|
HAT got my meaning...
Well, write a complete one~ |
|
| Floor12 lxmxn | Posted 2007-09-23 13:51 |
| 版主 Posts 4,938 Credits 11,386 | |
|
Not bad, but the %0 in the second-to-last statement doesn't need double quotes. If %0 contains spaces, cmd will automatically preprocess it into a path with double quotes added. Adding double quotes will instead easily cause errors.
|
|
| Floor13 slore | Posted 2007-09-23 14:11 |
| 铂金会员 Posts 2,478 Credits 5,212 | |
|
Hehe, that was directly copied...
Hmm, I found that EOF doesn't exit in full screen... I made some changes...
|
|
| Floor14 dosmania | Posted 2007-09-23 17:27 |
| 初级用户 Posts 54 Credits 172 | |
|
The method is wonderful~~~
I always thought that after starting a new window with start, it would wait until the code of the new window is executed before executing exit. Oh, I see`` It turns out that it can be executed synchronously because it runs in different memory spaces, right`` The design of the restore mode is also wonderful, haha %SystemRoot%_system32_cmd.exe This entry was automatically created in the registry after I modified the full-screen properties in the CMD window. It turns out that fullscreen in console also works. I accept it marvelously and thank you all for your attention. In addition, %SystemRoot%_system32_cmd.exe is to modify CMD.exe Directly modifying the console is to modify that command prompt |
|
| Floor15 HAT | Posted 2007-09-23 21:38 |
| 版主 Posts 5,017 Credits 9,023 | |
|
//But the %0 in the second-to-last statement does not need double quotes. If %0 contains spaces, cmd will automatically preprocess it into a path with double quotes added. Adding double quotes will instead easily cause errors.
Study hard and make progress every day |
|
| 1 2 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |