Simple and small Reboot/Soft-reset program - Windows Mobile Development and Hacking General

Heres a very simple and very small program I made with MortScript. I call it QuickReboot 1.0. It will ask you if you whant to soft-reset your phone. It works best if you map it to a hardware button, well, It does for me.
READ! VERY IMPORATANT HOW TO USE: Unzip the zip file and move the file "QuickReboot" to the My device folder (The root of your device) Then click on it. It will then make a shortcut to itslef in the programs folder. Then use it whenever you need to soft-reset. TO UNINSTALL IT: Open your file explorer and goto /Windows/start-menu/Programs and delete it from that folder. Then its completely gone from your device
IF YOU TAP ON THE FILE WHEN ITS NOT IN THE "My device" FOLDER, IT CANNOT MAKE A COPY TO "Programs" FOLDER!
Requirements: Mortscript 4.0
(You need MortScript 4.0 to use QuickReboot)
If you don't have mortScript 4.0 download here: http://www.sto-helit.de/downloads/mortscript/MortScript-4.0.zip
Free and NOT SPACE-TAKING

Cool, im gonna try it on my TP. thx

thanks and correction
first of all thanks! that's exactly what i was looking for.
second, i had to edit your code a little because the copying didnt work. your path was ".../start-menu/..." and should have been ".../start menu/..."

Related

How to convert LNK to EXE? For key remap

I have been trying to get my HW keys remapped on the Q9 for a day now. After picking through the registry, I found a reg key that maps to the button
\HKEY_CURRENT_USER\ControlPanel\Keybd\APP2_Path
It accepts any .exe but I need to point it to a Mortscript file and that won't work. I can't even put a shortcut LNK value in there. Soon as I pop any exe in that field it works. Anybody know how to convert a LNK into an exe to trick this thing? I even tried running Mortscript.exe with the script name as a parameter but no luck. Thanks!
Looks like what I need is a basic applauncher .exe that would read the script/exe parameter from the registry or file. I have experimented some more with this registry key and it won't take anything other then a straight exe. Even quotes around the value breaks everything so I can't pass parameters around.
Mortscript comes with a file called autorun.exe. rename this file to the name of your mortscript, so if your mortscript is named 'myscript.mscr' then rename autorun.exe to 'myscript.exe'. make sure both files are in the same folder. Now when you run 'myscript.exe' it executes 'myscript.mscr'. For more information check mortscript documentation.
joemanb said:
Mortscript comes with a file called autorun.exe. rename this file to the name of your mortscript, so if your mortscript is named 'myscript.mscr' then rename autorun.exe to 'myscript.exe'. make sure both files are in the same folder. Now when you run 'myscript.exe' it executes 'myscript.mscr'. For more information check mortscript documentation.
Click to expand...
Click to collapse
i was so happy to see this fix and tried it. it appears to work about 5 times and then it stops responding. i have to reboot to get it working again. If i click on the script .mscr it works however. so something buggy in the autorun.exe. Any suggestions?
Take a look at http://www.vijay555.com
I think it's VJbrisk.exe or something like that, but I'm not sure...
There's definitely something there that can help you!
ithx i tried vbrisk but it would not install on wm6 smartphone. Any other apps that do the same?
Are your files in the same folder as 'mortscript.exe'? If not, put them there and try it. Make sure you have the lastest mortscript version.
Also, there is an old program called 'Launch Pad' by 'On Hiatus' that was developed for the HPC version of WinCE, and uses PocketC by 'Orbworks' (google both). You can use it to create .EXEs that work like .lnk files.
It works fine on my WM6 Wizard PPC, don't know if it will work on a Smartphone, but it's worth a try if the above doesn't work.
Another thing you could try is to extract the VJbrisk.exe from the cab file and manually transfer it to your device, then see if it works.
Yah they are in the same folder and named the same. I moved it al into the root. It appears to work for a couple hours, then dies and requires reboot. Otherwise it does the trick nicely. Mortscript is great!

real simple request for all developers out there...

