[Q] How can I change file path inside of a exe file? - General Questions and Answers

Hi.
First of all, let me say that half of time took me to look for the right forum in XDA to post this message, and I'm still not sure I'm in the right place..
I think my Q is about modifying my OS, and this is why I post it here.
If the admin think there's better forum to this issue - I'd love to hear it..
Now, to business:
I have a GPS device, brand is X-GPS Navigation, Model GPS-S450B, that I will like to play with.
The OS is Windows® Embedded CE 6.0.
I just found out that at my GPS device, there is a file that resposible to a certain BMP that shown up at the shutdown process.
The filename is "PowerKey.exe", and it reffer to a file named "Notice_en.bmp".
I want to change that Notice-en.bmp file, to show that message in another langueage. I tried to overwrite the file with a similar bmp file, no luck. The file just re-created.
I've tried to edit the PowerKey.exe with a hex editor, and write a new path, to a file in NandFlash directory instead of the Notice_en that lays in Windows folder.
That also didn't go so well. "PowerKey has been preform illegal action and have to be shout down" or something like that, was the message. I could only put the device to sleep, until I recovered the old PowerKey file.
Any solution how to change the BMP file that resposible for the shutdown message?
(I guess the best idea is to write a registry entry to overwrite the BMP file in \Windows directory with the one in the \NandFlash directory every boot, only problem - I donno how to do it. )

Anyone?
There's no solution to my problem?

Recompile the exe.

Thank you.
Any chance to general guidlines in how is that done?

Related

Executing file from flash-card immediately after booting..?

Hey people on the board!
I'm a relative newbie in this PDA-stuff so I have a question which perhaps (hopefully) is easy to answer. Problem:
I have an application which I run on my Qtek 1010. The application runs fine, but prior to using it, a significant amount of time must be spent on installing and configuring it. In case of battery-faliure, this needs to be done from scratch. I would therefore like the Qtek to execute a script-like file (autorun.exe) which performs this task, immediately after booting.. The file is present on a flash-card inserted in the slot. How do I do this? Where - on the card - do I place the file? In the root? And how do I detect it and run it automatically after a cold-boot?
Any help would be greatly appreciated! Thx!
/Joe72
Its quite simple
Hi there, your problem to fix is quite easy.
If you look in in your windows directory with the built-in explorer, you'll find a directory - either "startUp" or "Autostart" depends on the system language you are using. Here you put a link to the program you're having on card. With every cold- or warm boot it will be executed. :lol:
regards
cimber
On the memory card make a directory named 2577, I believe the pocket pc will look here for your autostart on boot, try it and see. You can try putting a cab file in there or your autostart config file. I am not an expert in this but thats how its done with ipaq navigation system which is an automatic routine using the 2577 directory and I have also seen other software using the same method.
the file should be called 'autorun.exe' in the '\storage card\2577\' directory.
when you insert the card, the autorun.exe will be copied to \windows, and executed with 'install' as parameter.
when you remove the card, it will get executed with 'uninstall' as parameter.
and then removed from \windows.
but this will not nescesarily happen at boot.
just figured out another thing: the number you put in the .lnk file in \windows\startup is completely ignored by windows.
also, if the executable is in \windows, you may omit the path,
you may also omit the extension if it is .exe.
if you specify commandline parameters, your application will get passed upto 255 characters starting from the first non-whitespace character after the executable name.and including any newlines that may be in the file.
Hi!
Thanks for the response. I'll give the methods a try during the day and get back.
Thanks so far - I appreciate it
/Joe72
Hi there (again)!
I have tried the different suggestions with no luck. Perhaps I should have been a bit more specific. What I actually need is to have the autorun.exe run (install) a number of cab-files also on the flash-card. I was - perhaps naively - thinking that there would be a generic tool out there to create this type of autorun.exe file? I am looking for something along the lines of what is being done here:
http://forum.xda-developers.com/viewtopic.php?t=508&highlight=autorun
Only, in the case above, the autorun.exe lauches a specific .cab-file which contains a ROM for the PDA.
Is there a "configurable" .cab-installing autorun.exe out there somewhere? Or should it be written from scratch every time for new purposes?
Hope I make myself clear
/Joe72
yes, it is in the extended rom, processing the config.txt file.
eeeh, but the location of the config.txt is taken from the registry, which is currently always set to \extended_rom\config.txt.
itsme said:
yes, it is in the extended rom, processing the config.txt file.
eeeh, but the location of the config.txt is taken from the registry, which is currently always set to \extended_rom\config.txt.
Click to expand...
Click to collapse
Could you explain that to me in more detail, please? As I mentioned, I am a relative newcomer in this Xda stuff Thanks..
/Joe72
what you are asking for is the autorun.exe found in the extended rom,
look for 'extended rom batch language' on the forum for details.
problem is that the autorun.exe from the extended rom uses the config.txt
pointed to by the "[HKEY_LOCAL_MACHINE\Comm] AutoRunCfg" registry value. which always is '\Extended_ROM\Config.txt"
what you could do, is change the 'autoruncfg' string in the autorun.exe binary in to something else. and then fill your own config.txt path in that registry value.
Thanks - that sounds like the way to do it. I guess I would copy the original config.txt, add my .cab-files, put it on the flash-card and then change the key in the registry to point to the card. Is that how it would go?
Now another stupid question: How do I access the registry? There is apparently no regedit.exe like on my desktop?
/Joe72
Joe72 said:
Thanks - that sounds like the way to do it. I guess I would copy the original config.txt, add my .cab-files, put it on the flash-card and then change the key in the registry to point to the card. Is that how it would go?
Now another stupid question: How do I access the registry? There is apparently no regedit.exe like on my desktop?
/Joe72
Click to expand...
Click to collapse
Managed to access the registry using Windows CE Remote Registry Editor. But whooops.. After a cold boot, the registry is reset to factory settings?! Hence my changes of the path to config.txt are also lost..? What to do?
/Joe72

