Hello guys.
I am new on this forum and new also new in learn about batch file.
Me question is about a code made it in c programming.
If i run this code allows me to shutdown the computer,but also i want to run this code in a batch file to shutdown the computer.
The path of this code is : C:\Users\mircea\Desktop\Shutdown My Computer\bin\Debug\Shutdown My Computer.exe.
I have tried many options but no result.
Look at this code in C :
#include <stdio.h>
#include <stdlib.h>
int main()
{
char ch;
printf("\n Do you want to shutdown the computer (y/n) ?\n\n");
printf(" ");
scanf("%c", &ch);
if(ch == 'y' || ch == 'Y')
system("C:\\WINDOWS\\System32\\shutdown -s");
return 0;
}
I wait some advices.
Thank you.
All the best.