中国DOS联盟论坛

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-08-10 16:01
47,811 topics / 349,897 posts / today 0 new / 48,255 members
DOS批处理 & 脚本技术(批处理室) » Batch scripts that can run in minimized mode
Printable Version  11,810 / 28
Floor1 zh159 Posted 2006-11-26 12:49
金牌会员 Posts 1,467 Credits 3,687
Minimize the running batch file starting with itself


Although not as good as shortcuts and VBS for hiding, it only needs one file itself
Floor2 lxmxn Posted 2006-11-26 20:21
版主 Posts 4,938 Credits 11,386
Hehe, not bad, this method can also work, ha~
Floor3 IceCrack Posted 2006-11-26 21:53
中级用户 Posts 168 Credits 332 From 天涯
It feels like there are still two files. One is echoing VBS, and the other is just echoing BAT.
Floor4 anqing Posted 2006-11-26 23:02
高级用户 Posts 413 Credits 859
The meaning of this sentence: The user's sentence ">Temp.bat echo start/min "" "%~nx0"^&exit" I wrote it separately into temp, and then run this Temp.bat. After running, it cannot end its process, and the machine also has a phenomenon of freezing. I don't know why. I wonder if the landlord can give some advice? Finally, I have to restart!
Floor5 vlq5299 Posted 2006-12-05 02:57
初级用户 Posts 59 Credits 136
It's all in the process and taskbar.
Floor6 HUNRYBECKY Posted 2007-01-18 08:32
银牌会员 Posts 442 Credits 1,179
Use the CMDNOW tool. This tool is very powerful and is specifically used to handle DOS or non-DOS windows. You can add CMDOW.EXE @ /DIS at the beginning of the batch processing to prohibit changing the window. If you want to hide the window, use CMDOW.EXE @ /HID. This command can be downloaded from http://commandline.co.uk.
Floor7 tghksj Posted 2007-01-18 08:52
社区乞丐 Posts 90 Credits -49
Teacher HUNRYBECKY

The address you provided for the telecom network opening is a bit difficult. Please attach one, thank you:)
Floor8 lotus516 Posted 2007-01-18 09:09
高级用户 Posts 246 Credits 551
Floor9 everest79 Posted 2007-01-18 09:16
金牌会员 Posts 1,127 Credits 2,564
@echo off&&mode con cols=15 lines=1
%1 %2
start /min /i "" "%~nx0" goto min&&goto :eof

:min
echo xxx
pause>nul
exit
I imitate one
Floor10 zh159 Posted 2007-01-18 10:20
金牌会员 Posts 1,467 Credits 3,687
Originally posted by anqing at 2006-11-26 10:02:
The sentence of lz > Temp.bat echo start/min "" "%~nx0"^&exit I write it separately into temp, then run this Temp.bat. After running, since I can't end its process, the machine also has a fake...

You said this is repeatedly running Temp.bat itself, which will start countless ones, occupying extremely large resources, of course it will cause the machine to freeze phenomenon...

Originally posted by everest79 at 2007-1-17 20:16:
@echo off&&mode con cols=15 lines=1
%1 %2
start /min /i "" "%~nx0" goto min&&goto :eof

:min
echo xxx
pause>nul
exit

I imitate one

This is good, no temporary files are generated
Floor11 everest79 Posted 2007-01-19 04:04
金牌会员 Posts 1,127 Credits 2,564
Floor12 lixinwu Posted 2007-01-20 01:03
初级用户 Posts 14 Credits 31
To truly hide, other methods need to be used
Floor13 kafen Posted 2007-01-20 04:45
初级用户 Posts 43 Credits 97
This is a batch script. Let's break it down step by step:

First line: `@echo off&&mode con cols=15 lines=1` - `@echo off` turns off the display of commands being executed. `&&` is a logical AND operator, so if `@echo off` is successful, then `mode con cols=15 lines=1` is executed, which sets the console window to have 15 columns and 1 line.

Second line: `%1 %2` - This passes the first and second command-line arguments to whatever is being called.

Third line: `start /min /i "" "%~nx0" goto min&&goto :eof` - `start /min` starts a new window in minimized mode. `/i` sets the new window's environment to inherit the original's. The empty string is for the window title. `%~nx0` is the name and extension of the current batch file. Then it tries to `goto min` and if that's successful, it `goto :eof` (end of file).

Then the `:min` label: it echoes "xxx" and pauses until a key is pressed, then exits.

But the user just asked to translate the Chinese part where they said "我模仿一个" which translates to "I imitated one" but since the main task is to handle the translation of the provided text as per requirements, the overall translated text of the code block remains as the original code with the Chinese comment translated as above.

So the translated text for the whole content as per the request is:

Originally posted by everest79 at 2007-1-18 09:16:
@echo off&&mode con cols=15 lines=1
%1 %2
start /min /i "" "%~nx0" goto min&&goto :eof

:min
echo xxx
pause>nul
exit

I imitated one
Floor14 everest79 Posted 2007-01-20 08:31
金牌会员 Posts 1,127 Credits 2,564
When you double-click to execute, this batch file will only execute the following code:

Floor15 HUNRYBECKY Posted 2007-01-20 09:14
银牌会员 Posts 442 Credits 1,179
Originally posted by everest79 at 2007-1-18 09:16:
@echo off&&mode con cols=15 lines=1
%1 %2
start /min /i "" "%~nx0" goto min&&goto :eof

:min
echo xxx
pause>nul
exit

The one I imitated is not a real hide, the effect is not good.


The one imitated is not a real hide, the effect is not good.
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023