Video Screencast Help
Search Video Help Close Back
to help
Not able to make it to Vision this year? Get a sampling in the Best of Vision on Demand group.

Call DLL Function to reboot

Updated: 23 May 2010 | 8 comments
mqh777's picture
0 0 Votes
Login to vote

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

EdT's picture
18
Oct
2008
0 Votes 0
Login to vote

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.

mqh777's picture
18
Oct
2008
0 Votes 0
Login to vote

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.

EdT's picture
19
Oct
2008
0 Votes 0
Login to vote

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.

mqh777's picture
20
Oct
2008
0 Votes 0
Login to vote

Yes, I have looked on DragonSoft but have not found what I am seeking yet :-)

EdT's picture
21
Oct
2008
0 Votes 0
Login to vote

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.

Tu Pham's picture
20
Nov
2008
0 Votes 0
Login to vote

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.

EdT's picture
20
Nov
2008
0 Votes 0
Login to vote

quote:
Originally posted by: tupham

the superior way is to execute vbscript via embedded code.




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.

mqh777's picture
15
Jan
2009
0 Votes 0
Login to vote

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/