China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-04 10:07
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » After fully searching for QQ.exe, why can't it be run directly? View 1,567 Replies 8
Original Poster Posted 2006-12-16 15:23 ·  中国 广东 广州 天河区 电信
初级用户
Credits 56
Posts 25
Joined 2006-11-26 09:48
19-year member
UID 71778
Gender Male
Status Offline
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
Floor 2 Posted 2006-12-16 20:14 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline


start "" "%%i"
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
freeapple +2 2006-12-17 02:45
Floor 3 Posted 2006-12-17 02:45 ·  中国 广东 广州 天河区 电信
初级用户
Credits 56
Posts 25
Joined 2006-11-26 09:48
19-year member
UID 71778
Gender Male
Status Offline
Floor 4 Posted 2007-01-07 09:34 ·  中国 辽宁 沈阳 联通
初级用户
Credits 24
Posts 9
Joined 2006-12-27 02:53
19-year member
UID 74657
Gender Male
Status Offline
@Echo off
qq2006.lnk

Completely possible
Floor 5 Posted 2007-01-07 19:05 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
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.
Floor 6 Posted 2007-03-10 20:41 ·  中国 安徽 阜阳 电信
初级用户
Credits 42
Posts 19
Joined 2006-12-28 01:20
19-year member
UID 74752
Gender Male
Status Offline
Early morning, learned another trick, hehe
Floor 7 Posted 2007-04-23 05:47 ·  中国 广东 肇庆 端州区 电信
初级用户
Credits 32
Posts 15
Joined 2007-04-02 01:05
19-year member
UID 83661
Gender Male
Status Offline
Why is this written like this? Please teach me, thank you.
Floor 8 Posted 2007-04-23 06:36 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
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 /?.
Floor 9 Posted 2007-04-23 10:36 ·  中国 浙江 杭州 联通
银牌会员
★★★
Credits 1,928
Posts 931
Joined 2007-01-06 11:46
19-year member
UID 75624
Gender Male
Status Offline
```
@echo off
for /f "skip=4 tokens=3,4" %%i in ('reg query hklm\software\tencent\qq /v install') do start "" "%%i %%jqq.exe"
```
Forum Jump: