PDA

View Full Version : SD card problem: How difficult to write a script to switch off WLAN


herpi
23-05-2008, 04:36 PM
As I am now close to 100% sure that my SD card always reappears when WLAN is off. I was wondering if it is difficult to write the following script/program:

1. turn WLAN off
2. Hibernate. ( or sleep)

I feel stupid, but have no idea how to write a thing like this.


Just an icon on the desktop will be ok.

I know that this does not help me when the shift sleeps/hibernates automatically

But still.........

Huib

P.s.
It does not have to be incorporated in the standard hibernate or sleep. But would even be better. ( but then auto restart Wlan when awakaning.)

cmonex
01-06-2008, 06:29 PM
turning wlan off is not too hard to do via deviceiocontrol calls, ping me in this thread if i don't get back to you in a few days.

pof
10-06-2008, 03:39 AM
You can easily make a script which does the following:

1) Disable WLAN using "HTC Shift Embedded Controller Toolkit (http://pof.eslack.org/blog/2008/05/31/hsect-htc-shift-embedded-controller-toolkit/)", windows version.
hsect.exe -W 0
2) Hibernate via command line:
%windir%\System32\rundll32.exe powrprof.dll,SetSuspendState

This will work either on Vista or on XP, as it does not use ecdrv.sys.