Call DLL Function to reboot
Updated: 23 May 2010 | 8 comments
Can the CALL DLL Function command force a reboot of a XP system and if so how? What API do you call and what parms to you pass it?
Thank you.
Discussion Filed Under:
Comments
No need to start working out DLL calls - check out the SHUTDOWN.EXE utility that is present in the system folder on XP and later operating systems. You can force reboots, perform shutdowns, allow a countdown for users to save data, etc.
Just call it using the Execute Program command with the switches you need.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
Yes, I have been using Shutdown.exe for years but I wanted to know how to do it with Wise calling a DLL since it seems a bit cleaner.
Thanks.
I don't have any code for this, but have you looked in the Dragonsoft library?
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
Yes, I have looked on DragonSoft but have not found what I am seeking yet :-)
I'm back in the UK now, so have been able to search my archives of old postings and code samples.
I have attached a wisescript that appears to offer reboot capabilities. I have not tested it, so it's up to you to see if it does what you need.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
Why would you want to use a DLL instead of an EXE? If you ask me, the superior way is to execute vbscript via embedded code. Otherwise shutdown.exe -r -t 0 will work fine.
This forum is for the Wisescript-only product, which does not support embedded vbscript.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
tupham, if you read the whole thread you will see where I wrote that I have been using shutdown.exe for years.
Shutdown tools and utilites usually make a DLL call to shutdown the machine and I wanted to know what that DLL call was and how to call it within Wise Script. That was my question.
As far as embedding vbscripts inside of custom actions in your MSI's
http://www.tipandtrick.net/200...or-uninstall-on-vista/
Would you like to reply?
Login or Register to post your comment.