So i fall a little short in developing, and was wondering if someone could make a quick exe... Here is what i am looking for: I need a simple exe to run off of my wm6 phone that will copy the file PalmMsgV001 from the Windows directory to my storage card in a folder with the current date.. to be more specific something like this:
copy \Windows\PalmMsgV001 to \Storage Card\Back_up\Palm_back\110807 (the date using the format 11/08/07)
Maybe you could make it customizable for other people as well... but im just looking for a quick exe to throw on my card that will make it real easy to back it up
shogunmark said:
So i fall a little short in developing, and was wondering if someone could make a quick exe... Here is what i am looking for: I need a simple exe to run off of my wm6 phone that will copy the file PalmMsgV001 from the Windows directory to my storage card in a folder with the current date.. to be more specific something like this:
copy \Windows\PalmMsgV001 to \Storage Card\Back_up\Palm_back\110807 (the date using the format 11/08/07)
Maybe you could make it customizable for other people as well... but im just looking for a quick exe to throw on my card that will make it real easy to back it up
Click to expand...
Click to collapse
And how much do you pay for it?
Here it is...
shogunmark said:
So i fall a little short in developing, and was wondering if someone could make a quick exe... Here is what i am looking for: I need a simple exe to run off of my wm6 phone that will copy the file PalmMsgV001 from the Windows directory to my storage card in a folder with the current date.. to be more specific something like this:
copy \Windows\PalmMsgV001 to \Storage Card\Back_up\Palm_back\110807 (the date using the format 11/08/07)
Maybe you could make it customizable for other people as well... but im just looking for a quick exe to throw on my card that will make it real easy to back it up
Click to expand...
Click to collapse
Here it is...
The applications is a command line application an works with 2 paramenters. 1º is the full path of the file or files patter that want to copy, in your case "\Windows\PalmMsgV001", other examples could be "\Test\log*" or "\*.txt". 2º is the full path of the destination directory without the date directory, in your case "\Storage Card\Back_up\Palm_back".
In the attached zip I include the application (CopyBackUp.exe) and the shortcut (.lnk) with the parameters required for your case ('CopyBackUp.exe \Windows\PalmMsgV001 "\Storage Card\Back_up\Palm_back"').
Just extract the .exe to the root folder ("\") and the .lnk wherever you want (ie. "\Windows\Start Menu").
Any small donation would be appreciated.
Enjoy...
finthamoussu said:
Here it is...
The applications is a command line application an works with 2 paramenters. 1º is the full path of the file or files patter that want to copy, in your case "\Windows\PalmMsgV001", other examples could be "\Test\log*" or "\*.txt". 2º is the full path of the destination directory without the date directory, in your case "\Storage Card\Back_up\Palm_back".
In the attached zip I include the application (CopyBackUp.exe) and the shortcut (.lnk) with the parameters required for your case ('CopyBackUp.exe \Windows\PalmMsgV001 "\Storage Card\Back_up\Palm_back"').
Just extract the .exe to the root folder ("\") and the .lnk wherever you want (ie. "\Windows\Start Menu").
Any small donation would be appreciated.
Enjoy...
Click to expand...
Click to collapse
This worked perfectly.. and am more than happy to kick you a small donation!!! pm me and let me know where to send it!
and also as i am looking at the shortcut, it appears that in theory you could make this little exe copy whatever you want, just would have to edit the short cut.. interesting...
shogunmark said:
and also as i am looking at the shortcut, it appears that in theory you could make this little exe copy whatever you want, just would have to edit the short cut.. interesting...
Click to expand...
Click to collapse
Yes, it tried to make it a bit more generic that what you were asking for, so maybe it could be usefull to somebody else
CopyBackUp V1.1
Attached is the new version of the application.
The changes are:
The first 2 parameters still being the same.
The next parameters are optional, and works as follow:
New commands:
·-kb[List of processes to Kill Before the backup is made]
Kills the specified list of processes before the backup
·-rb[List of processes to Run Before the backup is made]
Runs the specified list of processes after the backup
·-ka[List of processes to Kill After the backup is made]
Kills the specified list of processes before the backup
·-ra[List of processes to Run After the backup is made]
Runs the specified list of processes after the backup
·-noui
Runs the application without showing windows messages (only “Invalid Arguments” is showed)
These commands can be used multiple times, are case insensitive, and before backup commands and after backup commands are executed as they appears.
Sample:
copybackup.exe “/Directory with spaces/*.log” /Test –rb /test/test.exe /test2.exe –ka test2.exe –kb aaa.exe –NoUI –ra “/dir dir/bb.exe” –KA b.exe
This will
1.1. Run /test/test.exe
2.2. Run /test2.exe
3.3. Kill aaa.exe
4.4. Perform the backup of “/Directory with spaces/*.log” to /Test/[Date]
5.5. Kill test2.exe
6.6. Run “/dir dir/bb.exe”
7.7. Kill b.exe
All this without Windows UI messages
The application will fail only if some of the processes to run is not found, It won’t fail it some process to kill is not found.
Enjoy.
well i did find error.. maybe..
If i use:
\CopyBackUp.exe \Windows\PalmMsgV001 "\Storage Card\Back up\Palmbackup"
Then it does as mentioned before...
If i manually kill messagingapp.exe first and use this then it works, it will copy the file and run the app:
\CopyBackUp.exe \Windows\PalmMsgV001 "\Storage Card\Back up\Palmbackup" -ra messagingapp.exe
But if i leave messagingapp.exe running it will not kill it or copy the file, just throws up an error box that says "error":
\CopyBackUp.exe \Windows\PalmMsgV001 "\Storage Card\Back up\Palmbackup" -kb messagingapp.exe
and i did verify that the process is running
shogunmark:
Are you sure that have extracted both files in the same directory?
This problem looks like copybackup.exe is not finding in the same directory OpenNETCF.dll.
This dll is needed when you use -kb or -ka, as is used to enumerate running processes.
I have made the test copybackup.exe /*.log /test -kb iexplore.exe and it works perfectly (Kills Internet Explorer before)
Can you cheek this?
Cheers
Hi finthamoussu,
Your application sounds really cool. I can appreciate the running processes fuctionality as that is a little bit tricky in .net. Good work!
Regards,
Slither2006.
I think this is a really useful app. Forgive my ignorance but where do you run the exe on the PC or on the device?
If on the device do we need to copy OpenNETCF.dll there as well? Which folder?
Thanks
gekkkko said:
I think this is a really useful app. Forgive my ignorance but where do you run the exe on the PC or on the device?
If on the device do we need to copy OpenNETCF.dll there as well? Which folder?
Thanks
Click to expand...
Click to collapse
Hi, you need to copy both files to the device (to any folder you want).
An to use it just call the exe with the parameters you need (look at previous post).
Enjoy

Automated copy (restore) from SD card to the device

Hello,
I'm looking for a way that copies my backup files (these can be anything) to the device in an automated way.
Instead of copying each file manually, I would like to run a bat file or exe file that does this for me.
The problem is that windows mobile doesnt have a command line interpreter so bat files wont work.
Is there anyone that could point me to a direction how I can make this (what I need, etc...) ?
I also want to avoid using 3rd party software on my device to do this job.
Just an exe or something else that does the job.
Thanks
It really depends on what you're backing up. PIM data is good with PIM Backup (or similar).
texarcana said:
I also want to avoid using 3rd party software on my device to do this job.
Just an exe or something else that does the job.
Click to expand...
Click to collapse
Those two contradict as no such program exists natively.
ill explain some more:
what I want to backup isnt that important right now, it can be a txt file or a config file, an image, an mp3, ...
I'm more interested in a way how to do it
If S:\ is the location of my SD card and C:\ is the location of my windows mobile device then i want a script or an exe file or something that does the following (instead of having to do it manually):
copy S:\file1 to C:\
copy S:\file2 to C:\
copy S:\file3 to C:\
...
I use mortscript for backup and restore.
very useful
dan1967 said:
I use mortscript for backup and restore.
very useful
Click to expand...
Click to collapse
thx for the tip, it works great.
Even made myself a link in the startmenu, this beats using the explorer and doing everything manually
I've found my own solution to this one. It's not very exciting and it's pretty low-tech, but I keep a directory on my storage card called "Backup". Inside of it is an exact replica of my file structure I want to backup. For example: \Storage Card\Backup\Windows\BatteryStatus\. (In this case, this is where I keep my custom BS skins.) Then I go in with Total Commander, select the Backup folder, hit "copy", and the directory path pops up. I take \Storage Card\Backup\ and delete it, so I'm copying to the root of my main memory. Hit "OK" and voila! Settings restored. Primitive, I know, but it works.
Zoltair Wright,
If you want, you can take this 1 step higher in automating it with mortscript like i did. Then its only 1 click on a link in the start menu and it's done.
You can put the deleting, copying or moving in the script.
It's very easy to use and the manual explains a lot.
If you want I can attachment my tiny script as an example.
Cheers

How To Replace Long Press Power Button Shutdown App With PsShutXP

Orig title:How Do I Remap Power To An App On My Mogul
I want to replace my long press power button application with psshutxp. I tried to edit the registry, rename the link to long_press etc..., map key 00EC and nothing.. Need help...
I did download aebplus but it fights with the default shutdown app..
i'm running WM6.1 on my sprint mogul
Eazy
http://forum.xda-developers.com/showthread.php?t=398571
NotLutzik said:
http://forum.xda-developers.com/showthread.php?t=398571
Click to expand...
Click to collapse
Don’t do that to me.. Because I do contribute when I can.. and I actually have a fix.......
If you didn’t know you could have posted that.. Well here it is..
You need to do two things..
1. Save and zip the file called “PowerOffWarning.exe” from the windows directory
2. Go to the directory that has your psshutxp executable in it and rename the psshutxp.exe to PowerOffWarning.exe.
3. Zip the new “PowerOffWarning.exe” and skin files into a zip file.
4. Execute the zip file and overwrite the “PowerOffWarning.exe” file in the windows directory.
5. Press and hold your power button and enjoy your new shutdown/reset/screen off options.
NOTE: the only reason I choose to do it on long press is because I sometimes quickly want to turn off my screen when putting the phone back into the case. I don’t want to worry or wait for the app to come up and choose an option.
I have attached the two files and they came from a Mogul running WM6.1. If you use these files please backup your device first.
Eazy
maybe someone can create a cab for me please ;-)
mm with diamond don't go.. any ideas?
Great idea Eazy. I'll be waiting for a cab too...
On my hermes, there is no poweroffwarning.exe, so your solution will not work on all devices.
Just had a quick look at the running tasks, and the warning comes from gwes.exe, which is the 'Graphics, Windowing and Events Subsystem'
eazy2001x said:
Don’t do that to me.. Because I do contribute when I can.. and I actually have a fix.......
If you didn’t know you could have posted that.. Well here it is..
You need to do two things..
1. Save and zip the file called “PowerOffWarning.exe” from the windows directory
2. Go to the directory that has your psshutxp executable in it and rename the psshutxp.exe to PowerOffWarning.exe.
3. Zip the new “PowerOffWarning.exe” and skin files into a zip file.
4. Execute the zip file and overwrite the “PowerOffWarning.exe” file in the windows directory.
5. Press and hold your power button and enjoy your new shutdown/reset/screen off options.
NOTE: the only reason I choose to do it on long press is because I sometimes quickly want to turn off my screen when putting the phone back into the case. I don’t want to worry or wait for the app to come up and choose an option.
I have attached the two files and they came from a Mogul running WM6.1. If you use these files please backup your device first.
Eazy
Click to expand...
Click to collapse
Works fine on my Touch Pro.
And, if you use program like Resco Explorer, you can pass the ZIP routine, and go directly to overwriting the .exe .
works on my Trinity 6.1
very nice thank you!!!
jez83uk said:
On my hermes, there is no poweroffwarning.exe, so your solution will not work on all devices.
Just had a quick look at the running tasks, and the warning comes from gwes.exe, which is the 'Graphics, Windowing and Events Subsystem'
Click to expand...
Click to collapse
seems like you know your problem.. so run the app and make sure its the same app to shut down your phone then replace it following the process.. i never said that it will work on all devices hence the reason that i posted what phone i was using.. i am using it on my diamond as well..
if you need any more help let me know.. all i did was post a process that worked for me. if you need to use a diff exe please feel free to do so..
eazy2001x said:
seems like you know your problem.. so run the app and make sure its the same app to shut down your phone then replace it following the process.. i never said that it will work on all devices hence the reason that i posted what phone i was using.. i am using it on my diamond as well..
if you need any more help let me know.. all i did was post a process that worked for me. if you need to use a diff exe please feel free to do so..
Click to expand...
Click to collapse
I'm sorry, I certainly didn't intend to imply any criticism of your work.
For anyone else in my situation, unfortunately the gwes.exe is a vital process, which is always running, and does more than just the power off warning. As there is no standalone app for this warning in my rom, there is no exe which can be replaced.
I made a cab for the method stated.
PsShutXP_Replace.cab is just an automated way of Eazys method on the first page so check that first.
PsShutXP_Diamond.cab is the same method but with the VGA version and a diamond skin from lesteryh
Can this be undone if it doesn't work?
I think there's still the issue where it doesn't work right if you also use S2U2. not sure which ones at fault there.
Works fine on my Vogue running NSFAN's 6.1 Rom. I'm also running S2U2.
I dought the uninstall will work. If you want to go back then read Eazys post on page one and backup the file first.
eazy2001x said:
Don’t do that to me.. Because I do contribute when I can.. and I actually have a fix.......
If you didn’t know you could have posted that.. Well here it is..
You need to do two things..
1. Save and zip the file called “PowerOffWarning.exe” from the windows directory
2. Go to the directory that has your psshutxp executable in it and rename the psshutxp.exe to PowerOffWarning.exe.
3. Zip the new “PowerOffWarning.exe” and skin files into a zip file.
4. Execute the zip file and overwrite the “PowerOffWarning.exe” file in the windows directory.
5. Press and hold your power button and enjoy your new shutdown/reset/screen off options.
NOTE: the only reason I choose to do it on long press is because I sometimes quickly want to turn off my screen when putting the phone back into the case. I don’t want to worry or wait for the app to come up and choose an option.
I have attached the two files and they came from a Mogul running WM6.1. If you use these files please backup your device first.
Eazy
Click to expand...
Click to collapse
It works!
Many thanks!
Anthony2oo5 said:
I made a cab for the method stated.
PsShutXP_Replace.cab is just an automated way of Eazys method on the first page so check that first.
PsShutXP_Diamond.cab is the same method but with the VGA version and a diamond skin from lesteryh
Click to expand...
Click to collapse
Hey.. Can I ask you to change up how your cab works.. Just to make things easy.. I have not ventured into how to make cab's yet but will soon..
User:
Install PsShutXP (QVGA/VGA)then run the (not yet created) cab
Your cab:
create a directory under \program files\PsShutXP called Backup
create a directory under \program files\PsShutXP called modfile
copy \Windows\PowerOffWarning.exe to \program files\PsShutXP\backup
copy \program files\PsShutXP\PsShutXP.exe to \program files\PsShutXP\modfile\PowerOffWarning.exe
copy program files\PsShutXP\modfile\PowerOffWarning.exe to Windows\PowerOffWarning.exe and overwrite the file.
copy \program files\PsShutXP\*.gif to \Windows\
and on your uninstall
copy \program files\PsShutXP\Backup\PowerOffWarning.exe to \Windows
This will allow the user to uninstall the program if needed.
I am also using that skin on My Touch pro but removed the text up top that says Touch Diamond.
If you could create that cab it would be greatly appreciated. Until then everyone can just follow the manual process..
Working Devices so far:
Mogul 6.1
Touch 6.1
Touch Pro 6.1
Touch Diamond 6.1
Vogue 6.1
Trinity 6.1
jez83uk said:
I'm sorry, I certainly didn't intend to imply any criticism of your work.
For anyone else in my situation, unfortunately the gwes.exe is a vital process, which is always running, and does more than just the power off warning. As there is no standalone app for this warning in my rom, there is no exe which can be replaced.
Click to expand...
Click to collapse
I'll help you out.. I don’t think gwes.exe is the right file for you to be looking at.. How about this.. It seems that when you hold down your power button you get the same type of power off warning box that we do.. How about you go into your windows directors and sort by exe. Then start clicking on each exe until you see the warning box pop up and then you will know which file shuts down your phone. That’s how I found the PowerOffWarning.exe file. Please report back...
There's a thread over at ppcgeeks that I can't find right now, but it said to just copy the psshutxp.exe and paste a .lnk in \Windows\. Then you rename the "psshutxp.lnk" to "Long_Power.lnk". This method doesn't overwrite any exe's and works like a charm on my Touch Pro.
at the time that did not work on my mogul.. if it is working for you then your good.. if it works for anyone else then they dont need to use this process.. i have not tested that on my diamond pro since this worked for me.

How can I make a program link for a .exe file?

I have an exe that I found that I would like to add to my programs list. Is there a quick way to do this?
I can run it from file manager, but would like it to show up on the start menu or in list of programs
What you need to do is copy the file into
my device / windows / start menu / programs. Then paste it as a shortcut.
Hope this helps.
the in built file explorer wont let u do that. try total commander
When i right-click (hold the finger to the file) i get the following menu where you can see : Send shortcut to programs. It becaomes available in programs then.
Create a shortcut to the exe file using your file explorer and place shortcut in /windows/start menu/programs.
Thanks for everyone's help! I got it to work.
Glad you got it sorted.
Solution found, thread closed

Resources