Autocomplete

Maybe it is another post again about the autocomplete function, but I can't find an answer. I like this auto complete function, but the problem is that once you do a hard reset or install a new rom that all user owned words (words that were added by the system when typing) are lost. These words should be somewhere in a file, but I don't find this file.
Does anyone know what the name of this file is and where to find it?
Using File Explorer go into your Windows directory on your phone and then go to menu and click 'view all files' and you'll see a file called 'autocorrect'. That's the file you need to alter. Copy it onto your PC desktop and save a copy somewhere safe just in case you do something stupid. Now open up a copy of it on your PC and you'll see two columns - the left column is the 'typo' and the right column is what it corrects it to. You can add or change things here. I made "pcm' autocorrect to 'please call me' for example and 'tx' to 'thanks'. When you save the file do not change the format (Windows tries to save it as an Excel file- don't do that - leave it as it is which i think is txt). Now you need to replace the file on your phone however it is a locked file. Use your registry editor (I use Total Commander) and find the autocorrect file and change the settings so you can alter it. Delete the file existing on your phone and replace it with the file you just altered. Once this is done you need to soft reset and everything will work.
If you get a new phone or need to hard reset just make sure you take this file along with you and you'll keep all of your settings.
Thanks for the response, but it is not the file I am looking for. This is the file which is used when you choose the autocorrect function. This is not the file that is suggesting words while you are typing. Anyway, thank you.
eddyve said:
Thanks for the response, but it is not the file I am looking for. This is the file which is used when you choose the autocorrect function. This is not the file that is suggesting words while you are typing. Anyway, thank you.
Click to expand...
Click to collapse
dyncompdict.dat
see http://forums.thoughtsmedia.com/f32...d-dictionary-working-free-solution-71962.html
thanks, but no again. This link is only referring to win2003 and se. There is no such a dat file in here.

Help creating a cab file

I have this comm manager that I found from the forums a while back.. It was made my MFRAZZ... This installs correctly and works fine... However, I wanted to change the color of the buttons from blue to a maroon color that fades to black to match the theme on my phone
I opened the cab file and found quite a few files and an XML file... I found out the the other files were actually .png files renamed. I renamed them to ] .PNG and used Gimp to edit the pictures. I then renamed the files back to the origional file extension and used winrar to make it back into .cab.
I have a pic of the comm manger below, a pic of the error message and a pic of my current theme listed below. I also have the comm manager made by MFRAZZ and the comm manager I have edited attached below. They are clearly labeled.
Any help would be greatly appreciated. Maybe you could enlighten me on what I did wrong.
This is not an issue where the comm manager is open or running in the background. I think I might have done something to the files when editing them to change their colors. Any help would be greatly appreciated.
Picture titled Comm manager: This is the comm manager successfully installed to my device. This shows the blue Icons which I have changed to maroon.
Picture titled Unsuccessful: Error when I try to install the new edited comm manger.
Cab file titled Touch Comm Manager: The blue comm manger made by MFRAZZ
Cab file titled Comm Manager Maroon: The comm manager that I edited the picture colors and which will not install to my Device.
Help??
So no one interest in helping someone out?
you cant simply repack the cab with winrar , you need to sign the Comm Manager with Certificates, search the ofrum for msigner, download it and sign the comm manager with it and then hopefully you'r good to go
Do i run msigner on the cab file or do i run it on the individual files packed into the cab file? thanks
Msigner
Alright, this is what i got when using msigner on the cab file as well on the individual files inside of the cab file.... Looks like I'm doing something wrong.. Heres the error message
Error: Signing Failed. Result = 800b0003, (-2146762749)
I only found 2 threads on this error message while using msigner. Neither one was successful at helping me with my issue.
Thanks in advance
I searched some other forums on signing cab files as well as my best friend.... GOOGLE. It appears that im going to need a windows mobile 6 sdk and a program called MSDN.. Is this correct? Is there an easer way to do this?
i think it misses the Certificates, make sure you dnt take the EXE out of its root folder
Use MSCEinf to dump the CAB file (7th button from the left on the toolbar), then edit the PNGs, then repack the CAB with Cabwiz:
cabwiz "fullpath\filername.inf"
Cabwiz is included with XP, but if you can't find it, you can get it here.
the CAB does not have to be signed, and since you're not editing the EXE, it doesn't have to be signed either.
Thanks to Benthon for his wonderful MSCEinf. A free program that he continually updates for the benefit of us WinCE users.
J03M4N
Ok...
I have a folder on my desktop thats says Msigner. When I open it up, I see a file that says Ssigner.exe. I can click on that and it opens up but it wont let me write a certificate to my cab file. there is also a yellow folder that is labled tools..... It has a quite a few dll files in it.
Any help would be appreciated
Joemanb,
thanks for the software. Tried it out and it wont open up my cab file that I created. however it will open up the origional cab file... Maybe i did something wrong haha.....
*Update*
I used the program in the last post. it wouldnt readthe cab file that I created but It read the origional cab file from MFRAZZ. I put the origional cab file from MFRAZZ into the program and extracted the files.
It extracted all the files into the correct file format. All my pictures were .png. I thought I was on the right track. I went aheadand edited all the pictures to make them the colors I wanted them to be. I also saw a .mui file... and I saw comm.exe. I expect thats the comm manager. There is not .xml fle now.
How to I repack all of this back into a cab file?
Thanks in advanced
Instructions on how to create the CAB are in my first post :
then repack the CAB with Cabwiz:
cabwiz "fullpath\filename.inf"
Cabwiz is included with XP, but if you can't find it, you can get it here.
Click to expand...
Click to collapse
Type the command at a DOS prompt: 'fullpath' is the full path to the folder you dumped the CAB to, and 'filename.inf' is the name of the .inf file created when you dumped the CAB. Don't forget the quotes.
J03M4N
Sorry. I get a little ahead of myself. This is my first go at making a cab file. if all goes well i might do this more.
Nice I read on later and back tracked. I noticed that the link provided takes me to msdn's website with a title of Cabwiz(PPC Only) there is no download option. IS cabwiz built into the Windows Mobile 6 sdk?
Thanks in advanced again
ok im slowly getting this.... HaHa. I used command prompt and cabwiz. I took the inf file and pasted it into the folder that was dumped from the other program. I typed it in like this in command prompt.
cabwiz "d:\documents and settings\rzrgs6\desktop\windows\maroon_comm_manager.inf"
it kicked back with this error message...
Error: section [CEStrings] key"installDir" - data value must be an absolute path, or must start with a supported windows CE DirID <of the form %CEx%>
confused on this, maybe a little light shining on this might help.. Any Clues?
Heres an attachment of what I have so far...
you shouldn't have to move or copy the .inf, it should already be in the folder you dumped the CAB to.
It dumped a folder on my desktop callled windows. The comm manager.inf file was dumped on my desktop next to the yellow folder called windows. what you are saying is to do this
in command prompt, navigate to the cabwiz file. Type in cabwiz "d:\documents and settings\rzrgs6\desktop\windows" for the filename and just leave the .inf file on the desktop?
What to type exactly in command prompt is what is confusing me.
Thanks
Ok... I got frusturated with the .cab making process. I just took the pictures for the comm manager that I edited in GIMP and dropped them in my windows directory of my device.
It will keep me happy for now.
Below is my comm manager now and my theme on my phone which i created for Manila 2D
I'd like to help but it's hardfor me to describe it in english(my english is poor).I suggest that you can open it by winrar,see what it likes.And you can search it on google.
I appreciate everyones help.
I used WinCE to unpack the .cab file. It left me with a windows folder on my desktop with a bunch of .png files. I edited those from blue to the maroon fading black. The windows folder also had a .dll file a .mui file and the comm manager.exe file.
Next to the yellow windows folder I saw a .inf file which was dumped from the origional cab file. I expect this was the .xml installation file that was packaged in the origional cab.
Heres what I did. I searched and found Cabwiz and a few other cab making programs. I tried them all out with no success. I keep trying to use cabwiz as I fell it will do what I want. The only think is, I get an error when using Cabwiz which is in an earler post.
For now I gave up.... I just took the .png files that I edited in Gimp and copied them over to my windows Directory on my phone. I soft reset and the icons on my comm manager are the way that I want them to be
If someone could help me actually in the making of this file or just get me back on my feet and try again. I want to understand what it is that I am doing wrong.
Thanks
use the path to the .INF file like I said....
if you dumped the stuff to your desktop (WHY?) then your path to the inf file is:
"d:\documents and settings\rzrgs6\desktop\maroon_comm_manage r.inf"
so your command line is:
cabwiz "d:\documents and settings\rzrgs6\desktop\maroon_comm_manage r.inf"
why you stuck 'windows' in your path I don't know since that is NOT the path to the .INF file. The Windows folder was dumped along with the .INF file, but it was NOT the folder you dumped the CAB to. the Folder you dumped the CAB to is the folder you select after clicking the seventh button from the left in MSCEinf. Obviously you just selected the folder that was presented to you in the dialogue (Desktop) instead of navigating to a work folder and dumping it there.
I did NOT say to navigate anywhere after going to the command prompt (Cabwiz is in the system path). Nor did I say to move or copy anything.
You're reading alot into what I've said, and that seems to be your problem.

Edit exe to move picture reference ?

Hi guys,
I would need a help in editing an exe.
I'm trying to change the reference to the associed pictures. The app is supposed to be installed in the Windows folder so the reference to the pictures is hardcoded in the exe (ex: \Windows\CMP_Button_On_Mask.png).
I would like to move the app to the storage card in order to free up some memory. If I launch the exe from the Storage Card, it works but it still looks for the pictures in the Windows directory. I would like to be able to change the reference to something like "CMP_Button_On_Mask.png" instead of "\Windows\CMP_Button_On_Mask.png" to be able to put the pictures in the same folder than the application.
If I try to hexedit the exe and to manually change the reference (visible as .\.W.i.n.d.o.w.s.\.C.M.P._.B.u.t.t.o.n._.O.n._.M.a.s.k...p.n.g), it seems to corrupt it and I cannot launch it anymore on the device.
I tried to unsign/resign the file before/after editing but the result seems to be the same.
Please help !
Bump
If a moderator is around, maybe you could move my post to "Development and Hacking" it will probably get more success

Lost .dll file association, need help urgently please!

I was trying to copy shellresapps.192.dll file in the windows folder to my memory card so i can use the program 'Resource Hacker' to take a look at it, because it contains the wait cursor animation and i want to try edit it. However, it seems all the system files in the windows folder can't be copied or moved or renamed AT ALL. I checked the properties and unticked the read only option as well as other option, but whenever i press ok it doesn't apply the setting, so then i clicked the 'Associate' tab and unregister any file association with the shellresapps.192.dll file and hoping that i'll be able to rename or copy the file this time, but it doesn't do anything. And since i was careless, i didn't check the file path or the file of what the file association with the .dll file is, so now it seems all the .dll files are not registered with any program that it should be.....
i'm using EnergyROM and i did this in Total Commander. Can someone please kindly look at the file association for the shellresapps.192.dll file for me?? Just go to properties and choose the "Associate" tab.
And can someone also tell me how to copy or rename the system files??
Ok, first off the .dll you wanted to copy out is not a file, it's a module. You can't copy them out of the rom to your sd card with total commander. You can do this with rom files, but not rom modules (I'll let you look up the difference). There is an app called 'romextractor.exe' that allows you to copy modules out. You might try doing it that way.
Anyway, the rest of your post gave me a headache, so I only barely read it. I kind of doubt you deleted the association for dll's (I don't even see an association on TC), but here's the reg key you may need. Check first to see if it was messed up.
Code:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.dll]
"Content Type"="application/x-msdownload"
@="dllfile"
Cut and paste into a .txt file, name it and change the extension to .reg and import it if you need to.
i think i got it sorted by associating the .dll files with shell32.exe or something like that. You can check the association of a file by using Total Commander, right click on any file u want to check and go to properties. There you will see 2 tabs at the top, and one of them is Association, there you can choose to associate with anything as well as clicking on the X button to delete the association.
chaoscreater said:
i think i got it sorted by associating the .dll files with shell32.exe or something like that. You can check the association of a file by using Total Commander, right click on any file u want to check and go to properties. There you will see 2 tabs at the top, and one of them is Association, there you can choose to associate with anything as well as clicking on the X button to delete the association.
Click to expand...
Click to collapse
Yeah, I know, I'm just saying that I don't have an association for .dll's. You don't really need one with a .dll, because it's not a file that you open up for anything. You can change the icon to something else, though. I think you just need the registry key I posted, but I doubt that you changed it.

Categories

Resources