Trying to make MSReader portable

Discuss anything related to JauntePE, the utlimate utility to help you tame non-portable applications. Share your experience about the apps that work with JauntePE, and the apps that don't.
Message
Author
User avatar
Kranor
Posts: 120
Joined: Sun Jan 14, 2007 7:15 am
Location: uk

Trying to make MSReader portable

#1 Post by Kranor »

Hi having problems making MS Reader portable. First of all I am trying to build a portable .exe. That all works fine but as soon as I try to launch it i get an error message that MS Reader is quitting because it cannot find an eula. I now know that the eula is stored as

c:\Program Files\Microsoft Reader\oemeula.rtf

Now here is my msreader_jauntePE.ini so far

Code: Select all

[Registry]
Use=1
Data=.\Registry\msreader_registry.reg

[Filesystem]
Use=1
Data=.\Filesystem

[RegistryExclude]
1=HKEY_CURRENT_USER\Software\Microsoft\DirectInput
2=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket
3=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32
4=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Discardable
5=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts
6=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints
7=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2
8=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
9=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams
10=HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam
11=HKEY_LOCAL_MACHINE\Software\Microsoft\Direct3D
12=HKEY_LOCAL_MACHINE\Software\Microsoft\DirectDraw
13=HKEY_LOCAL_MACHINE\Software\Microsoft\DirectInput
14=HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket
15=HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
16=HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings
17=HKEY_LOCAL_MACHINE\System\CurrentControlSet
;1=*

[RegistryInclude]
 
[RegistryIgnore]
 
[FilesystemExclude]
;1=*

[FilesystemInclude]
1=26
2=28
3=35
;4=44
;5=43
;6=42
;7=38
[FilesystemIgnore]
 
[ModuleExclude]
;1=*

[ModuleInclude]
1=msreader.exe
an anyone guide Me through this minefield?
And no shouting about licence stuff. I have no intent on releasing any of this. And I am mainly doing this to see if I can. I have already solved the portable problem by thinstalling the app so this is mainly to learn more about JPE.

Chris
Posts: 106
Joined: Sun Dec 03, 2006 10:08 am

#2 Post by Chris »

I think what you need is in this key:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EBook1\2.1\Registration\ProductID]

If the entry is already in your system registry. Run JPEized regedit. Rename the EBook1 to something like Ebook, so the key would be redirected to the JPE reg. After, insert the entry to your original JPEized Ebook .reg.
I'm able to run it, but the window closes imediately and the process stays. I haven't done more research, but hopefully it's because of my PC settings.

EDIT: The window doesn't close, but rather hide itself. Again, I haven't done real test to see if it would leave any trace or not, but it shows enough that it can be done using JauntePE.

EDIT2: I don't know whether you got new version of JauntePE or not. In case if yes, you can also use JPERegger. Instead using JPEized regedit, you can use JPERegger by converting the real registry value to JPE registry.

redllar
Posts: 411
Joined: Thu Aug 03, 2006 7:52 pm
Contact:

#3 Post by redllar »

Did this all get worked out for you Kranor?

User avatar
Kranor
Posts: 120
Joined: Sun Jan 14, 2007 7:15 am
Location: uk

#4 Post by Kranor »

Nope not yet redllar i am still trying a few tweaks to it so i will post a new message once i am well and truly stuck again. LOL :lol:

User avatar
Kranor
Posts: 120
Joined: Sun Jan 14, 2007 7:15 am
Location: uk

#5 Post by Kranor »

Well I tried what chris suggested but no joy the first thing that pops up is still the box stating it cannot find the eula. I'm officially stuck so any ideas? I think its time for a new regshot file after an install to see what horrors lurk, as my old regshot file is now missing the odd liune of code :roll:

User avatar
Kranor
Posts: 120
Joined: Sun Jan 14, 2007 7:15 am
Location: uk

#6 Post by Kranor »

Hi all its still not working so here are my efforts so far:-
Here is my current reg file for the portable

Code: Select all



Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EBook]
"InstallDir"=hex(1):43,00,3a,00,5c,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,00,46,00,69,00,6c,00,65,00,73,00,5c,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,20,00,52,00,65,00,61,00,64,00,65,00,72,00,5c,00,5c,00,00,00,00,00
"ClearTypeLocation"=hex(1):43,00,3a,00,5c,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,00,46,00,69,00,6c,00,65,00,73,00,5c,00,5c,00,43,00,6f,00,6d,00,6d,00,6f,00,6e,00,20,00,46,00,69,00,6c,00,65,00,73,00,5c,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,20,00,53,00,68,00,61,00,72,00,65,00,64,00,5c,00,5c,00,43,00,6c,00,65,00,61,00,72,00,54,00,79,00,70,00,65,00,5c,00,5c,00,63,00,74,00,72,00,61,00,73,00,2e,00,64,00,6c,00,6c,00,00,00,00,00
"Language"=hex(1):31,00,30,00,33,00,33,00,00,00,00,00
"Version"=hex(1):32,00,2e,00,31,00,2e,00,30,00,2e,00,30,00,00,00,00,00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EBook\2.1]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EBook\2.1\Registration]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EBook\2.1\Registration\DigitalProductID]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EBook\2.1\Registration\ProductID]
@=hex(1):35,00,35,00,39,00,30,00,31,00,2d,00,32,00,37,00,32,00,2d,00,33,00,34,00,30,00,37,00,33,00,38,00,33,00,2d,00,30,00,34,00,36,00,32,00,31,00,00,00,00,00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EBook\2.1.0.0]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EBook\UserDefaults]
"OEMInstall"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EBook\UserDefaults\DRM]
"Version"=hex(1):32,00,2e,00,31,00,2e,00,30,00,2e,00,30,00,00,00,00,00

[HKEY_USERS\S-1-5-21-1324192539-937263038-778721895-500\Software\Microsoft\EBook]

[HKEY_USERS\S-1-5-21-1324192539-937263038-778721895-500\Software\Microsoft\Speech]

[HKEY_USERS\S-1-5-21-1324192539-937263038-778721895-500\Software\Microsoft\Speech\Voices]

[HKEY_USERS\S-1-5-21-1324192539-937263038-778721895-500\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\1]
"ViewView2"=hex:1c,00,00,00,06,00,00,00,00,00,00,00,00,00,9c,00,00,00,00,00,01,\
  00,00,00,ff,ff,ff,ff,f0,f0,f0,f0,14,00,03,00,9c,00,00,00,00,00,00,00,30,00,\
  00,00,fd,df,df,fd,0f,00,06,00,28,00,10,00,34,00,48,00,00,00,00,00,01,00,00,\
  00,02,00,00,00,03,00,00,00,04,00,00,00,05,00,00,00,b4,00,60,00,78,00,78,00,\
  b4,00,b4,00,00,00,00,00,01,00,00,00,02,00,00,00,03,00,00,00,ff,ff,ff,ff,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00









and here is my .ini

Code: Select all

[Registry]
Use=1
Data=.\Registry\%appname%_registry.reg

[Filesystem]
Use=1
Data=.\Filesystem

[RegistryExclude]
1=HKEY_CURRENT_USER\Software\Microsoft\DirectInput
2=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket
3=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32
4=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Discardable
5=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts
6=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints
7=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2
8=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
9=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams
10=HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam
11=HKEY_LOCAL_MACHINE\Software\Microsoft\Direct3D
12=HKEY_LOCAL_MACHINE\Software\Microsoft\DirectDraw
13=HKEY_LOCAL_MACHINE\Software\Microsoft\DirectInput
14=HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket
15=HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
16=HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings
17=HKEY_LOCAL_MACHINE\System\CurrentControlSet
;1=*

[RegistryInclude]
 
[RegistryIgnore]
 
[FilesystemExclude]
;1=*

[FilesystemInclude]
1=26
2=28
3=35
;4=44
;5=43
;6=42
;7=38
[FilesystemIgnore]
 
[ModuleExclude]
;1=*

[ModuleInclude]
1=msreader.exe
The regshot file is a bit too big really to post so if it's really needed let me know and I will post it

crownixx
Posts: 403
Joined: Sat May 12, 2007 6:26 am

#7 Post by crownixx »

The regshot file is a bit too big really to post so if it's really needed let me know and I will post it
yup, and in my analysis, this app add registry to:

Code: Select all

HKEY_CURRENT_USER\Software\Microsoft\EBook
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EBook
HKEY_CLASSES_ROOT\.aa
HKEY_CLASSES_ROOT\.ebo
HKEY_CLASSES_ROOT\.fls
HKEY_CLASSES_ROOT\.lit
HKEY_CLASSES_ROOT\eBook
HKEY_CLASSES_ROOT\eBookEBO
HKEY_CLASSES_ROOT\MSAudible
Add folder to:

Code: Select all

My Documents\My Library
It add files in:

Code: Select all

some font in C:\WINDOWS\Fonts
C:\Program Files\Common Files\Microsoft Shared\ClearType\ctras.dll*
C:\WINDOWS\DASShp.dll *

*using Dependency Check, it found that msreader.exe use ctras.dll module
*the app register the DASShp.dll to the system
try to use Discovery registry first but fail, so i use dependency check to get other module (but not quite sure,i'm not the expert). they are in system 32 dir

Code: Select all

t2embed.dll
urlmon.dll
wininet.dll
msvcrt.dll
advapi32.dll
If i'm not miss anything, so here's my jpe runtime ini:

Code: Select all

[Registry]
Use=1
Data=.\Registry\%appname%_registry.reg

[Filesystem]
Use=1
Data=.\Filesystem

[RegistryExclude]
1=*

[RegistryInclude]
1=HKEY_CURRENT_USER\Software\Microsoft\EBook
2=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EBook
3=HKEY_CLASSES_ROOT\.aa
4=HKEY_CLASSES_ROOT\.ebo
5=HKEY_CLASSES_ROOT\.fls
6=HKEY_CLASSES_ROOT\.lit
7=HKEY_CLASSES_ROOT\eBook
8=HKEY_CLASSES_ROOT\eBookEBO
9=HKEY_CLASSES_ROOT\MSAudible

[RegistryIgnore]

[FilesystemExclude]
1=*

[FilesystemInclude]
;program files\common files
1=43
;Windows
2=36
;windows\font
3=20
;current username\my documents
4=5
;system 32
5=37

[FilesystemIgnore]

[ModuleExclude]
1=*

[ModuleInclude]
1=msreader.exe
2=aud_file.dll
3=utils.dll
4=player_dll.dll
5=msls31.dll
6=imgdecmp.dll
7=ebriched.dll
8=EBOOKFX.dll
9=dmgr.dll
10=d_Aud1.dll
11=aud_file.dll
12=%36%\DASShp.dll
13=%46%\Microsoft Shared\ClearType\ctras.dll
;system32
14=%37%\t2embed.dll
15=%37%\urlmon.dll
16=%37%\wininet.dll
17=%37%\msvcrt.dll
18=%37%\advapi32.dll
I dont have any problem with EULA warning box. I just export the registry and use JPERegger.exe to convert it to the JPE registry. then put those registry into the Registry folder. The only problem that i encounter is same with Chris, the MSReader windows is disapear after launched. i had to use task manager to kill the process.

Did my jpe runtime missing something?
here's my template if anyone would like to analyse more
Last edited by crownixx on Fri Aug 17, 2007 6:47 am, edited 1 time in total.

Chris
Posts: 106
Joined: Sun Dec 03, 2006 10:08 am

#8 Post by Chris »

Oops, I'm sorry Kranor, I only did small test to see if it possible or not to use this with JauntePE. After checking it again to make sure, this is the needed key for the eula:

Code: Select all

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\eBook]
"OEMInstall"=hex(4):00,00,00,00
"RegDefaultVersion"=hex(1):32,00,2e,00,31,00,2e,00,31,00,2e,00,33,00,31,00,34,00,33,00,00,00
"ContentDir"=hex(1):5a,00,3a,00,5c,00,44,00,6f,00,63,00,75,00,6d,00,65,00,6e,00,74,00,73,00,20,00,61,00,6e,00,64,00,20,00,53,00,65,00,74,00,74,00,69,00,6e,00,67,00,73,00,5c,00,58,00,5c,00,4d,00,79,00,20,00,44,00,6f,00,63,00,75,00,6d,00,65,00,6e,00,74,00,73,00,5c,00,4d,00,79,00,20,00,4c,00,69,00,62,00,72,00,61,00,72,00,79,00,00,00
"FirstRunFolderCheckDone"=hex(4):01,00,00,00
@=hex(1):00,00
Only see the keys, don't use my value as my computer might be different than yours. So, better use JPERegger on this case.
Having those registry as msreader_registry.reg, I could run without eula poping up. But the msreader goes to hide immediately.
Good luck.

EDIT: crownixx beat me by minutes.
Anyway, if you want to see the hidden window you could use a program called shideWin. And click the entry called Microsoft Reader.

crownixx
Posts: 403
Joined: Sat May 12, 2007 6:26 am

#9 Post by crownixx »

Chris wrote:EDIT: crownixx beat me by minutes.
Anyway, if you want to see the hidden window you could use a program called shideWin. And click the entry called Microsoft Reader.
:D just notice ur post
thanks for the shideWin

redllar
Posts: 411
Joined: Thu Aug 03, 2006 7:52 pm
Contact:

#10 Post by redllar »

@All: JPE can't use that .reg Kranor has posted. In general, JPE can't make use of any .reg that RegEdit spits out. That .reg will most likely crash the app. Or at the very least all of its contents will not be interpreted correctly.

Also, JPERegger will not convert that .reg into something JPE can use. It only converts the "value"="a string" entries into "value"=hex(1):.... equivalents. It won't convert dword: entries, hex: entries, or any other non-string entry. It also doesn't handle the continuation lines (the ones with the slashes at the end of them) and convert them into the one line that JPE requires.

Also, any key names that have the HKEY_USERS\S-1-5-21-1324192539-937263038-778721895-500 in them, or any other HKEY_USERS key for that matter, are specific to one Window's user account and are not portable. Those strings need to be converted to HKEY_CURRENT_USER.

The best approach for capturing an installed app's registry usage is to use JPE's discovery mode, assuming it's not broken for you. If it's broken then the next best approach is to start with the default JPE ini and have everything redirected and then weed out the non-app-specific .reg entries manually.

Given all that, it's amazing that you guys actually got this to run via JPE. I just wonder how portable it really is.

Would you mind if I had a go?

redllar
Posts: 411
Joined: Thu Aug 03, 2006 7:52 pm
Contact:

#11 Post by redllar »

@crownixx: That's an amazing job of detective work you've done.

The only thing I see wrong in the ini right now is the use of %#% within the ModuleInclude list. Those variables aren't needed there. Just include the filename.ext. The modules lists should never have path info in them.

EDIT: I also don't think that urlmon.dll, wininet.dll, msvcrt.dll, or advapi32.dll need to be in the module include list. msvcrt is the VC++ runtime and AFAIK it uses the other system dlls to do its registry and file system work. advapi32 actually contains the registry api so including it doesn't make much sense. And the other 2 dlls are for internet access. If you include them you'll wind up with the inet history, cookies, and cache data. Portable-wise you don't need to carry that stuff around. I guess maybe stealth-wise it makes sense to, but they're liable to be relatively big and slow things down if you're running off of a flash drive.

User avatar
Kranor
Posts: 120
Joined: Sun Jan 14, 2007 7:15 am
Location: uk

#12 Post by Kranor »

Hi redllar
I have no problems in you having a go :D . like I said I already have this portable. Its now all about learning more. And I think this time we have really given JPE a challlenge :!: :!:

crownixx
Posts: 403
Joined: Sat May 12, 2007 6:26 am

#13 Post by crownixx »

redllar wrote:@crownixx: That's an amazing job of detective work you've done.

The only thing I see wrong in the ini right now is the use of %#% within the ModuleInclude list. Those variables aren't needed there. Just include the filename.ext. The modules lists should never have path info in them.
thanks, i just want to help Kranor out from the problem but part from that i also gain the knowledge from it

ops, my mistake. must be i mess it up with FilesystemInclude. Then mybe the right jpe runtime ini should be look like this??

Code: Select all

[Redirection] 
;Logging=1 
FlashDisco=1 
IconDisco=1 
ModFrame=1 
RedirMisc=1 

[Registry]
Use=1
Data=.\Registry\%appname%_registry.reg

[Filesystem]
Use=1
Data=.\Filesystem

[RegistryExclude]
1=*

[RegistryInclude]
1=HKEY_CURRENT_USER\Software\Microsoft\EBook
2=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EBook
3=HKEY_CLASSES_ROOT\.aa
4=HKEY_CLASSES_ROOT\.ebo
5=HKEY_CLASSES_ROOT\.fls
6=HKEY_CLASSES_ROOT\.lit
7=HKEY_CLASSES_ROOT\eBook
8=HKEY_CLASSES_ROOT\eBookEBO
9=HKEY_CLASSES_ROOT\MSAudible

[RegistryIgnore]

[FilesystemExclude]
1=*

[FilesystemInclude]
;current username\my documents
1=5
;windows\font
2=20
;program files\common files
3=%43%\Microsoft Shared\ClearType\ctras.dll
;Windows
4=%36%\DASShp.dll
;system 32
5=%37%\t2embed.dll

[FilesystemIgnore]

[ModuleExclude]
1=*

[ModuleInclude]
1=msreader.exe
2=aud_file.dll
3=utils.dll
4=player_dll.dll
5=msls31.dll
6=imgdecmp.dll
7=ebriched.dll
8=EBOOKFX.dll
9=dmgr.dll
10=d_Aud1.dll
11=aud_file.dll
12=ctras.dll
13=DASShp.dll
14=t2embed.dll
EDIT: I also don't think that urlmon.dll, wininet.dll, msvcrt.dll, or advapi32.dll need to be in the module include list. msvcrt is the VC++ runtime and AFAIK it uses the other system dlls to do its registry and file system work. advapi32 actually contains the registry api so including it doesn't make much sense. And the other 2 dlls are for internet access. If you include them you'll wind up with the inet history, cookies, and cache data.
Added to my notes..thanks
i'll update this to my post

User avatar
Kranor
Posts: 120
Joined: Sun Jan 14, 2007 7:15 am
Location: uk

#14 Post by Kranor »

Ok i think that even though we might all have different .ini files or reg files we are all at a similar point, we can launch MSREADER it will find the eula and then immediately hide itself, we can use shidewin to show it again then it works perfectly. SO now just to fix that slightly annoying window hiding problem. By the way if anyone wants to join in i suggest you so far use the .ini and .reg file generated by crownixx so that you are all on the same playing field.

Chris
Posts: 106
Joined: Sun Dec 03, 2006 10:08 am

#15 Post by Chris »

I think you can use a simple script like AutoIt to unhide the msreader window. So create a launcher that would run msreader_portable.exe and if the process exists, unhide the window.

Post Reply