Shortcut with parameter - Windows Mobile Development and Hacking General

Is it possible to launch a program from a shortcut with an additional parameter?
E.g. "\Program Files\OpenVPN.exe client.ovpn"
If yes, how to create such a shortcut? I noticed WM shortcuts include a number and are different from Windows shortcuts.
Thx!
EDIT: just found the solution here: http://blogs.msdn.com/mikehall/archive/2005/08/22/454922.aspx

One minor point: the system actually disregards the number of characters completely so you do not really have to count them.
If you insist on a proper shortcut and are making it on the device I found that the edit feature in Total Commander is grate for this purpose as it has a letter count and saves in plain text format.

Nice tip. I found a PPC proggy called vxShortCut which can do it as well (http://www.cambridgevx.comhttp://www.cam.com/windowsce.html)
They have a nice bunch of other useful tools as well.

Related

Link to Menu Items within Programs

Is there any way to create shortcut that would point to a menu item inside a program? For example, if I created a link to Messaging/Send and Receive, I could then create a voice command that would cause that to happen. Similarly, I would like to link to Messaging/Tools/Empty Deleted Items so that I can clear items off the server with a voice command or two. I am hoping this functionality exists in WM5, but haven't encountered it.
Sorry if this has been covered; I searched and I've been reading the postings daily for a couple of weeks.
This board has dramatically helped me configure my MDA.
There is no direct way to do this. What you'd have to look for is a program that can 'record' screen taps and 'play' them back to the system. MortScript is a free utility that does this, and more, and seems quite popular:
http://www.pocketpcfreewares.com/en/index.php?soft=1448
You can come a long way with this way of making shortcuts, the rest could then be done by Mortscript...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/ppc_tcuts2.asp
That seems promising
jpiek, that looks like just the thing, but the explanation is for settings. It looks to me that something like
23# "/Windows/tmail.exe,X"
where X is the number of the send/receive menu entry would work to automate the send/receive function. Similarly for the empty deleted items. So my questions are (i) is this right, and (ii) where I can find out the numbers of the menu items for Messaging?
prestonmcafee: that's not quite correct. The Microsoft link is specific to shortcuts to control panel settings.
For any other app you're looking for command line options, that may or may not be available for the apps you're interested in. Depends on the app...
V
Browse the File associations with a tool like "Pocket Tweak", it might help in looking up some commandline parameters...
Pocket Tweak's description doesn't sound promising.
There should be a way to do this. In Messaging, I just want Send/Receive, which is invoked by <menu>S, and Empty Deleted Items, which is reached by <Menu>T<Menu>E. I would also like to directly link to "Synchronize via Bluetooth."
which is exactly what things like mortscript allow you to do - send key presses / screen taps / etc. to the device as if you actually pressed them.
If you're looking for some magic command line switch that does it... e.g.
"poutlook.exe -sendandreceive"
then who knows - maybe it exists, but most likely it doesn't. For most applications, the menu items aren't something that have command line switches
What i meant was : With POcket Tewak you can have a LOOK at the file associations, and maybe get a hint of the parameter you have to use...
prestonmcafee said:
Is there any way to create shortcut that would point to a menu item inside a program? For example, if I created a link to Messaging/Send and Receive, I could then create a voice command that would cause that to happen.
Click to expand...
Click to collapse
Funny - looks like there's a thread that is on this very topic, and the latest post now details exactly what the shortcut for -that- should look like
http://forum.xda-developers.com/viewtopic.php?t=41505
Heimiko said:
\Windows\tmail.exe -Service "MailAccount" -Sync
Click to expand...
Click to collapse
Thanks!
I did search...

Custom icons or icons from Settings??

OK so since I got such a quick answer on my "spacer" question, I thought I'd try it again .
I have made a shortcut to the today setup in the settings. Only problem is that I need an icon for it. I saw in another post where someone created an exe file just for the icon basically. Could someone explain how to do that.
An alternative would be if I could use the icon from Start - settings - personal - today. But I have Icon Viewer as well as RViewer and can't find it anywhere.
I'd rather be able to use a custom icon, not only for this app but for others, but help on either would be greatly appreciated.
You want to use an icon dll.
Easiest way - download PHM Tools, find the icon dll, download Microangelo on your PC, use librarian, rip out the icons, make your own icons in studio, drop them into the now empty dll, and use that dll as your new icon dll.
In order to use the new icons, you need to know how to specify icon resources in shortcuts. Search against my user name for the word "completeness".
V
thanks VJ, I'll check it out when I get home tonight.
I also came across this while following a link from aximsite.
The Shortcut Editor was released on this forum first AFAIK
Have a search on our forum.
But have a read through my posts on creating custom shortcuts, it's very easy and will teach you the theory behind the practise.
I think you asked specifically about use of a DLL Icon library. Perhaps not... but it's a useful technique either way.
v
yeah VJ you're right. The aximsite link pointed me here to good ol XDA
Which PHM tool do I need? Is it the shortcuts app in PHM Plus?? I'm beginning to think I'm in over my head here.
TIA

[REQ] Today Plugin: SMS managment directly on Today Screen

hello, i'm searching for a today plugin which is similar to the default messaging plugin in wm6. but i want it to show me also the messages itself on screen (for example the last 3 sms or email), is there someting? thanks!
Only use "infinite Today" but the lan of software is chinese.
unfortunately no eng. version of infinitetoday yet.
but you could manage this by pocket breeze.eliminate the other tabs than sms and all icons of settings etc. it gives what you want .
mobile101 said:
Only use "infinite Today" but the lan of software is chinese.
Click to expand...
Click to collapse
hmm could you give ma link to this thing? maybe hexedit or reshack is possible...
is this that app?
http://forum.xda-developers.com/showthread.php?t=444414
Hi there! Have you checked out wisbar advance desktop 2? The app itself does not contain this function, but in combination with mortscript its an easy setup. Wisbar desktop gives you full controll over your todayscreen as in your desktop pc.
If this is the solution you decide to go for, I can help you getting started ;-) If so, PM me
The app itself does not contain this function, but in combination with mortscript its an easy setup.
Click to expand...
Click to collapse
tell me more, i am interested, what ms script can display sms content.
it would be easy to use this in hs++, freeware app then.
i was WAD user in 2005-2006.
here's few shots to prove it:
http://pdaclub.pl/forum/index.php?topic=50666.0
nothin said:
tell me more, i am interested, what ms script can display sms content.
it would be easy to use this in hs++, freeware app then.
i was WAD user in 2005-2006.
here's few shots to prove it:
http://pdaclub.pl/forum/index.php?topic=50666.0
Click to expand...
Click to collapse
Sure m8! But for the ease of it I will just copy a post from lakeridgesoftware.com. The reason why I copy it over here is that this forum should contain it all. This is the work of a guy called allanlsmith and here it goes:
alanlsmith lakeridge forums said:
Script Updated 30 Jan 2009
With improved method of splitting lines, hopefully to stop the odd message disappearing off the right hand side of the screen.
The only script that has changed is 'ReadSMS.mscr' & it now puts all the lines of the message into one registry value, so you need to change your registry text in WAD to point to 'HKLM...\Messaging\SMS\Message' rather than Line1, Line2, etc.
As before you can adjust the length & number of lines by altering the appropriate values at the begining of the script.
__________________________________________________ _______________
An earlier question from Neodd70 prompted me to look into being able to preview message on a virtual page, I've come up with what seems to be a viable solution for SMS, I have used a component(s) from ThrottleLauncher www.throttlelauncher.com which the author APBilbo has kindly allowed the use of as a standalone application.
As you can see from the screenshot I've ended up with it looking like a sort of copy of the message page from Manila 2D, I've included the images if you want to use them.
It allows a preview of the first 7 lines of a message & adds "..." at the end if the message is longer. the included shortcuts are 'SMS Next' which moves to the next newest message, 'SMS Previous' which moves to the next older message, 'SMS Details' which shows the whole message in a HTML window, 'SMS Refresh' which should be used as the page entry script, as this will display the most recent message on the page & 'SMS Reply' which, well, allows you to reply to the message sender.
The Registry entries that are created / updated when the shortcuts are run, are as follows, All under 'HKEY_CURRENT_USER\Software\My_Utilities\SMS' :
'Line1' to 'Line7' this splits the text into individual lines, 'Read' indicates if the current message is read or unread, 'Selected' is the number of the current message, 'Total' is the number of messages in the inbox & 'Sender' is the sender.
As neither the application or WAD do textwrapping the Mortscript 'ReadSMS.mscr' parses the message into lines, currently set to 25 chars long to suit my QVGA screen & the images I use, but if you change the value of 'linelength' at the begining of the 'ReadSMS.mscr. script then you can make them whatever length you want.
To actually use this, all that is needed is to copy the folder 'Message2Reg' (which contains the applications, DLLs & scripts) to '\Program Files\' & the 'Messages' folder (which contains the shortcuts) to '\Windows\Start Menu\Programs. Then on your selected page assign 'SMS Refresh' as the page entry script & the Next, Previous, Details & Reply shortcuts to appropriate buttons to suit your chosen layout.
Oh, & if you don't want to use the HTML preview you can delete 'template.html & 'OpenNETCF.DLL' which will save about 220Kb.
Note: opening the message in the HTML preview will mark the message as read, whereas viewing in the 'envelope' will not.
It should all work reliably, but no guarantees.
Edit: Throttle Launcher does not need to be installed, but you do need to create the registry key 'HKLM/Software/ThrottleLauncher/Messaging' then the first time the program is run it will create the necessary subkeys below this.
Click to expand...
Click to collapse
For all non english devices: You have to make a folder in your units root called "Storing Card" to make this work.
nothin said:
i was WAD user in 2005-2006
Click to expand...
Click to collapse
Then you shold check out WAD2! I cannot imagine myself owning a WinMo without it! There is NOTHING developed here at XDA that can touch this. (No guys .. all your work are great! But this is the king of the hill..)
thedaniel said:
Then you shold check out WAD2!
Click to expand...
Click to collapse
Well there are two crucial problems here(and few lesser ones):
- sipicon that pop ups on wm6.1 in bottom-center of screen, reported, but not solved.
- no tray at all, 1.x.x. had it.
Believe me, i do know, what WAD is...
here it goes:
Click to expand...
Click to collapse
thanks, thedaniel, gonna check this later.
You can make your own tray in WAD2
anyways: hope this gets you somwhere
I use SPB Diary. It's not free, but it's a very powerful program. You can view all of your emails and sms right on the today screen, as well as ALOT of other cool stuff. Check it out.
Point UI's Home 2 is just the ticket!
http://www.pointui.com/
You can choose your sms as your today screen, its amazing!

[REF] Rotating apps using registry and finding classes

Hi All,
I have written this little tutorial by piecing togethor bits of info from other forums and threads. Some of you will probably know this already but this is for those who are struggling:
To get the g sensor rotating any application that doesnt do so already you will need to edit the registry on your device.
Using your preferred registry editor navigate to:
HKCU\Software\HTC\HTCSENSOR\GSensor\ModuleName
Here you must create a new string value. The name of your string is whatever you want it to be. The value of your string would be the path to the exe of the program you wish to rotate.
Once this is done you must then navigate to:
HKCU\Software\HTC\HTCSENSOR\GSensor\WhiteList
Here you must again create a new string value.
The name again is whatever you want it to be... the value would be the class name of the application you are attempting to rotate.
For example.... to get excel rotating with the G sensor:
HKCU\Software\HTC\HTCSENSOR\GSensor\ModuleName
Create new string value... i named it Excel Mobile. Value is:
windows\pxl.exe
HKCU\Software\HTC\HTCSENSOR\GSensor\WhiteList
Create new string value... again i named it Excel Mobile. Value is:
BOOKWIN
Create second new string value... i named it Excel Mobile2. Value is:
PXLMainWnd
Exit your registry editor and soft reset the device. Job done. Excel will now rotate within the open file browser (PXLMainWnd) and also within any open workbook (BOOKWIN)
For any particular app you should be able to figure out what the full path is to your exe but to get class names use dotfreds task manager:
http://www.dotfred.net/TaskMgr.htm
Once the task manager is installed.... start your app... then start the task manger... go to applications tab and long press on your app which will be listed if it is still running... select details. Go to the windows tab... this screen will list all of the classes currently accessed by your app. Ususally the ones to add into the whitelist will be the ones that are preceded by the app name but not always.
To get you guys started here are the settings for word:
windows\pword.exe
and you need to add two classes to the white list:
WordPad
Pocket Word
Remember that class names are case sensitive.
disclaimer: I TAKE NO RESBONSIBILITY FOR ANY DAMAGE TO ANYONES DEVICE BY POSTING THIS QUICK TUTORIAL. YOU CAN SERIOUSLY DAMAGE YOUR DEVICE IF YOU EDIT THE REGISTRY INCORRECTLY... IF YOU DO NOT KNOW WHAT YOU ARE DOING LEAVE IT WELL ALONE!!!!
bump cos ive changed the title!
can you find the modulename/whitelist for the messaging (SMS/MMS) tab? It's the only one I have trouble rotating.
lude219 said:
can you find the modulename/whitelist for the messaging (SMS/MMS) tab? It's the only one I have trouble rotating.
Click to expand...
Click to collapse
ill have a look if i get some time.
im having trouble getting the lifestyle home page in spb shell rotating atm!
Audio Oblivion said:
ill have a look if i get some time.
im having trouble getting the lifestyle home page in spb shell rotating atm!
Click to expand...
Click to collapse
thank you, and take your time =) btw, I just wanna be clear that I didn't mean the messaging tab on the home/sense screen, I meant the default win6.5 screen.
Thanks for this post, I am trying to find the details for a new app called DynaInk. I've followed your instructions and I am about to see if it worked?
*** Drum Roll ***
It worked, I used #NETCF_AGL_BASE_
Thank You
I applied this trick for Notepad which is a simple text editor that doesn't even require installation:
http://www.shamasis.net/projects/notepad-mobile/
After installing Dotfred's Task manager it showed me several string values for Notepad.exe and one of them was same as Nighthawk's DynaInk: #NETCF_AGL_BASE_ so I added it for my Notepad.exe.
Now it rotates with G-sensor
Thank you, Audio Oblivion for this guide!
p.s. What kind of damage to the device could possibly be done by adding those strings with those values? One could delete them if there's no result ?!?
Great post, works very well except for 1 program.
Perhaps you can help me out with the class name of TomeRaider3.
Program is TomeRaider3AU.exe, but for the Whitelist entry I always get different ClassNames when I start it as just like: "Afx:83ab6eaa:0, next time I get Afx:d54d7832:0, and so on.
Can anyone please help me out with this ?
many thanx in advance
Edit: Found the solution. I have added a ModuleName Wikipedia with Value "\Programme\TomeRaider3\Wikipedia.tr3 and a Whitelist entry for Wikipedia called "Dialog", for the Whitelist entry of TomeRaider I also used "Dialog", now it works very well.
lude219 said:
thank you, and take your time =) btw, I just wanna be clear that I didn't mean the messaging tab on the home/sense screen, I meant the default win6.5 screen.
Click to expand...
Click to collapse
I launched the default wnimo messaging screen and saw a process called tmail.exe appear.
search for tmail.exe on you device and use its full path as the module name. its probably windows\tmail.exe
for class entry in whitelist try: Dialog
If thats not it then start messaging, lauch dotfreds task manager, long key press on tmail.exe... click on windows and try every class you see!
I have now found that gyrator works quite well if you want EVERY screen on your device to rotate with the acceleromter... however... even though it is set to rotate everything... not all windows work. I still had to add in certain aspects of SPB shell to the whitelist for instance. Also... HTC Sense homescreen doesnt like being rotated.
drkalo said:
p.s. What kind of damage to the device could possibly be done by adding those strings with those values? One could delete them if there's no result ?!?
Click to expand...
Click to collapse
You wont damage your device if you follow my instructions carefully. The values you are changing are safe to add, delete and edit at any time (although dont touch what is already in the registry before you started adding to it). The discalimer is there in case someone messes up their registry by doing something incorrectly!
What about the programs that have the same Class name eg. "Dialog".
As i noticed it's enough to add process name to ModuleName or Class Name to WhiteList. No need to put both.
Better to use ModuleName if you have several applications that both have eg "Dialog" but one of them you do not want to rotate.
Eg. Nimbuzz - Dialog, HTC phone app - also Dialog. I do not want to rotate Phone So for me works only the ModuleName for the Nimbuzz.
For other apss I only include data to whitelist In fact there is two lists - by process name and by Window class...
Is there a similar way to enable the "Pinch to Zoom" feature for programs by just adding the programm to some registry entries?
TomTom
This is great
added TT7 = MunichWinClass to the white list.. now I can use TomTom in landscape
Thank you for this information.
I've done 3 programs;
Resco Explorer 2008
ModuleName
\Program Files\Resco Explorer\Explorer.exe
WhiteList
RESCO_EXPLORER_CLASS
and
Palm Digital Media eReader for windows mobile
ModuleName
\Program Files\Peanut Press\eReader.exe
WhiteList
PalmDigitalMediaWin
IME
and
1-Calc
ModuleName
\Program Files\OmegaOne\1-Calc\1-Calc.exe
WhiteList
Dialog
I can't take responsibility if these changes don't work for someone or if they brick their device.
Google maps, OziExplorer, File Explorer & Garmin
Thanks for the detailed info
ModuleName
"GMaps"="\Program Files\GoogleMaps\GoogleMaps.exe"
"Ozi"="\Storage Card\OziExplorer 2\OziExplorerCE.exe"
"FileMan"="\Windows\fexplore.exe"
"Garmin"="\Storage Card\Garmin\Apps\WM\QuePPC.exe"
WhiteList
"GMaps"="GoogleMapsMobile"
"Ozi"="OziExplorer"
"FileMan"="FEXPLORE"
"Garmin"="QUE_SUBAPP_WND_CLASS"
Thanks for this have done tomtom too. Perfect!!
Edit: Could anyone put this in a cab for me please?
Dir of .exe = \Storage Card\Program Files\TomTom Navigator.exe
Value = MunichWinClass
Not working
Hi all,
I have tried to apply this procedure but my applications still do not rotate.
I have tried both modifying the registry by hand, and using BsB Tweaks to rotate Excel but with no success. Any suggestions to share?
EDIT: I have tried disabling and re-enabling the Rotate feature (AutoRotation -> 0 -> 1), resetting the phone after each change, and now NO APPLICATION will rotate: not even HTC messaging nor the Sense Pictures tab.
HELP!!!!
EDIT 2: Solved! I've just found out by pure chance that rotating works only counterclockwise, while I assumed it should work both ways!

[APP] Control Panel Settings to Links (.lnk)

Hi guys,
I know it's a 10 seconds job to create a link for items inside the control panel (settings) such as "Usb to PC" or "Power" but I'm too lazy to do it every time I try a new rom,
also I found some of the values change from rom to rom, so I create a really simple app that goes through the registry key which holds the settings items (KLM\Security\Shell\StartInfo\Start) and creates a .lnk file for each of these entries.
Having a direct link allows me to add that option as a quick link which is handy 8)
Anyway, here is the tool in case someone wants it.
The exe must be installed in "\Program Files\CplLinks" (Device). It only takes 11.5 kb. The only reason the .exe is needed after the lnk are created is to provide an icon.
When you run it, it reads the HKEY mention above and creates .lnk for each item in the "Settings" menu. The lnks are created in "\Windows\Start Menu\Programs\CplLinks" so are directly accessible through the Programs menu.
There are no messages, it runs and creates the links, no interaction whatsoever so do not expect any nice popup window 8)
Next version will use specific icons for each item, right now, all the links use the same icon from the cpllink.exe executable.
The icons for most of the Settings are .png files rather than .ico, and WM doesn't have an easy way to convert from .png into .ico, the idea for a "future version" is to collect all the .png files,converted to icons and create a dll on the fly with the icons as resources, so they can be referenced from the .lnk files
Couple of screen shots from the emulator.
Great application! It works like a charm! Thank you for this convenient time saver
EDiT (another time saver)
After applying a Hard Reset WE have to reinstall all programs if you have previously installed them in the memory card. Often it is sufficient to recreate the shortcut in the start menu. ShortCutCreator helps you to recover the exe files and to recreate the desired shortcut.
Thanks for sharing!
I guess would be better if I manage to provide a different icon for each link, but Icon support is quite limited inside VM. Need to work in the PNG to Icon -> .dll routine 8)
I though having the app in internal memory was a better solution than in \Storage Card, so it will take less time to load the icon from the program, but I can change it and allow that option, so the icons in the links are pointing to \Storage.. rather than \Programs..
Anyway, it just a time-saver thingy 8)
Nice app. It does not seem to work on WM6.1 though.
It does create a new folder structure: CplLinks\System inside the Start Menu.
Very nice. It does seems to create a bunch of redundant or non-used links though
Yep, I saw it only works on WM6.5, on WM6.1 there are no "StartInfo\Start" in the "KLM\Security\Shell\". Not sure where it keeps that info, maybe somewhere else in the registry.
I finally managed to convert PNG to ICO, so I think next version would allow you to choose which items you want to create links for rather than just dump everything 8)
dubidu said:
Yep, I saw it only works on WM6.5, on WM6.1 there are no "StartInfo\Start" in the "KLM\Security\Shell\". Not sure where it keeps that info, maybe somewhere else in the registry.
I finally managed to convert PNG to ICO, so I think next version would allow you to choose which items you want to create links for rather than just dump everything 8)
Click to expand...
Click to collapse
WM6.1 control panel is "HKLM\ControlPanel" if I remember correctly. There will be numbers for the mycpl stuff and words for some other control panel items like backlight, etc.
I think this post got lost in the last database disaster 8)
I wrote a new version of this tool that now gives you the icons for the control panel settings, check it out here:
http://forum.xda-developers.com/showthread.php?t=791682

Categories

Resources