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-27 06:27
中国DOS联盟论坛 » 其它操作系统综合讨论区 » Failed to search. How to determine the QQ installation path according to the registry? View 1,871 Replies 5
Original Poster Posted 2007-08-11 16:56 ·  中国 广东 深圳 福田区 电信
初级用户
Credits 105
Posts 44
Joined 2006-10-05 13:57
19-year member
UID 64618
Status Offline
How to determine the QQ installation path according to the registry, and set the path as a variable? Looking forward to experts!
Floor 2 Posted 2007-08-13 09:26 ·  中国 广东 深圳 福田区 电信
初级用户
Credits 105
Posts 44
Joined 2006-10-05 13:57
19-year member
UID 64618
Status Offline
Why is there no one who knows? I want to use P to handle automatically starting QQ. It's all sunk, give it a bump!
Floor 3 Posted 2007-08-13 14:16 ·  中国 四川 南充 电信
超级版主
★★★★
我爱DOS
Credits 5,310
Posts 2,044
Joined 2005-09-26 12:00
20-year member
UID 42843
Gender Male
From 四川南充
Status Offline
Floor 4 Posted 2007-08-14 08:30 ·  中国 河北 保定 联通
铂金会员
★★★★
网络独行侠
Credits 6,962
Posts 2,753
Joined 2003-04-16 00:00
23-year member
UID 1565
Gender Male
From 河北保定
Status Offline
QQ can be regarded as a green software. For example, if you reinstall the system, there is no need to reinstall QQ at all. You can directly start the original installed QQ.exe to run QQ. Therefore, querying the installation path of QQ through the registry method may not be effective. However, I found the following key value in the registry that saves the installation path of QQ:

[HKEY_LOCAL_MACHINE\SOFTWARE\Tencent\QQ]
install="..."

The following command can be used to query:
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Tencent\QQ /v install

Combined with the for command, this path can be extracted to the environment variable as follows:

for /f "usebackq tokens=2,*" %i in (`reg query KEY_LOCAL_MACHINE\SOFTWARE\Tencent\QQ /v install ^| find /i "install"`) do set QQPath=%j
echo %QQPath%
偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
Floor 5 Posted 2007-08-14 09:21 ·  中国 天津 电信
银牌会员
★★★
Credits 1,928
Posts 931
Joined 2007-01-06 11:46
19-year member
UID 75624
Gender Male
Status Offline
Hehe, the person above, isn't this the same effect as the 3rd floor?
Floor 6 Posted 2007-08-16 16:13 ·  中国 广东 深圳 南山区 电信
初级用户
Credits 105
Posts 44
Joined 2006-10-05 13:57
19-year member
UID 64618
Status Offline
Thanks everyone
@echo off
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Tencent\QQ /v install>cv.txt
for /f "usebackq tokens=2,*" %%i in (cv.txt) do set QQPath=%%j
echo The location where your QQ is installed is: %QQPath%
del cv.txt
pause

It succeeded!
Forum Jump: