XP system, because to run a cracked software, the date must be 2011-02-01, in order to run this software, request, run this batch process first record today is XX year x month x day, Then change the date to 2011.2.1, then run artcampro.exe this file, batch processing silently running in the background, 30 seconds to determine whether the Artcampro.exe process exists, if it does not exist then change back to the original date
————————————————————————————
In fact, I also have a bit of thinking, that is, I feel trouble, I hope that the batch of people to help, solve the problem must be additional reward copy paste party will not have to come
Copy Code code as follows:
@echo off
SET y=%date:~0,4%
SET m=%date:~5,2%
SET d=%date:~8,2%
ECHO%y%/%m%/%d%
DATE 2011/02/01
START "" D:\artcampro.exe
: Loop
Ping-n 127.1>nul
tasklist | Find "Artcampro.exe" >nul
IF%errorlevel%==1 (DATE%y%/%m%/%d%&&exit) Else (GOTO loop)
Pause
The 30 second loop detects if the process exists, does not exist, and then quits the batch with the date returned.
Ask: If I run a few such software, will there be several such processes at the same time?
Answer: This depends on how many times running is not running continuously, that is, before the program (Artcampro.exe) has not been closed, I wrote this just to judge if there are not, not to judge there are several. such as "according to the Dream Qin Yao" said start/wait waiting for the program to end. This can be used to start a program.
Cross-examine: Do not know to have start/wait this, if shut off Artcampro.exe program can change the time to return, this is the best,
So how should you write it?
Reply:
Copy Code code as follows:
@echo off
SET y=%date:~0,4%
SET m=%date:~5,2%
SET d=%date:~8,2%
ECHO%y%/%m%/%d%
DATE 2011/02/01
Start/wait "" D:\artcampro.exe
DATE%y%/%m%/%d%&&exit
Pause
Complete code.
Cross-examine: Did not know before start/wait, today long knowledge, thank you, but also thank you for the other answer.
Questioner's comment: Thanks again
Other 3 answers
Copy Code code as follows:
@echo off
(Echo%date:~0,-3%) >1.txt
Date 2011.2.1
Start Artcampro.exe
: Loop
tasklist|find/i "Artcampro.exe" | | Goto BEGIN
Ping-n 127.0.0.1>nul
Goto Loop
: Begin
set/p D=<1.txt
Date%d%
Pause
Detailed instructions:
Start/wait you can look at the command to help
Wait until the application is started and waits for it to terminate.
Command/program
If it is an internal cmd command or batch file, the command processor is using the
Cmd.exe the/k switch is running. This means that after the command is run, the window
will still exist.
If it is not an internal cmd command or a batch file, it is a program and will
Run as a windowing application or console application.
yyykkkyyyy | Level 13
I'll give you a hand with the batch. Artcampro.exe Program to send a shortcut to the desktop at the same location, if it has been enabled and is running the program, it will not restart the degree and date of change
Copy Code code as follows:
@echo off&cd/d "%~dp0"
If "%~1" = = "h" goto begin
If not exist Hide.vbs (
echo Set ws = CreateObject ("Wscript.Shell" ^)
echo Ws.run "cmd/c%~s0 H", vbhide) >hide.vbs
Start Hide.vbs
Exit
: Begin
tasklist|find/i "Artcampro.exe" &&exit
Set td=%date:~,10%
Date 2011-02-01
Start ""/wait "Artcampro.exe"
Date%td%
According to the Dream Qin Yao | From mobile phone know | Level 13
In fact, do not need to detect, just use the start/wait command to allow batch processing to wait for the end of the program, so you can combine jd08139 the content of the friend can