Jump to content

Recommended Posts

Guest caio1
Posted

It would be handy to have a utility which just do a soft reset of the phone.

I know it's possible because sometime when I install some applications at the end of the process the phone asks me if I want to reset and choosing yes the phone shuts down and turn on again by itself.

Caio

Guest Soyale
Posted

We wrote one but I won't release it because I'm convinced that Soft Resetting the phone through code causes registry corruption because things don't get saved to the IPSM properly.

jp

Guest caio1
Posted

Strange than that microsoft implemented such a feature... however when it resets it shows the Smartphone2002 logo screen as when you use the power button to shut down.

Caio

Guest Soyale
Posted

Hmm. Not the way we do it so maybe that's why. What application are you thinking of that does this reset?

jp

Guest Richie M
Posted

Yup, rebooting the phone is an option you can add to a CAB file, if your installation requires it.

Caio1; there's not a lot of point creating one just to reboot the phone because it would take more button press to ran than just pressing the power button! :?

Guest caio1
Posted

Not if you add a speeddial. And however the power button is always so difficult to press.

Caio

Guest Vector
Posted

Speed dials aren't very "speedy" either :? , and what's wrong with the power button :?: :roll:

Guest caio1
Posted

I always have to rotate wether my phone or my hand to press it 8-D

and with a reset utility I don't have to wait for my phone has shut down to press again the power button to turn it on again.

Caio

Guest Soyale
Posted

So here's the solution then. Create a CAB file which contains this reset option but nothing else. Make it read only. Place it somewhere on the start menu and assign a speedial. Voila. Phone will reboot with only having to press and hold a single button.

Guest caio1
Posted

Great idea Soyale!

Who has the necessary to create cabs?

Caio

Guest Soyale
Posted

Richie. What's the setting in the CAB file? I can create the CAB to do this if I know what it is.

Guest rcraswell
Posted

FWIW, here's a little applet that just calls the OS function directly. Unsigned, decert, blah blah blah...

Update: added an icon per request

quickreset.zip

Guest Palindrome
Posted

Nice one, rcraswell. That applet of yours works fine.

Guest rcraswell
Posted

Soyale, nope. It uses ExitWindowsEx. The function is documented under Win32/PPC but not under Smartphone but still exists in aygshell.dll. No guarantees that it will still be there in future versions of the OS, but I imagine it's what the CAB file program uses to do its thing so it's a pretty safe bet that it's not going away any time soon.

#include <windows.h>



#define EWX_LOGOFF    0

#define EWX_SHUTDOWN  1

#define EWX_REBOOT    2

#define EWX_FORCE    4

#define EWX_POWEROFF  8



#define MAX_ERRSTRING 30



extern "C" WINUSERAPI BOOL WINAPI ExitWindowsEx( UINT uFlags,DWORD dwReserved);



int WINAPI

WinMain (

HINSTANCE hInstance,

HINSTANCE hPrevInstance,

LPWSTR  lpCmdLine,

int  nShowCmd

)

{

DWORD dwerr = 0;



if (!ExitWindowsEx(EWX_REBOOT, 0))

{

 TCHAR errmsg [MAX_ERRSTRING + 1];



 dwerr = GetLastError();



 if (0 < _sntprintf(errmsg, MAX_ERRSTRING, _T("Err: 0x%08X"), dwerr))

 {

 MessageBox(NULL, errmsg, _T("quickreset"), MB_OK | MB_ICONEXCLAMATION | MB_TOPMOST);

 }

}



return dwerr;

}[/code]

Guest Soyale
Posted

Thanks for that. I wasn't aware of that API!

Guest nickcornaglia
Posted

Just posted the question in the software forum and someone referred me here. Thanks!

Guest Simon Desser
Posted

Nice work :!:

Hope this doesn't sound picky, is there any way that an icon can be assigned to the exe, so it looks pretty in my menu :?: :) I hate those blue & white windows "icons"

Guest dinoalbert
Posted

Yikes! my skin returned to the default one, customized non-standard screen skins (incoming call, alert, question, information, exclamation, etc), system sounds and ringtones didnt work after I resetted using this app. Is this normal?

And then I cannot find any program/apps/games listed in the Remove Programs...how can I remove/uninstall programs now?

Guest Soyale
Posted

Hmmm. This is different from my experience of registry corruption caused by resets. I have seen this but caused by other things.

Guest rcraswell
Posted

Just updated it to include an icon per request. (Icon image shamelessly stolen from the phpBB emoticon list...)

In proper versions of Windows, there is a pair of messages (WM_QUERYENDSESSION and WM_ENDSESSION) that get broadcast when ExitWindowsEx gets called. I haven't checked to see if this happens on Smartphone but, since they're not documented, nobody's going to be looking for them anyway. So yes, when the phone resets, all apps probably just get the rug pulled out from underneath them.

Guest nickcornaglia
Posted

I don't know if this is related to dinoalberts problem but my phone reset as well. I had made a registry tweak, trying to restore my call.gif image, while IA CallerID was still on the phone and I thought that caused the problem. But I did use your app after changing the registry to reset and for the changes to kick in.

My phone reset to the original configuration.

I lost all of my settings.

I lost all of my IPSM Application Data.

I did not lose my installed software. Most was installed on the SD Card but the icons were still in the start menu. My start menu had catagorized folders for my apps that were now gone though...so that part seems inconsistent.

Do you think they are related?

  • 3 months later...
Guest gladel
Posted
FWIW, here's a little applet that just calls the OS function directly.  Unsigned, decert, blah blah blah...

Update: added an icon per request

do u have an installable cab file for this?

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.