当前位置:网站首页>C language shutdown applet
C language shutdown applet
2022-07-27 00:29:00 【TheshyO_ o】
Catalog
Shut down the applet
This string of code runs , The computer will turn off in one minute , If I'm a pig , Will cancel the shutdown .
Here we use a string of code shutdown -s -t 60.
shutdown It's shut down ,-s Set shutdown ,-t Set the time to shut down ,60 Setup time .
C Language provides a function system( Execute system commands ), The header file stdlib.h.
We put shutdown -s -t 60 Put it in system Inside .
Run up , The system will execute shutdown -s -t 60.
shutdown -a Yes, cancel shutdown , Of course shutdown -a Put it in system Inside .
When inputting that I am a pig .
The system will execute shutdown -a To cancel shutdown .
int main()
{
char password[20] = { 0 };
printf(" Please enter that I am a pig , Otherwise, the computer will shut down in a minute \n");
system("shutdown -s -t 60");
again:
scanf("%s", password);
if (strcmp(password, " I am a pig ") == 0)
system("shutdown -a");
else
{
printf("% Give you another chance \n");
goto again;
}
return 0;
}After writing this string of code , Run it and you can find the string of code converted in the folder where the code is saved exe file
Click on exe Executable program You can directly run this string of code , You can also give exe Change the name and icon of the file to share with our friends .
Friendship tips :

Search for services here , Then save the executable program into the service through a single operation , Set to startup and self startup ,60 Seconds later, the shutdown can also be changed to any time . In this way, this code will be run directly as soon as you start the machine , As soon as the computer is turned on, it is already on the way to turn it off .
Of course , It's easy to lose friends , No Suggest Let's try .
边栏推荐
猜你喜欢
![[Qt]属性](/img/ca/5f9d8f33e38b0ac5cbb0768a7b3ffd.png)
[Qt]属性

Uni app learning (II)

Shang school software testing (1) software testing curriculum system, advantages, learning suggestions, understanding software, software testing and defects, software testing process, debugging and te

ResNet论文解读及代码实现(pytorch)

画冲击函数

Anaconda = > pycharm=> CUDA=> cudnn=> pytorch environment configuration

deeplabcut使用1

Go exceed API source code reading (IV) -- save (), SaveAs (name string)

RESNET paper interpretation and code implementation (pytorch)

12_ Decision tree
随机推荐
Deployment of yolov5 on Jetson nano deepstream
卷积神经网络——LeNet(pytorch实现)
类与对象笔记一
4. Talk about the famous Zhang Zhengyou calibration method
20220720 toss deeplobcut2
寻找真凶
2020-12-22最大公因数
Alexnet (pytoch Implementation)
Signal and system learning zero input response
深度学习调参技巧
【4.9 容斥原理详解】
View where Anaconda created the environment
输入一串字母 将里面的元音输出希望各位大佬能给指导
Lt9611ux Mipi to HDMI 2.0 dual port with audio
LeetCode——链表篇
[Qt]属性
Error generating yolov5.wts file
10_ Evaluate classification
Find method of web page parsing by crawler
8_多项式回归及模型泛化(Polynomial Regression and Model Generalization)