I have recently made a small program in C++ which prompts the user for yes or no and then if its a yes, the program will shutdown the computer. I made it because I hate the way you have to turn off windows 8.
I made this program in MS visual ultimate 2012 and I tried to search on the internet about how to release a C++ program but I could find anything.
I am a beginner so I'm still learning C++. Basically I want to make a program that will install my program on a computer running windows, so its doesn't have to be complicated. I've just found where I saved my project and copied the 'Debug' folder and pasted it in program files on the C drive and got the application file that starts the program and out it on the desktop? Is that right? - I know this isn't really installing it but it does work.
Remember I am using MS visual ultimate 2012.
Another problem is I am using the code: system("shutdown -s -t 1"); and I have read that this system() is evil and really bad to use as it causes big security holes; is there any other way that I can tell the computer to shutdown or is that code ok?
If you want me to post my C++ source code of the program if you need it, just ask.
Yeah I came across the function ExitWindowsEx but it was going on about inputting values and other parameters, I didn't understand it so I didn't use it.
But you've got the ExitWindowsEx( EWX_SHUTDOWN | EWX_FORCEIFHUNG ); as a beginner I probably should tackle this now but like I said before I tried to use and that was the website I found, I do want to use it but just could not get it to work with all the _In_ and values you have to do.
You want to compile your program. You also do not need to write an installer. Intallers generally set up registry values, create the folder directies for the program, etc... but you're writing somthing small that doesn't need to create any files and such (i assume). Even if it did need to create files it isn't necessary to write an installer.
You can just copy/paste the binary anywhere to use it.
Oh right interesting.
Might have a go at it.
Wow, still got a lot to learn though ;)
I made the shutdown program with a nice power button from icon archive; search it on Google if you have never heard of it.
Probably have but oh well.