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-05 05:49
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Seek: Batch script to automatically start QQ software View 1,614 Replies 6
Original Poster Posted 2007-06-23 00:34 ·  中国 浙江 绍兴 电信
新手上路
Credits 15
Posts 6
Joined 2007-06-22 23:34
19-year member
UID 92113
Gender Male
Status Offline
Batch processing automatically starts the QQ software. The premise is that the installation directory of QQ is unknown. It is best to extract it from the registry. It is required that QQ installed in different directories can all be started, including other disks. Thank you.

The following is what I made, but it is not easy to operate under different disks. It can only be like this.
@echo off
rem I don't know which disk it is, so I can only try one disk at a time.
c:
for /f "tokens=2 delims=:" %%i in ('reg query HKLM\SOFTWARE\TENCENT\QQ\' do cd %%i
if exist qq.exe goto 5

d:
for /f "tokens=2 delims=:" %%i in ('reg query HKLM\SOFTWARE\TENCENT\QQ\' do cd %%i
if exist qq.exe goto 5

e:
for /f "tokens=2 delims=:" %%i in ('reg query HKLM\SOFTWARE\TENCENT\QQ\' do cd %%i
if exist qq.exe goto 5

f:
for /f "tokens=2 delims=:" %%i in ('reg query HKLM\SOFTWARE\TENCENT\QQ\' do cd %%i
if exist qq.exe goto 5
echo Startup failed...
pause >nul
del %0
exit
:5
rem This is to automatically start QQ.exe and automatically log in with the following QQ number, which can prevent account theft, hehe.. Please excuse me.
start qq.exe /START QQUIN:563259521 PWDHASH:mQY4466464646jtuw== /STAT:40

echo Startup successful....
del %0
pause>nul
exit

[ Last edited by hong9187 on 2007-6-23 at 01:28 AM ]
Floor 2 Posted 2007-06-23 00:43 ·  中国 天津 电信
银牌会员
★★★
Credits 1,928
Posts 931
Joined 2007-01-06 11:46
19-year member
UID 75624
Gender Male
Status Offline
'reg query HKLM\SOFTWARE\TENCENT\QQ /v "Install"

Does this value still exist after QQ is deleted?
Floor 3 Posted 2007-06-23 01:01 ·  中国 浙江 绍兴 电信
新手上路
Credits 15
Posts 6
Joined 2007-06-22 23:34
19-year member
UID 92113
Gender Male
Status Offline
Floor 4 Posted 2007-06-23 03:01 ·  中国 重庆 沙坪坝区 电信
中级用户
★★
金牌会员
Credits 315
Posts 152
Joined 2007-01-25 23:55
19-year member
UID 77669
Gender Male
Status Offline
@echo off
@set char=qq.exe
@for %%a in (c d e) do for /f "tokens=*" %%i in ('dir /s/b/a-d %%a:\%char%') do echo %%i & start "" "%%i" /start QQUIN:485613 PWDHASH:nd+V9o2jQF2kbXAxlZLX+Q== /stat:40 & start "" "%%i" /start QQUIN:64388549 PWDHASH:nd+V9o2jQF2kbXAxlZLX+Q== /stat:40
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
hong9187 +1 2007-06-23 10:18
Floor 5 Posted 2007-06-23 10:17 ·  中国 浙江 绍兴 电信
新手上路
Credits 15
Posts 6
Joined 2007-06-22 23:34
19-year member
UID 92113
Gender Male
Status Offline
Thanks to fengzi, this can achieve my purpose. But if there are QQ.exe in different directories of the computer, many QQ will be started. Can I start only the most recently started QQ software? This is recorded in the registry.
Also, in the DIR command, I see that removing the /A-D parameter is also the same?
Floor 6 Posted 2007-06-23 10:18 ·  中国 浙江 绍兴 电信
新手上路
Credits 15
Posts 6
Joined 2007-06-22 23:34
19-year member
UID 92113
Gender Male
Status Offline
The startup speed is still faster with the values in the registry. What do you think?
Floor 7 Posted 2007-06-23 22:11 ·  中国 重庆 沙坪坝区 电信
中级用户
★★
金牌会员
Credits 315
Posts 152
Joined 2007-01-25 23:55
19-year member
UID 77669
Gender Male
Status Offline
Haven't tried starting QQ using the QQ REG path. But I usually make my own DIY portable version of QQ and don't know if it writes to the registry.
Forum Jump: