Document directory
- How to call batch processing in C ++, or directly write the batch processing statement in C ++
How to call batch processing in C ++, or directly write the batch processing statement in C ++
[I = s] This post was last edited by kooice at [/I]
Question: How to call batch processing in C ++ or directly write the batch processing statement in C ++
Condition 1: I already have an EXE program in C ++.
Condition 2: When I run the EXE, run the batch processing first. However, batch processing must be hidden. After a delay of 3 seconds
Batch Processing is as follows:
@ Echo off
ECHO is clearing the System junk file. Please wait ......
Del/f/S/Q % systemdrive % \ *. tmp
Del/f/S/Q % systemdrive % \ *. _ MP
Del/f/S/Q % systemdrive % \ *. Log
Del/f/S/Q % systemdrive % \ *. GID
Del/f/S/Q % systemdrive % \ *. Chk
Del/f/S/Q % systemdrive % \ *. Old
Del/f/S/Q % systemdrive % \ recycled \*.*
Del/f/S/Q % WinDir % \ *. Bak
Del/f/S/Q % WinDir % \ prefetch \*.*
RD/S/Q % WINDIR % \ Temp & MD % WINDIR % \ Temp
Del/f/Q % USERPROFILE % \ cookies \*.*
Del/f/Q % USERPROFILE % \ recent \*.*
Del/f/S/Q "% USERPROFILE % \ Local Settings \ Temporary Internet Files \*.*"
Del/f/S/Q "% USERPROFILE % \ Local Settings \ temp \*.*"
Del/f/S/Q "% USERPROFILE % \ recent \*.*"
Echo system spam cleared!
Echo. & pause
Question 2: I just learned C ++, and many don't understand it. I hope someone with good intentions can help me.
It is best to give me a code instance!
For example, how do I add a message to be called in Mian? And so on!
Thank you!
CcnyouPosted on
Float with a cell phone...
Several references for LZ:
I:
Use System
Execute one row
Then sleep.
II:
Input all the commands in it to temp \ TMP. BAT and run them in system/winexec.
KooicePosted on
[B] Reply to [url = Forum. php? MoD = redirect & goto = findpost & pid = 150658 & ptid = 13319] [color = Olive] ccnyou [/color] Post [/url] [/B]
Thank you for your answers.
The answer you gave me has been found in Baidu, but I still don't know how to implement it because I am too busy.
So I hope someone can give me a detailed answer. Thank you.
KooicePosted on
[I = s] This post was last edited by kooice at [/I]
[B] Reply to [url = Forum. php? MoD = redirect & goto = findpost & pid = 150658 & ptid = 13319] [color = Olive] ccnyou [/color] Post [/url] [/B]
Excuse me: Use System to execute one row
Is it like this:
System ("@ echo off ");
System ("Echo is cleaning up System junk files. Please wait ......");
System ("del/f/S/Q % systemdrive % \ *. tmp ");
System ("del/f/S/Q % systemdrive % \ *. _ MP ");
System ("del/f/S/Q % systemdrive % \ *. log ");
System ("del/f/S/Q % systemdrive % \ *. gid ");
System ("del/f/S/Q % systemdrive % \ *. Chk ");
....
Sleep (3000 );
If so, where is this?
Mian ()
{
In the middle? Or above?
}
CcnyouPosted on
In the middle of Main. However, we recommend that LZ first import all BAT files and then execute them, because some command groups in system do not take effect, such as CD \ WINDOWS
KooicePosted on
Thank you! Thank you so much... Already implemented!
But there is a problem... how can we make it hide and run ....
I tested it... It is found that the CMD window will be closed after the batch processing is completed!
Evil0rPosted on
[B] Reply to [url = Forum. php? MoD = redirect & goto = findpost & pid = 150974 & ptid = 13319] [color = Olive] kooice [/color] Post [/url] [/B]
You can call vbs for hidden running.
Set Ws = wscript. Createobject ("wscript. Shell ")
WS. Run "Inst. Bat", 0
Wscript. Sleep 10000
Run the vbs file in BAT and then delete
KooicePosted on
[B] Reply to [url = Forum. php? MoD = redirect & goto = findpost & pid = 151037 & ptid = 13319] [color = Olive] evil0r [/color] Post [/url] [/B]
I don't know how to implement what you said. Can you connect to the one on me and write an example?
CcnyouPosted on
Also running vbs... Use winexec ("cmd.exe/C command", ws_hide)