Cannot get portable app to run

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
User avatar
VA1DER
Hobby Astronomer
Hobby Astronomer
Posts: 18
Joined: 2023-07-08, 03:32

Cannot get portable app to run

Unread post by VA1DER » 2023-12-12, 17:15

Palemoon Portable 32.5.1 will not run on a particular Windows 10 Enterprise work computer when executed through the portable launcher. Palemoon itself will run if I drill down and execute the binary directly, but running the portable launcher has no effect. There is no message box, window, or message. The program executes and immediately terminates. I have run it through the command line and it still immediately exits with no console messages.

It is unknown whether this is related to any security currently on the the computer. Are there any command-line switches that can be used to cause it to create a log or be verbose? As there is absolutely no interaction when launcher is run, I'm at a loss for further debugging. I don not have access to the event log on this computer.

Operating system: Windows 10 Enterprise
Browser version: Palemoon Portable 32.5.1
32-bit or 64-bit browser?: 64
Problem URL: Nil
Browser theme (if not default): N/A
Installed add-ons: N/A
Installed plugins: (about:plugins): N/A

User avatar
therube
Board Warrior
Board Warrior
Posts: 1651
Joined: 2018-06-08, 17:02

Re: Cannot get portable app to run

Unread post by therube » 2023-12-12, 19:32

Given that "palemoon.exe" does run & that "Palemoon-Portable.exe" does not,
if you were to rename "Palemoon-Portable.exe" to "palemoon.exe"
- better, to make a copy of Palemoon-Portable.exe & rename that copy to palemoon.exe,
with that renamed "palemoon.exe", does that run & start PaleMoon?

To do this, you would actually need to also make a copy of Palemoon-Portable.ini & rename that to "palemoon.ini".
(I.e., the name of the renamed .exe needs to have a correspondingly named .ini.)


And in that respect, so long as you are running the correct "palemoon.exe (that being the one NOT in the /bin/ directory), you are then in fact running "Portable". You can confirm that in Task Manager (or similar) where you should see two "palemoon.exe", with 1 being the the "loader", using ~5 MB of RAM & the other being /bin/palemoon.exe, the actual PaleMoon .exe (& likewise Profile data should be updated within the /User/ directory tree).

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35651
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Cannot get portable app to run

Unread post by Moonchild » 2023-12-13, 00:30

It's possible that your endpoint security is interfering, e.g. by not allowing the program to write to the portable location's profile. If you launch palemoon.exe instead of palemoon-portable.exe, the location used for the profile will be the standard %APPDATA% user folder, and the result will not be portable.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
VA1DER
Hobby Astronomer
Hobby Astronomer
Posts: 18
Joined: 2023-07-08, 03:32

Re: Cannot get portable app to run

Unread post by VA1DER » 2023-12-13, 12:30

Thank-you for the tips. I had already renamed the launcher to try and diagnose to no effect. I did it again just now, duplicating the palemoon.exe filename, with no change.

I have tried moving the portable folder structure to various places. I tried it off my desktop, \temp and even in \appdata\roaming\Moonchild Productions\ since without the launcher the real palemoon.exe can clearly write there. I have write access, of course, everywhere I tried it, so the launcher process should have write access as well. I can verify that the launcher runs very briefly, as I can see it occasionally flicker on the the process list in task manager. So the launcher executable isn't being blocked. I can run other various executables in the launcher folder in every place I have tried it, including executables that write to the directory where they run from.

Is there any way to get the launcher to output error states to a log or message box?

User avatar
gepus
Keeps coming back
Keeps coming back
Posts: 943
Joined: 2017-12-14, 12:59

Re: Cannot get portable app to run

Unread post by gepus » 2023-12-13, 14:19

The screenshot was taken on Win7 where Pale Moon Portable works faultlessly.
Hence only a wild guess and it could be wrong:

EDIT:
My wild guess was wrong.
It's my my Win7 lacking update.
You do not have the required permissions to view the files attached to this post.
Last edited by gepus on 2023-12-13, 16:47, edited 1 time in total.

User avatar
therube
Board Warrior
Board Warrior
Posts: 1651
Joined: 2018-06-08, 17:02

Re: Cannot get portable app to run

Unread post by therube » 2023-12-13, 16:23

Does anything at all get written to User/Palemoon/Profiles/Default ?
Or is the Default directory even created, touched?


@G, maybe you're missing on update on your Win7 (dealing with sha-2 / sha256)?
.
Win7 x64:
Palemoon 32.5.1 Digital Signature OK.png
You do not have the required permissions to view the files attached to this post.

User avatar
gepus
Keeps coming back
Keeps coming back
Posts: 943
Joined: 2017-12-14, 12:59

Re: Cannot get portable app to run

Unread post by gepus » 2023-12-13, 16:38

therube wrote:
2023-12-13, 16:23
@G, maybe you're missing on update on your Win7 (dealing with sha256)?
You're right! This is the reason.

User avatar
VA1DER
Hobby Astronomer
Hobby Astronomer
Posts: 18
Joined: 2023-07-08, 03:32

Re: Cannot get portable app to run

Unread post by VA1DER » 2023-12-14, 12:42

therube wrote:
2023-12-13, 16:23
Does anything at all get written to User/Palemoon/Profiles/Default ?
Or is the Default directory even created, touched?
Nothing is written. Nothing is touched. It looks like it isn't even trying to read the .ini file, since I can delete it and there is no effect. It doesn't give me an error dialog when the .ini file is missing, like it does on other computers.

Firefox Portable will run just fine, and it works in much the same way, but I really don't want to have to use it. Firefox is lousy with trackers and phone home shite you can't turn off.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35651
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Cannot get portable app to run

Unread post by Moonchild » 2023-12-14, 15:14

Well if something simply terminated the launcher right away then there's no way to use it. May want to look into whatever security software might be interfering, because some of them do not like x-launcher or anything compiled with AutoIT. There really is nothing much else to suggest at this point if it doesn't even get to reading the ini, as it means its execution is being stopped very early.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
VA1DER
Hobby Astronomer
Hobby Astronomer
Posts: 18
Joined: 2023-07-08, 03:32

Re: Cannot get portable app to run

Unread post by VA1DER » 2023-12-14, 17:01

Moonchild wrote:
2023-12-14, 15:14
x-launcher or anything compiled with AutoIT
I didn't realize the launcher was an AutoIT compiled script. A lot of stuff marks AutoIT as a trojan just on general principles. In this case, though, my suspicion is something else. My account is a domain account and my home directory is on a network asset. If it's a compiled AutoIT script then it is looking to drop the script to a temp file and execute it. I bet it's having troubles with that.

Is the script also open source? If so I'll see if I can get it to work manually.

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 940
Joined: 2021-01-26, 11:18

Re: Cannot get portable app to run

Unread post by Kris_88 » 2023-12-14, 19:11

VA1DER wrote:
2023-12-14, 17:01
Is the script also open source? If so I'll see if I can get it to work manually.
You can try a batch file, which does almost the same thing as the standard launcher.
Create a "pm.cmd" file in the same folder:

Code: Select all

@echo off
set ABS_PATH=%~dp0
set USER_JS=%ABS_PATH%%USERNAME%\Palemoon\Profiles\Default\user.js

IF NOT EXIST "%ABS_PATH%Bin\Palemoon\palemoon.exe" EXIT

IF EXIST "%USER_JS%" goto skip1
md "%ABS_PATH%%USERNAME%\Palemoon\Profiles\Default"
echo user_pref("browser.cache.disk.enable", false); >"%USER_JS%"
echo user_pref("plugin.expose_full_path", true); >>"%USER_JS%"
echo user_pref("extensions.enabledScopes", 5); >>"%USER_JS%"
echo user_pref("browser.download.useDownloadDir", false); >>"%USER_JS%"
echo user_pref("browser.download.manager.retention", 1); >>"%USER_JS%"
echo user_pref("browser.shell.checkDefaultBrowser", false); >>"%USER_JS%"
echo user_pref("browser.taskbar.lists.enabled", false); >>"%USER_JS%"
echo user_pref("app.update.auto", false); >>"%USER_JS%"
echo user_pref("app.update.enabled", false); >>"%USER_JS%"
echo user_pref("browser.cache.disk.parent_directory", "%ABS_PATH:\=\\%%USERNAME%\\Palemoon\\Profiles\\Default"); >>"%USER_JS%"
echo user_pref("browser.download.lastDir", "%ABS_PATH:\=\\%Downloads"); >>"%USER_JS%"
echo user_pref("browser.startup.homepage", "http://start.palemoon.org"); >>"%USER_JS%"
:skip1

set MOZ_NO_REMOTE=1
set MOZ_PLUGIN_PATH=%ABS_PATH%Lib\Mozilla\Plugins;%ABS_PATH%Lib\Java\bin\new_plugin
set MOZ_PROFILE_PATH=%ABS_PATH%%USERNAME%\Palemoon\Profiles\Default

start "PM Portable" "%ABS_PATH%bin\palemoon\palemoon.exe" -profile "%MOZ_PROFILE_PATH%"


User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35651
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Cannot get portable app to run

Unread post by Moonchild » 2023-12-14, 20:56

VA1DER wrote:
2023-12-14, 17:01
A lot of stuff marks AutoIT as a trojan just on general principles.
The launcher is codesigned and has not changed for years. Even if something would normally trip over it, it would already have been whitelisted a long time ago. So it's quite possible your networking problem is what is the case here. Using a batch file as Kris indicated would be a good alternative.

The script itself is an almost-verbatim copy of x-launcher (WinPenPack). I only made minor changes to cater specifically to launching Pale Moon, and to have its own application icon.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
therube
Board Warrior
Board Warrior
Posts: 1651
Joined: 2018-06-08, 17:02

Re: Cannot get portable app to run

Unread post by therube » 2023-12-15, 16:21

My account is a domain account and my home directory is on a network asset.
I'm not really familiar with that, but does that mean that your PC is (kind of) acting like a "dumb terminal"?
And in that regard, are your running PM "from the network", or are you running PM "locally" & its' "data" is accessed across the network?

If the latter, if you change the Profile location (in PM Portable) to your local disk, does that allow Palemoon-Portable.exe to run?

Something like, Palemoon-Portable.ini:

Code: Select all

;(profile path)
MOZ_PROFILE_PATH=$Home$\$AppName$\Profiles\$Profile$
to
;(profile path)
MOZ_PROFILE_PATH=C:\LocalProfile\$Profile$

(
Portable
Depending on what you're looking for regarding "Portable"...

I do not know what Palemoon Portable does, particularly, but, if your intent is that it does not touch the Windows Registry [in addition to other reasons one may want a "portable" for], then note that the batch file method would not accomplish that.
)