![]() |
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 21:03 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| DOS批处理 & 脚本技术(批处理室) » [Closed]Strange Things About Hiding Batch Execution in the Start-up Menu |
| Printable Version 1,739 / 10 |
| Floor1 hackate | Posted 2008-12-04 19:50 |
| 中级用户 Posts 125 Credits 228 | |
|
This code is for hiding the running of a batch script.. I wrote a batch script.. put this batch script into the "Startup" in the start menu.. Then the computer prompts a script error every time it starts up... saying that the file is not found... But I can run it manually directly.. really don't know where the mistake is... Could it be that the form of running at startup is different?/ Please help the experts to solve... [ Last edited by HAT on 2008-12-5 at 13:57 ] |
|
| Floor2 hackate | Posted 2008-12-04 20:25 |
| 中级用户 Posts 125 Credits 228 | |
|
Why is there no one coming to take a look? I'm郁闷了.
|
|
| Floor3 tireless | Posted 2008-12-04 20:29 |
| 银牌会员 Posts 1,122 Credits 2,025 | |
|
Try changing %~nx0 to %0
|
|
| Floor4 hackate | Posted 2008-12-04 20:50 |
| 中级用户 Posts 125 Credits 228 | |
|
Reply: Back to Brother TREE, I have tested it before, it didn't work, the same error... This problem is really frustrating.
|
|
| Floor5 lxmxn | Posted 2008-12-04 22:49 |
| 版主 Posts 4,938 Credits 11,386 | |
|
How about trying this?
run("""%~0"" h",0) |
|
| Floor6 dato | Posted 2008-12-05 00:00 |
| 高级用户 Posts 377 Credits 916 | |
|
It is estimated that ping will be used again for delay processing.
I have encountered this situation many times. Personally, I understand that some commands cannot be run at a certain startup moment, so ping can only be used for delay processing until entering the desktop or a certain moment to be able to run. Previously, a batch script that used.cmd to run sc to control services could be placed to run at the computer startup stage. Later, when packaged into an.exe file with nsi, it can only run at the user startup stage. The difference is one runs with cmd.exe and the other needs to use wscript.exe |
|
| Floor7 hackate | Posted 2008-12-05 13:05 |
| 中级用户 Posts 125 Credits 228 | |
|
Reply to brother LXMXN.. It's no use, I've tested this method too.
Reply to the above DATO brother, I also thought so, and later I solved it. Solved it in the following way... [ Last edited by hackate on 2008-12-5 at 13:07 ] |
|
| Floor8 5551551 | Posted 2008-12-05 19:33 |
| 初级用户 Posts 39 Credits 37 | |
|
This post is worth collecting
|
|
| Floor9 fjdragon | Posted 2009-02-11 11:05 |
| 新手上路 Posts 2 Credits 3 | |
| Floor10 netbenton | Posted 2009-02-11 12:59 |
| 银牌会员 Posts 752 Credits 1,916 From 广西 | |
|
Actually, you should directly change:
start mshta vbscript:CreateObject("WScript.Shell").Run("%~NX0",0)(window.close)&&exit The Run("%~NX0",0) in it to: Run("%~f0",0) or Run("%~dpnx0",0) Is that okay? |
|
| Floor11 ddd010 | Posted 2009-11-19 18:25 |
| 新手上路 Posts 12 Credits 15 | |
|
Learning. In fact, DATO's statement is very practical.
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |