[Q] MSCR file on Sony PNA - General Questions and Answers

Hi,
My PNA is a windows mobile based Sony NAV-U which has 2 different navigation apps installed on the resident flash.
I asked this question on a PNA Forum...but was asked to try asking on an xda-developers forum so here I am.
I'm looking for advise on how I can set up my PNA so that on switching it on, I'm asked to choose which of the 2 navigation apps currentl installed on I wish to run.
Whether that is by a prompt on screen or a sequential choice so that cancelling the first choice would trigger the second one to run, else the first would be triggered.
I'm no programmer but if someone here has the knowledge of which script lines to insert into the mav-u.mscr file to allow this, it would be hugely appreciated.
I hope I can find the answer here.
Many, many thanks in advance.
Tee_J
Contents of current nav-u mscr file follow:
RegWriteDword ("HKCU", "ControlPanel\Volume", "Mute", 5)
Kill ("SonyCalibMan.exe")
Close("SonyAppMan")
Copy("\Mounted Volume\Sony\nav-u\MortScript.exe","\Windows\MortScript.exe")
Copy("\Mounted Volume\Sony\nav-u\toolhelp.dll","\Windows\toolhelp.dll")
Copy("\Mounted Volume\Sony\nav-u\TestMode.exe","\Windows\TestMode.exe")
Copy("\Mounted Volume\Sony\nav-u\PowerOn.mscr","\Windows\PowerOn.mscr")
RunOnPowerOn ("\Windows\MortScript.exe","\Windows\PowerOn.mscr" )
RunWait("\Mounted Volume\Sony\nav-u\ToolDevice.exe","off 18")
RunWait("\Mounted Volume\Sony\nav-u\ToolDevice.exe","off 15")
RunWait("\Mounted Volume\Sony\nav-u\ToolDevice.exe","on Serial")
Run ("\Windows\TestMode.exe")
Sleep (50)
Kill ("TestMode.exe")
While (TRUE)
RunWait ("\Mounted Volume\Primo2\Primo.exe")
PowerOff
EndWhile

Related

Batch files in CE?

Hello,
Is it possible to write batch files in CE? I would like to create a script to start a sequence of executables. For instance, start bluetooth, checkpoint and then TOMTOM.
Thanks,
Marco
Yes that interests me too
Yes,there was a .cab in Sin-merged Rom 2003se for Himalayas about Dos.
Try check out the post.
PS: Don't use pocket dos.
I find this
MortRunner
"With MortRunner, you can start, close, activate, and hide programs, and even remote control them to a certain degree.
It's more an hacker tool without a nifty interface, which can execute some kind of batch files..."
Here you can d/l the latest beta. There's not much new there, but it might be useful for some...
- Includes a tool to support WM's autorun on storage card insert/remove
- Rotate command
- .mortrun extension only registered when started without parameters (to avoid it's changed to the autorun folder)
(Don't worry about the German forum, the zip includes an English manual)
Mort > Thanks for your work
Is there a way to create a ".mortrun" file to mute/unmute the system sound ?
I'd like to do this to be able to use a shortcut to this file and so voice command mute/unmute via Microsoft Voice Command.
See this thread
DocteurN said:
Is there a way to create a ".mortrun" file to mute/unmute the system sound ?
Click to expand...
Click to collapse
No.

TUTORIAL: Periodically & automatically backing up an important file to a memcard

I’ve received the following question in the Smartphone & Pocket PC Magazine forums:
“I have a HX4700 with a Garmin CF620 Compact Flash GPSr unit.
This unit uses the Garmin QUE software for navigational purposes.
The active track-log is saved in a single file in the installation directory (program files) and on two occasions I've lost the tracklog and almost got myself in an emergancy situation due to either a battery issue or the necessity to do a hard reset.
My question is if you perhaps know of a 3rd party software that I can use to either in real-time or given time intervals mirror / sync the file to the Ipaq file store or external memory .
I'll even be happy if its a program that I have to run to copy the file to another location, then I can at least assign it to a button, and press it every so often.”
The answer to this question is a big YES, you can do this, without having to use a full system backup. What is more, you can do this with a free (!) and fully automatic tool – I’ve custom-written an nScriptm script which does exactly what you want.
I’ve already elaborated a lot on the possible usages of the excellent nScriptm; please see for example this and this article, along with the links. (Search for “nScriptm” with Ctrl-F if you don’t want to read the entire article. I, however, as usual, recommend reading these articles in their entirety if you want to know how Pocket PC screenshots can be taken and how calls can be (automatically) recorded.)
To solve the problem asked by my reader, as I've already stated, I’ve written an nScriptm script. It’s available here for download. After you edit it to point to the source and the target files (they are \Program Files\source.txt and \SD-MMCard\backup.txt by default; you can, in general, leave the latter filename intact and only change the storage card path), you MUST put it in the \Program Files\ns\ directory (you must create it at first) so that the executable link file, which is available here, can find it. You must do the same with the executable file (ns.exe) of nScriptm available here – that is, put it in \Program Files\ns\.
Note that, along with the source and, possibly, the target filenames, you can also modify the interval of the backup. It’s 120 seconds by default. If you want to set it to another value, just modify the parameter in sleep(120).
You can, of course, put the executable link file, PeriodicallyBackupAFile.lnk, to \Windows\Start Menu\Programs for easy access.
Now, just start the backup tool by executing the latter executable link file and minimize nScriptm. It’ll continue running in the background and backing up your file.
Other alternatives
Note that you can also do the same with the excellent SKScheMa, which is another product of the excellent S-K people also written (more precisely, ported) nScriptm and a lot of other, high-quality tools like SKTools. With it, you can for example backup your stuff every, say, hour. The advantage of the SKScheMa-based solution that it doesn’t need to be always run in the background. That way, you can lower the CPU / memory usage.
Also, if you know how you can manually add timed, recurring events with, say, SKTools, you can manually execute a simple filecopy (without periodicity – that is, modify script to the following:
function main() {CopyFile("\\Program Files\\source.txt","\\SD-MMCard\\backup.txt");}
and just configure your event queue to execute the link file it, say, every hour.)
For geeks
For programmers or anyone that would like to know how it works and how easy nScriptm is to use, the script is as follows:
function main()
{
while(1<2)
{CopyFile("\\Program Files\\source.txt","\\SD-MMCard\\backup.txt");
sleep(120);}
}
(Note that there is no “true” symbolic constant in nScriptm and, therefore, I couldn’t use while(true) and you must escape backslash characters as with all C-like languages / regexps; this is why there are "doubled" backslash characters.)

[Q] Open a Programm twice parallel?

Hi everybody,
is it possible to open a programm twice parallel? I want to open the coreplayer twice, one time for music and another time for audiobook. Is that possible?
thx, mic
It's probably not too hard to write a script for it.
trying talking to either vijay or oldsap.
Depends on the code in the program itself. In the shell code created by Embedded C++ in the InitInstance function there is the following code:
Code:
hWnd = FindWindow(szWindowClass, NULL);
if (hWnd)
{
// set focus to foremost child window
// The "| 0x01" is used to bring any owned windows to the foreground and
// activate them.
SetForegroundWindow((HWND)((ULONG) hWnd | 0x00000001));
return 0;
}
In other words when the application starts, it looks for another active process with the same name as itself. If it finds one, it activates it, then kills itself.
thx for try to help me - that means it is not possible?
The original PPC programming guidelines by Microsoft stipulated that only one copy of a program should be running at any one time. In later versions of Windows CE/PPC a lot more processes are allowed to run simultaneously. They may have changed their tune over this since. Try and launch it twice, then go to Settings->System->Memory and see if there is more than one copy in Running Programs. If there is only one, then I'm afraid the answer is no.
P.S. If you create a Windows Mobile Win32 program in C++ under Visual Studio 2008, it still has the process checking code in it by default.

running multiple instances of a software

Hello all.
I use Windows mobile 6.1.
I would really like to be able to run mobipocket reader (and some other software) concurrently. Running multiple instances of a program at once is really useful as we dont have to close something just to open another document.
Can anybody tell me if there is a way to do this?
It depends on the software itself. The original Pocket PC methodology as published by MS was that only one copy of a program should be in memory at one time, and that it should only open one document at a time. If you create a shell C++ application in VS Studio, it contains the following code in the InitInstance function.
Code:
//If it is already running, then focus on the window
hWnd = FindWindow(szWindowClass, NULL);
if (hWnd)
{
// set focus to foremost child window
// The "| 0x01" is used to bring any owned windows to the foreground and
// activate them.
SetForegroundWindow((HWND)((ULONG) hWnd | 0x00000001));
return 0;
}
The comments are inserted by the VS code wizard.
Basically the application looks for another instance of itself in memory. If it finds one, it activates that copy before terminating itself.
By starting a second copy of the program, you merely reactivate the first one.
WinCE has a 32 process limit but this is set to change with WinCE 6.0. we will probably have to wait until at least WinMo 7 for this to filter through.
thanx stephj
do you know if anyone has created such a shell already?
I have heard of js hexmaster but couldn't find it anywhere, besides it's for application developers
TIA
Haali Reader is an ebook reader I use (and prefer over mobipocket) that supports multiple instances.
thanks noidtluom, I knew that, but i'm in too deep with mobipocket.
Do you know any other good ebook readers that can open prc format created by mobipocket?
Would really be great if there were...
cheerz
any updates on hacks to run multiple instances of the same program at the same time?
you seem to be able to do this on PC:
http://www.makeuseof.com/tag/how-to-run-multiple-versions-of-the-same-program-on-your-pc/
and here:
http://filesharefreak.com/2008/08/08/how-to-run-multiple-instances-of-utorrent-v177-v18/

WINCE satnav ceFFM-0.3.5 got running

Really this should be on the developers forum, but I cannot post there.
New 7" Chinese satnav, WINCE6.0.
cdFFM-0.3.5 put on TF card and run.
Errors in lines 2251, 2277, 2264, 2270, 2258 for info seem to be links, probably already there - pointing elsewhere.
After reboot many menu items don't work, run MortScript.exe (in root directory of ceFFM), this will allow the scripts to work thereafter, and the menu items work (note some are dummies - useful for modding).
It doesn't boot unless you do the simple kludge below.
To boot into ceFFM use "Navi Path" button to point Navigation to CEMenu.exe (in root directory of ceFFM), then check button takes you to cdFFM, then you can use "Navi Path" button to "Auto run GPS when startup" and you are straight into ceFFM.
[My path was SDMMC\cdFFM-0.3.5\CEMenu.exe, for example].
You then need to edit the navigator link in the programs directory.
In my case it was iGO8 so I edited SDMMC\cdFFM-0.3.5\PROGRAMS\iGO8.lnk to point to my navigator program like this:
23#"\SDMMC\iGO8\iGO8.exe"
The 23# is the number of characters in "\SDMMC\iGO8\iGO8.exe" (+1 for some reason)
Please note that quite a lot of the menu items in ceFFM are capable of brikking your device.
Now a question
OK, I know its poor form to reply to your own post but...
Two things still not sorted for this satnav:
1) A 480x800 version of NaviPlayer. I don't know how to set the skins to work.
2) The satnav will not load .CAB files. Even if I put wceload.exe and run it pointing to the required file, it just claims the .CAB file is not valid. I've tried quite a few, and I think they are. I presume its a means to prevent people modifying the device. Stand alone .exe's work just fine. Anyone got a fix for this, its really irritating!
If wceload.exe fails, and then probably only signed .CAB-files are accepted. Workaround: Allow installing unsigned .CAB-files. You do this by editing device's registry as
following:
[HKEY_LOCAL_MACHINE\Security\Policies\Policies]
"00001001"=dword:00000001
"00001005"=dword:000000DE
"00001006"=dword:00000001
"00001017"=dword:00000010
"0000101a"=dword:00000001
"0000101b"=dword:00000001
HTH
jwoegerbauer said:
If wceload.exe fails, and then probably only signed .CAB-files are accepted. Workaround: Allow installing unsigned .CAB-files. You do this by editing device's registry as
following:
[HKEY_LOCAL_MACHINE\Security\Policies\Policies]
"00001001"=dword:00000001
"00001005"=dword:000000DE
"00001006"=dword:00000001
"00001017"=dword:00000010
"0000101a"=dword:00000001
"0000101b"=dword:00000001
HTH
Click to expand...
Click to collapse
That's neat...
OK, not that unexpectedly I find no entry \security\policies\polices .
"security" is found:
use\comm\security
machine\comm\security providers
machine\comm\security
machine\software\microsoft\Rpc\securityService
value: machine\software\Rpc ="DCOM Security"
machine\software\internet explorer\security
value: machine\software\internet explorer\security\basic = "security name"
machine\software\internet explorer\security\NTLM = "security name"
"policies" doesn't appear at all.
I found a reference to "username = guest", but neither appeared anywhere else.
I did spot in machine\OEM that value "app" is a path that points to the OEM menu system (main.exe).
May be possible to intercept here (if you wanted).
root\.cab is set to name "@"=64 value "cabfile"
hmmm... nothing that leaps out at you ...
bother!
farmeroz said:
That's neat...
OK, not that unexpectedly I find no entry \security\policies\polices .
Click to expand...
Click to collapse
Create it!
OK I did that, rebooted.
A bit scary as I haven't added such things before...
Still doesn't work.
Attempting to 'run' nitro.cab (nitrogen renamed) fails
However the OS claims that there is no application associated with 'nitro'.
However .CAB is a cabfile under \root\
and a cabfile default icon is \SDMMC\ceFFM-0.3.5\system\wceload.exe,-101
shell\open\command is \SDMMC\ceFFM-0.3.5\system\wceload.exe\"%1\"
So (whilst I haven't a clue) I would expect .cab files to be spotted.
farmeroz said:
OK I did that, rebooted.
A bit scary as I haven't added such things before...
Still doesn't work.
Attempting to 'run' nitro.cab (nitrogen renamed) fails
However the OS claims that there is no application associated with 'nitro'.
However .CAB is a cabfile under \root\
and a cabfile default icon is \SDMMC\ceFFM-0.3.5\system\wceload.exe,-101
shell\open\command is \SDMMC\ceFFM-0.3.5\system\wceload.exe\"%1\"
So (whilst I haven't a clue) I would expect .cab files to be spotted.
Click to expand...
Click to collapse
Use Win32 "MSCEInf" utility (it's freeware, google for it) to extract any .CAB file, if "wceload" doesn't work for you. After having extracted the .CAB, you are able to copy the application/data to any location of your choice at mobile device.
Oooh... That looks like a solution....
Didn't work. Can't see why though.
Hmmm. That editor shows (XML)
[Version]
Signature = "$Chicago$"
CESignature = "$Windows CE$"
Provider = "BenThon"
surely chicago is a win9x version?
I thought I had, but reading the long Nitrogen thread I don't think I did.
There doesn't seem to be a version for wince5/6, that's downloadable from anywhere, even though it exists somewhere because people have run on wince5 systems. Microfi is overworked...
I was somewhat under the impression that mobile was +- same as CE, but clearly not.
Signature="$Chicago$"
simply tells you the machine's OS the cab was built on[
I guessed that, sadly after I had posted.
Basically for my satnav I need a music player to play in the background, easily reachable from iGo8 (using megaduck99 skin, I have now got just how I want it!) nav screen and back. Really all I ever want to do is skip to the next track, as with 1000+ MP3's, sometimes you just aren't in the mood for some of them. Naviplayer (if it had an 800x480 skin) is finger usable for this whilst driving. Then (with bluetooth) I can just plug the satnav into my car radio (FM is rather poor quality) and utter perfection .... (who needs CD's these days?).
I'll have to have another stab at working out how to run the skins on naviplayer.
Your front end, particularly with the wealth of apps, is excellent. I have now put it on a no-name 7" netbook I use to backpack with, and now realise how slow it is compared to the more modern ones. Good enough for emails etc though.
NB I have been starting (manually) by running CEMenu.exe rather than ceFFM, is that what you intended?
To reskin NaviPlayer it merely suffices to have a folder named "mpskin" containing the files for the required skin copied from the examples given.
Its not immediately obvious because there is no default skin file provided (eg the small gold one it defaults to).
The fonts aren't quite right, either size or location
I have come across a bug in some of the apps. If I open notepad and the file-open, the entry box is not within the screen just far enough off that you can't grab it to pull it down. This is also the case in word. Doubtless somewhere there is a file that sets the position, any ideas? Annoying because I can't edit the mpskn.skn file....
Modified MP3P.SKN inside NAVIPLAYER\MPSKIN
This should work for all the 'Simple 3.1" skins.
If you want a button to appear when minimised you will have to adjust the button size/position/etc .
This is done in/with [MAIN_MIN_WINPOS]
If you have a larger button (as I do) then you will need to make a button of the appropriate size to replace the one in
BACK_MIN.BMP
I haven't done one yet, for iGO8 it will need to be under the bluetooth one, and similar size.
Hope this is useful.
NB I have no loader files for NaviPlayer (last good mod), I got it included in ceFFM.
;====Modified MP3P.SKN
[MP3 INFO]
MP3_Ver=1.0
[MAIN_WINPOS]
Width=800
Height=480
[MAIN_MIN_WINPOS]
Left=66
Top=0
Width=60
Height=24
WidthOne=1
[TRACK_POS]
Left=572
Top=129
Width=60
Height=14
SubValue=17
[TIME_POS]
Left=188
Top=129
Width=90
Height=14
SubValue=17
[SEEK_POS]
Left=212
Top=152
Width=373
Height=9
[INFO_POS]
Left=280
Top=189
Width=150
Height=9
;SubValue=0
[STATUS_POS]
Left=387
Top=375
Width=64
Height=38
[TITLE_POS]
Left=218
Top=65
Width=366
Height=20
[VOLBAR_POS]
Left=466
Top=272
Width=162
Height=6
[PEEK_POS]
Left=173
Top=250
Width=250
Height=28
SubValue=7
[VOLSLIDER_POS]
Left=466
Top=271
Width=162
Height=10
SubValue=3
;[TIMESLIDER_POS]
;Left=216
;Top=179
;Width=369
;Height=10
[PLAYOPT_POS]
Left=561
Top=184
Width=147
Height=12
SubValue=30
;====================
;Button Position
;====================
[BT_PLAY_POS]
Left=331
Top=330
Width=140
Height=150
[BT_STOP_POS]
Left=474
Top=285
Width=178
Height=49
[BT_PREV_POS]
Left=147
Top=396
Width=180
Height=84
[BT_NEXT_POS]
Left=474
Top=396
Width=178
Height=84
[BT_OPEN_POS]
Left=0
Top=102
Width=140
Height=73
[BT_MODE_POS]
Left=661
Top=342
Width=139
Height=138
[BT_ALBUM_POS]
Left=0
Top=182
Width=140
Height=73
[BT_EFFECT_POS]
Left=660
Top=485
Width=130
Height=70
[BT_EQ_POS]
Left=661
Top=182
Width=139
Height=73
[BT_PRESET_POS]
Left=661
Top=261
Width=139
Height=73
[BT_MULTI_POS]
Left=0
Top=23
Width=140
Height=73
[BT_VOLDN_POS]
Left=147
Top=342
Width=180
Height=50
[BT_VOLUP_POS]
Left=474
Top=342
Width=178
Height=50
[BT_MUTE_POS]
Left=0
Top=261
Width=140
Height=73
[BT_EXIT_POS]
Left=661
Top=23
Width=139
Height=73
[BT_MINIMIZE_POS]
Left=661
Top=102
Width=130
Height=73
[BT_SHUF_POS]
Left=0
Top=342
Width=140
Height=138
[BT_MIN_NORMAL_POS]
Left=0
Top=0
Width=60
Height=24
[BT_MIN_NEXT_POS]
Left=62
Top=0
Width=4
Height=24
[BT_MIN_MUTE_POS]
Left=68
Top=0
Width=4
Height=24
;==============================
; IMAGE LIST
;==============================
[IML_NUMBER]
Width=16
Height=12
[IML_STATUS]
Width=32
Height=38
[IML_PLAYOPT]
Width=49
Height=12
;==============================
; COLOR Type : BGR (0xffffff)
;==============================
[COLOR]
Info=0xffffff
Title=0xffffff
Seek=0xffffff
PeekLeft=0xffffff
PeekRight=0xffffff
VolumeBar=0xd14a00
;==============================
farmeroz said:
Please note that quite a lot of the menu items in ceFFM are capable of brikking your device.
Click to expand...
Click to collapse
You really experienced it? If so then you should specify them here to clarify things.
ceFFM's Original Thread
jwoegerbauer said:
You really experienced it? If so then you should specify them here to clarify things.
ceFFM's Original Thread
Click to expand...
Click to collapse
Sorry for the delay, HDD MBR problems....
No, I didn't brick my machine, I am very cautious. However being able to play with the registry, hexeditors etc, is potentially hazardous.
Hmm, on reflection its a combination of not knowing what they all do, and not knowing my way round winCE. Ie ignorance.
String not closed
China gps KENMOO 7', wince 6. Hello, excuse my English. Trying to install ceFFM, the installation begins, but then the message: String not closed (mising quote)
Line 3631 (\ SDMMC \ ceFFM.mscr)
If (key EQ "Startup), and it's over. I can modify anything? Installing on SDcard. Thank you.

Categories

Resources