![]() |
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-10-02 12:37 |
47,813 topics / 349,918 posts / today 0 new / 48,279 members |
| DOS批处理 & 脚本技术(批处理室) » [Help] Execute Based on Hardware |
| Printable Version 1,044 / 3 |
| Floor1 yatv2000 | Posted 2010-08-16 04:21 |
| 初级用户 Posts 30 Credits 52 | |
|
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 |
|
| Floor2 ZJHJ | Posted 2010-08-16 17:49 |
| 高级用户 Posts 374 Credits 609 | |
|
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.
|
|
| Floor3 yatv2000 | Posted 2010-08-17 01:57 |
| 初级用户 Posts 30 Credits 52 | |
Originally posted by ZJHJ at 2010-8-16 05:49 PM: 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! |
|
| Floor4 ZJHJ | Posted 2010-08-17 11:45 |
| 高级用户 Posts 374 Credits 609 | |
|
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......
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |