#include <iostream>
#include <conio>
#include <windows>
void main()
{
int opt;
cout<<"\t\twhich type of window you have\n\t\tEnter one for shoutdown for windows xp\n\t\tEnter 2 for windows 7\n";
switch(opt)
{
case 1:
system("C:\\WINDOWS \\System32\\shutdown-s-t-0");
break;
case 2:
system("C:\\WINDOWS \\System32\\shutdown/s/t 0");
break;
}
getch();}
using borland execute that program and shutdown your computer ...................
asifalizaman
1
Junior Poster
Recommended Answers
Jump to Postwhich version of Borland compiler? You would have to have a 32-bit version in order to access the win32 api functions. Can't do that with Turbo C or Turbo C++. Here are …
Jump to Post.i think you can do it with turbo c or turbo c++ .
Yes, the posted program will work if compiled with a 32-bit compiler, not sure if it will with Turbo C or not because Turbo C may not be able to "see" the c:\windows folder since …
Jump to PostDoesn't the program you posted do it? Although both cases are identical.
All 9 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
asifalizaman
1
Junior Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
asifalizaman
1
Junior Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
asifalizaman
1
Junior Poster
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
asifalizaman
1
Junior Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.