views:

107

answers:

3

Is there any way to display an warning message if the user tries to install my app when the battery level is under 5%? I'm using InstallShield.

+1  A: 

Don't know if Installshield supports this directly, but you could create a autorun menu program that gets run first, that checks battery level, then if its ok, runs setup ?

Nick Haslam
+1  A: 

There are several .NET-related answers in this SO question. At least the GetSystemPowerStatusEx function could be helpful for you.

schnaader
A: 

What version, edition of InstallShield and project type are you using? The answer depends, but generally InstallShield can call Win32, COM and Managed API's so it is very doable with a little bit of coding.

I'd wonder if you really want to check at 5% though. Most installs I've seen simply check that you are on line power instead of battery when gating the install. 5% is already pretty low and might now give you much time to do whatever you need.

Christopher Painter

related questions