中国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-04 09:08
48,038 topics / 350,123 posts / today 0 new / 48,251 members
DOS批处理 & 脚本技术(批处理室) » After fully searching for QQ.exe, why can't it be run directly?
Printable Version  1,566 / 8
Floor1 freeapple Posted 2006-12-16 15:23
初级用户 Posts 25 Credits 56
The code is as follows:
@echo off
@set /p char=Enter the file name to search for:
@echo Searching, please wait...
@for %%a in (c d e f) do for /f "tokens=*" %%i in ('dir /s/b/a-d %%a:\%char%') do echo %%i & start "%%i"
pause

For example, when entering QQ.exe, it can be found but cannot be directly run? While in win+r cmd start qq.exe can run it without the path, I find it very strange. Please ask an expert for guidance~ Thank you
Floor2 lxmxn Posted 2006-12-16 20:14
版主 Posts 4,938 Credits 11,386

Floor3 freeapple Posted 2006-12-17 02:45
初级用户 Posts 25 Credits 56
Floor4 gaomushan Posted 2007-01-07 09:34
初级用户 Posts 9 Credits 24
@Echo off
qq2006.lnk

Completely possible
Floor5 lxmxn Posted 2007-01-07 19:05
版主 Posts 4,938 Credits 11,386
Originally posted by gaomushan at 2007-1-6 20:34:
@Echo off
qq2006.lnk

It's completely possible


  I don't know if you've tried it. I tried it, but it didn't work.
Floor6 shuaigeya Posted 2007-03-10 20:41
初级用户 Posts 19 Credits 42
Early morning, learned another trick, hehe
Floor7 421062724 Posted 2007-04-23 05:47
初级用户 Posts 15 Credits 32
Why is this written like this? Please teach me, thank you.
Floor8 lxmxn Posted 2007-04-23 06:36
版主 Posts 4,938 Credits 11,386
Originally posted by 421062724 at 2007-4-22 16:47:
Why is it written like this?
Please teach me, thank you

The first quote after Start is considered to specify the title. So directly Start "C:\windows\notepad.exe" will open a CMD window with the title "C:\windows\notepad.exe". So adding a pair of empty quotes "" in front can solve the problem.

For specific explanations, please refer to Start /?.
Floor9 wudixin96 Posted 2007-04-23 10:36
银牌会员 Posts 931 Credits 1,928
```
@echo off
for /f "skip=4 tokens=3,4" %%i in ('reg query hklm\software\tencent\qq /v install') do start "" "%%i %%jqq.exe"
```
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023