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-07-29 05:40
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] Execute Based on Hardware View 903 Replies 3
Original Poster Posted 2010-08-16 04:21 ·  中国 云南 昆明 电信
初级用户
Credits 52
Posts 30
Joined 2007-02-13 02:30
19-year member
UID 79344
Gender Male
Status Offline
How should the following code be modified so it can launch QQ based on hardware. What I mean is, if the information stored in drives.ini is the same as what is read out, then launch QQ. If it is not the same, then do not launch QQ. Could one of the experts here help me modify it? Thanks.

@echo off
color 0a
title Hardware Detection
mode con cols=90
sc config winmgmt start= auto >nul 2<&1
net start winmgmt 2>1nul
setlocal ENABLEDELAYEDEXPANSION
echo.
for /f "tokens=1,* delims==" %%a in ('wmic cpu get name^,ExtClock^,CpuStatus^,Description /value') do (
set /a tee+=1
if "!tee!" == "6" echo %%b
)
set r=%%b
findstr /c:"%r%" drives.ini
if %errorlevel%==0 start QQ.exe
pause
Floor 2 Posted 2010-08-16 17:49 ·  中国 四川 泸州 联通
高级用户
★★★
Credits 609
Posts 374
Joined 2006-08-02 22:38
19-year member
UID 59720
Status Offline
QQ is not run only on one unique machine, so is a setup like this useful? I don't quite understand. If you wrote a program that can only run after identifying the hardware, that I have done before. You can consider Product ID + system model + total memory + network card.
Floor 3 Posted 2010-08-17 01:57 ·  中国 云南 昆明 电信
初级用户
Credits 52
Posts 30
Joined 2007-02-13 02:30
19-year member
UID 79344
Gender Male
Status Offline
Originally posted by ZJHJ at 2010-8-16 05:49 PM:
QQ is not run only on one unique machine, so is a setup like this useful? I don't quite understand. If you wrote a program that can only run after identifying the hardware, that I have done before. You can consider Product ID + system model + total memory + network card.



My program is not necessarily QQ. I was just using QQ as an example. I know encryption software can do this. But encrypted software needs a registration code. On restored machines it has to be registered every time. That's not good. Please help me modify it. Or write one. Thank you!
Floor 4 Posted 2010-08-17 11:45 ·  中国 四川 广元 联通
高级用户
★★★
Credits 609
Posts 374
Joined 2006-08-02 22:38
19-year member
UID 59720
Status Offline
In my view, as a batch program, no matter how you encrypt it, it still has to be restored when running. It can deal with some users, but many people are experts and can decrypt it. Although what I mentioned can use Product ID + system model + total memory + network card to handle registration, once it is registered it cannot run on a different machine, which means it can only run on one machine (because the registration code obtained will not be the same). That is how I used to do it. The functional executable would decrypt one program (the encrypted edition of Computer System Maintenance). But the restoring batch file still has to exist somewhere, and once it is found, it's all source code. Delete the relevant parts... then wouldn't it all be pointless. So in the end Computer System Maintenance was released in the source-code edition. It was only for learning anyway. Unless you give up batch files......
Forum Jump: