Launching an app at boot time and HKLM\init keys - Windows Mobile Development and Hacking General

I would like for my application to start upon boot up and MSDN claims that if you add the application as a LaunchXX item in the HKLM\Init keys of the Windows Mobile registry that it will launch the app at startup. The trouble is that I properly add the key and when I reset the device (using the reset button with stylus) that my application is not started and is not listed under the process list, but if I reset a 2nd time my application is started at boot up. I was wondering if anyone knows why this happens, why it takes 2 resets for my application to get launched at boot up, and how I may fix this situation?
Thanks,

This is strange.
There are two things you need to know about the KaunchXX regs:
1) Any app you put there must be signed or at least authorized by user.
Did you by any chance run the exe between the two resets and clicked 'Yes' when the OS asked if you trust the file?
2) You should watch the launch order (the number that replaces XX) and also add a DependXX key to match LaunchXX. This will insure the OS does not accidentally attempt to start your app before device.exe or gwes.exe are fully loaded causing your app to crash.

VDiDDY:
By using the stylus for restarting.. the registry is not always flushed correctly...this could mean that information is lost.. or not set correctly .. i had some trouble with this earlier loosing information .. Have you tried restarting the device by holding down the power key and choosing turn off?
And if this reg-change is done using code.. you could use i.e. ExitWindowsEx to reset... or you could remember to use RegFlush ..
One last advice.. you need to use the api SignalStarted with the index your app is.. LaunchXX -> SignalStarted(XX) .. so other depending exe's are signalled that they can start... or something like that

Related

NullKB not working, plus some easy questions

I've tried searching, I can't seem to narrow my search enough to get relevant results.
I installed NullKB to block the annoying SIP popup from searchfromtoday. I first installed it to the memory card, and went into settings ~> input and selected it as the default input method. I go back to my today screen and the SIP still pops up when I tap the searchfromtoday box. I think that maybe it needs to be installed in main memory to work, so I uninstall, and reinstal to device. Still the same thing. I noticed that I can go into input, select nullkb, tap OK, then come back and it goes back to keyboard. It's like the change to nullkb won't "take" so to speak. Any ideas? Search from today is amazingly useful, but the SIP popup is a deal breaker.
Another quick question: How do I make programs launch on startup? I like to have magicbutton task manager launch everytime I start up the device. As it is now I have to open it after every reset.
If i remember correctly if you go into magic button settings, there should be an option to automatically start.
As a rule if you want a program to startup when the device starts place a link in the windows\startup folder, i.e. a lnk file to the program.
MSigler - after installing NullKB, try a soft reset. Also, don't set it as the default keyboard through the registry - if you do, you may end up with the device not booting anymore and requireing a hard reset (lose all data).
Mark - Thanks for the tip, I found that, but I'll use the startup trick in the future.
I did do a soft reset and it still doesn't work.

HKLM\init registry keys

I would like for my application to start upon boot up and MSDN claims that if you add the application as a LaunchXX item in the HKLM\Init keys of the Windows Mobile registry that it will launch the app at startup. The trouble is that I properly add the key and when I reset the device (using the reset button with stylus) that my application is not started and is not listed under the process list, but if I reset a 2nd time my application is started at boot up. I was wondering if anyone knows why this happens, why it takes 2 resets for my application to get launched at boot up, and how I may fix this situation?
Thanks,
HKLM\init registry keys
Hi Viddy, how did you manage to start at boot your application. I tried agendafusion.exe but it didn´t start with several resets? Pls let me know how do to?Thanks!

HButton for smartphone

Hi,
I created HButton for smartphones. BUT I have no smartphone so I developed it on smartphone emulator.
I will be very gladly, if there is someone who can test it.
Please note: Test it on your own risk - never been run on real smartphone.
thanks
Hundera
Great! While I have no time to test it right now, I'll frontpage the news if it turns out to be working!
when i get to the assign window, i get stuck there, don't know what's the next step
oldsap said:
when i get to the assign window, i get stuck there, don't know what's the next step
Click to expand...
Click to collapse
Hi,
I created it little messy. It has to be changed before official release.
* Using * assign it to any HW button. I don't know if there will be name and icon of selected button or just something like "unknown 40C1".
* Create list of applciations
* Left and right button select preferred application​* enter to add it to list​* Press OK.
thats all. Now you should be able to start application using HButton....
What now?
I managed to do almost everything:
I assigned applications to the list of button1,
I clicked on '*', and so
Assigned to (*) displays "Unknown 40C1"
When I run the application Button1 manually, the application I chose for Button1 is run.
But what now? What do I have to press to make the application run? What is button1? I tried all buttons, pressing for various lengths of time, but I can't get it to run.
Do I need to edit the registry so that the application "Button1" is assigned to some button?
Hi,
at first thanks for help.
"Unknown 40C1" means - there are registry part about this button. In SPh, there's missing names of buttons - so name is unknown.
I has no SPh, only emulator. I checked registry and there is all ok - only names are missing. All flags and path to applications that should be started are similar to pocketpc.
These registry settings are altered by my program so HButton1 should be started by button with code "40C1". What button it is - I really don't know. That's what I need to test.
But as you describe it, it looks like that these settings are ignored.... So Where is settings of button's behavior on smartphone?!?!
ghostwheel said:
I managed to do almost everything:
I assigned applications to the list of button1,
I clicked on '*', and so
Assigned to (*) displays "Unknown 40C1"
When I run the application Button1 manually, the application I chose for Button1 is run.
But what now? What do I have to press to make the application run? What is button1? I tried all buttons, pressing for various lengths of time, but I can't get it to run.
Do I need to edit the registry so that the application "Button1" is assigned to some button?
Click to expand...
Click to collapse
not totally sure
I'm no expert in this.
If I understand correctly, one way to do it is through links in the \windows directory,
so
\windows\short_MSG
is a link to the program called when the message button is pressed
\windows\short_Camera, and short_IE
are for camera and explorer button.
But I think there are also other places to set these. And some phones allow long_MSG,IE,Camera links for long button press - not mine.
I tried to copy the Button1 link to short_MSG, and that managed to run the first command in the list for button1, but not the next on a longer press. (And it still launched the message program first, so there must be a second place that determines what is launched...)
Maybe people in the smartphone forum will have more info...
All this was on an s620 WM6.1
just a few more comments
Now that I can get HButton to partially run, I have a few comments:
I'm not exactly sure why, but going from HBSetup to configure buttons 1 and 2 takes a really long time. HButtonTask is much shorter. Maybe it is because a list of all programs is generated, and this takes time? In any case, maybe one could display a message "please wait..." - the first time I thought the program had crashed.
Pressing left (instead of right) when the bottom selector in HButton1 setup shows <None> crashes the program (ArgumentOutOfRangeException)
In HButtonTask setup there are two arrows below Custom delay (I think to chose the delay), but no number is displayed, and pressing left-right only toggles the boxes.
<Start Menu> doesn't work. <Clock>, <Toggle BT>, <Quit>, <Today> do work. <Back> behaves a bit differently than the Back key - it switches between tasks, instead of screens - but that's ok and can be useful!
In the HButton1/2 setup screens, I would change the left softkey to "save" instead of "ok". Too often I pressed that button instead of the center/enter button to change the action on the list. Because it takes ~10 seconds to enter the screen again, it is quite annoying....
Hi
I am really interested in this project if is still under developement

8525 - WM6 Slow boot time, slow draw, system bogged down

I posted this over at the cingular website, but I thought I might get a better response here.
I have an 8525 with WM6 installed. Sometimes when I perform either a soft or hard boot, the boot time is extremely slow. For example, I read here that a soft boot once a day is a good idea to free up memory. So I performed one. It takes my phone about 1 minute to go from the Windows screen to the screen where I enter my PIN. It then slowly "draws" the screen with the keypad to enter my PIN and eventually the word "unlock" appears in the lower left corner. It seems like it takes forever to not only load, but then draw the screen. Any touch input is then delayed. In WM6 does eventually load, its completely delayed and bogged down. This happens until about the 3rd soft reset when it is fine and the system is stable.
I have the following running on my system:
Sleuth255's PTTfix
enunutz HTC Home Customizer
Skunworks FlashVideoBundle
TCPMP The Core Pocket Media
C. Ghisler & Co. gtotal Commander
Vicsoft Clear Temp
Also, I have made the following registry tweaks:
1. disabled start-up animation and sound;
2. removed battery and communication from lower task bar;
3. moved battery to top of screen;
4. changed scheduling of activesync.
I have 25MB of storage space and 24MB of program space. I also have a 2GB micro-ram. Any ideas or other occurrences like the foregoing?
It may be helpful to see what's in your windows/Startup directory. There might be some sort of collision between two processes or something.
Windows start-up directory contents
Includes:
ClearTemp Startup (12/18/07)
Launcher (9/1/07)
poutlook (9/1/07)
PTTStart (9/20/07)
sddaemon (9/1/07)
TrayIcon_Manager (10/11/07)
Any help?\
Also, it does appear that after 3 soft boots, the system loads normally - in other words, three's a charm apparently for some reason or another.
My apologies if you have already tried to following, just need to know:
Did you try starting your 8525
- Without the microSD card?
- Removing the sddaemon.lnk from the startup folder (it seems to be optional, but to be safe transfer it to your PC first)
- Disabling cleartemp, either uninstall or removing it from the startup folder.
I suspect that it may be cleartemp, but I've never used it. Perhaps another process is competing with cleartemp by trying to write to the temp directory??
Also, which ROM are you using? The official wm6? Sorry for all of the questions.
I have read on many posts that removing the COMM MANAGER icon (your item # 2) from the lower taskbar causes a slow boot and system lags. It actually happened to me once after installing a program, but I successfully remove it yesterday and so far have not detected any problems. I don't know at this point why it would happen.
I've tried removing the SD Card - no change, removed ClearTemp from the startup - no change. What is sddaemon anyway? And I'm running the WM6 Rom that you could download from http://www.america.htc.com/support/8525/software-downloads.html - I guess that's the official version.
I'll try putting the comm. manager back in. It's hard to know if that was the problem, but I'll give it a shot. When you make a lot of registry edits and install programs in often hard to pinpoint exactly the problem.
dgaud007,
It may be a little early, but so far you're a genius. Looks like it may have been the removal of the Comm Manager from the bottom. I've had three soft boots now without incident. This begs the question, do some of those other today customizers which allow you to remove the Comm Manager slow down the system too, or is it just a product of using the registry tweak? On a side note, can somebody go into their registry at HKLM/ and see if there is a subdirectory called "5"? It's empty on mine and didn't know if I just created it by accident.
Thanks everyone!
Glad to help. I still would like to know why this happens. As I recall I had removed the comm manager icon when I first got this phone and it worked fine until I tried to install a kaiser type comm manager program, which didn't work. After that I experienced all the symptons, i.e. slow boot, slow redraw, etc. I then uninstalled the kaiser comm manager and put back the comm manager icon on the screen and the symptons were gone. A couple of days ago I removed the icon again just to see what happens, and so far is working fine WITHOUT the comm manager icon. I will try to duplicate the problem...
Update 12-26-07
I duplicated the problem installing this file: "JUVS_HTC_CommManager_Kaizer_fix.cab". After installing it with comm manager icon removed, it took > 4 minutes to reboot and all the symptoms re-appeared. I enabled the comm manager icon, did 2 soft resets and the symptoms were gone (i.e. boot time < 2 mins). I removed the application and installed "Kaizer Comm Manager(10 Buttons).cab" and so far is working fine without the icon in the today screen.
Same problems...
I can't really help much, but I've been having the same problem, both with the default ROM I had and with vp3g's ROM: extremely slow boot, with a successful boot on the third try...I'm thinking that the system keeps track of the number of times you try to boot, and streamlines the process the third time around to ensure a success.
Several days ago, I did this whole sequence of soft boots, and my phone actually "reset" itself: it went through the phone's "first-time-use" setup sequence, unpacking and installing default programs. I'm still running vp3g's ROM, but it now appears to be a blend of that ROM's customizations and the original system ROM, thanks to that weird reset. Anyone else know about this?

Half of my \Windows folder is gone....

Mods - I don't even know where to put this (although I've looked for similar posts, sites, wikis, you name it, I haven't seen it).
My touch screen doesn't work, I don't have a start menu that has anything in in except "Today." The rest is blank. It didn't disapear right away, either. My touch screen worked after one soft reset, and I still had the expected display of the start menu, but none of it worked. Somewhere in the middle of all that my .tsk changed to the default. After another reset, I am here:
No Start Menu (Today option only)
Default .tsk
No links from Ultimatelaunch to startmenu links work, but links to Programs themselves do (in Program Files)
No CommMgr via hdwe key, but my wifi was on when this all started, and keeps restarting, without recognizing my network (I just re-entered my WEP key)
the joystick works, and the keys do things, but the camera and CommMger keys can't find thier apps.
the joystick won't select my wifi bubble radio button, but otherwise works.
AEBPlus stopped working, so I can't get to my MortButtons to launch anything else.
Since I don't have a start menu, I don't have a file explorer I can get to (yet I have 3....)
Phone works (but only using hdwe keys)
I can't do much else (no screen print uless you want me to take a picture of it with my Wiza200)
I'm doing quick copy of my Program Files and App Data foldera to catch all the changes I did today, the rest is synced (but I'll copy what I can) via a Guest partnership, since the name of the device seems to be gone as well.
I was playing with assigning hardware keys, fisrt with AEBPlus, then I switched to Calligrapher's config mgr (I was trying to regain the functionailty of button 3 press&hold, which went away with assigning the other keys with AEBPlus). It was all I did, besides play a few audio files with Vito Audio Notes and Vito Sound Explorer, since my last reboot.
Prior to that I was trying to get my video streaming up & running this way:http://wiki.xda-developers.com/index.php?pagename=FlashVideoBundle
, and I installed Vito Metronome (just to see. kind of a waste. KOOK K-met is better, even tiny on VGA), and MccMobile Finder, but had reset a few times to recheck my timing in a Mortscript to bring back my today screen after having MccMobileFinder and Vito Audio Notes launch on start up (niether of which will automatically minimize.)
I had just entered all my reg codes earlier today, and I know there are too many, so this sucks.
Are there any viri (viruses, I guess) that might do this? I mean, yeah, I can spend an hour or two (I'm afraid it might be more, since things go all complicated on me all too quickly) getting back to running, but what the *{^ ( |<* happened?
I hope I'm off my rocker for the moment and no one ever sees this happen to them. Any ideas?
New development: I loaded up, started doing a few things I need to do manually (I like to do my AEBPlus, and have never been successful at imprting Phonealarm setting), and lo, I soft reset, and the boot screen stcuk. The red boot characters went away, but the button lights never turned on.
Can anyone tell me if I should be sending it in to PPCTechs, or might this be a ROM (or software????) issue.
Any input is welcome.
Have you tried hard reset? If yes and still unsuccessful, try re-flashing the ROM.
something similar happened to me once when i banged my phone on something..
all shortcuts / programs dissappeared...
i only had 2 options in start menu..
did a hard reset and everythign was restored

Categories

Resources