Hi,
I'm trying to get Portable Firefox to use a JRE that has been copied to my USB stick (I'm assuming that there is no JRE on the local OS).
Having looked around this site and Google I came across the following articles:
https://portableapps.com/node/439
https://portableapps.com/node/9371
They seem to suggest that Firefox looks at HKLM\Software\JavaSoft to locate the JRE. How can you "fool" Firefox into reading a different key (such as HKCU) or perhaps an ini file. Has anybody done this?
I could write a batch program and write the USB JRE path into the registry, but this wont work in locked down systems because the user will not have write access to HKLM.
The other idea that I had was to write my own wrapper and try and implement "RegOverridePredefKey". I have got this to work of sorts but only from the current process that uses "RegOverridePredefKey". If I call WinExec "Firefox" then my re-directed key seems to be ignored by Firefox.
Has anybody got any ideas how I can solve this problem?
Many thanks,
Chris
Maybe, this one should help you: RegSvrEx - An Enchanced COM Server Registration Utility
Many thanks "Tittoproject" for your quick responce and help.
I will have a look at the suggested solution tonight.
Do you have any examples on how to use RegSvrEx?
I'm not sure how I go about redirecting HKLM\Software\JavaSoft to point to HMCU\Software\PortableApps\JavaSoft as an example.
I've also searched Google and Sourceforge for a replacment for RunAs. I'm thinking of trying to run my batch program as system so that I can modify the registry, run the application and then put the registry back to how I found it.
Thanks for your help,
Chris
What do you exactly mean with "replacment for RunAs"?
I'm not a programmer, but I like playing with AutoIt3 and it provides the function RunAsSet that should be what you're looking for.
Thanks again "tittoproject" but AutoIt3 is not really what I am looking for. I need a non privileged user to be able to redirect HKLM and map it to HKCU (a bit like RegSvrEx dose).
The types of different RunAs that I was referring to are as follows:
http://blogs.msdn.com/aaron_margosis/archive/2004/07/24/193721.aspx
http://runasadmin.wiki.sourceforge.net/
I was hoping that they would give me the rights without knowing what the local admin account on the workstation is.
And the following link is a much better description of what I am trying to achieve:
http://blogs.msdn.com/aaron_margosis/archive/2006/02/06/525455.aspx
I liked the article on RegSvrEx, that was a good explanation on how to redirect the registry, however code injection was a bit beyond me.
Thanks again,
Chris
Another idea: you can try to hack the SID key.
Actually I'm testing this way to create file associations for portable apps, only for the current user and for limited accounts. This method work like a charm to me, even for the Guest account!