I tried to create a script with c++ which will active a batch code if user tries to shutdown his computer.
if(system("shutdown -s")){ runs batch code }
But I failed so then I attempted (did not try because I dont how to and couldn't found anythink helpful on google so I ask you guys now) to create a bath code which will be active for 30 minutes and if user tries to shutdown his computer it will run another batch code which I used on my c++ project I mentioned in the beginning. So can you guys help me with this? You can tell me how to write this full on batch , or use c++ 's if else statement then run the batch code. Thanks.
Aucun commentaire:
Enregistrer un commentaire