portmaster icon indicating copy to clipboard operation
portmaster copied to clipboard

Change Install Location

Open Lagicrus opened this issue 3 years ago • 7 comments

What would you like to add or change?: On installation change the install location of Portmaster from its default location

Why do you and others need this?: People like control and customization, this might also help running this in restrive environments, but especially when disk space is at a premium as normally the C: is the smallest size as it is the fastest, as such, for myself, I try to install all programs to a different drive to keep that drive clean, free and fast.

Lagicrus avatar Jul 04 '21 12:07 Lagicrus

Hi @Lagicrus, thanks for that suggestion. I understand the need for this and will discuss this with the team at our next roadmap meeting.

ppacher avatar Jul 07 '21 11:07 ppacher

I support that suggestion. I'd very much like to install my apps in the Program Files folder, which offers extra protection against malware. PortMaster deliberately installs in the ProgramData, a questionable choice.

skycommand avatar Jul 18 '21 07:07 skycommand

Hi @skycommand, thanks for letting us now!

We don't have the resources right now to tackle this but if you or @Lagicrus really want to do that we can outline the steps required to move the current installation to a different place.

ppacher avatar Jul 20 '21 14:07 ppacher

Hi @ppacher , I would be quite interested in hearing about how to accomplish that

Lagicrus avatar Jul 21 '21 03:07 Lagicrus

@Lagicrus That part is actually easy. They have a separate repo called safing/portmaster-packaging responsible for building the Windows installer of PortMaster. The main installer script is portmaster-installer.nsi You can open it with NSIS, which is free and open-source.

The hard part is to modify that script to support a custom installation location, which involves learning the NSIS scripting language.

After that, compile the script, which gives you an installer that installs Portmaster in a custom location. Test it and prove that it works. Then, open a pull request in the safing/portmaster-packaging repo to integrate your changes.

skycommand avatar Jul 21 '21 03:07 skycommand

It's also possible to move the installation by copying the installation directory to the new location and then execute the following command in an Administrator cmd.exe from within the new directory:

.\portmaster-start install core-service

This will update the path in the Windows service entry for Portmaster. portmaster-start will try to auto-detect the new location. If that fails, you can append --data=D:\Path\To\New\Location to the above command.

Note that you still need to manually update the start menu entries as the point to the old locations.

I don't have a windows box available right now so I cannot test but the above should work.

ppacher avatar Jul 22 '21 13:07 ppacher

I think letting the user choose the install directory is important.

A recent trend in a lot of software seems to be to install to some default location without giving the user any choice over it, and i'm not sure where this came from.

Not everyone is installing all of their software on the C drive.

Personally i have a pretty complex system of partitions for Programs, Data etc. specifically to keep the C drive for System things only as much as possible.

Please give the users a choice over this.

That being said, i haven't tried the approach of manually moving the directory yet, as mentioned above.

rebb avatar Aug 09 '22 12:08 rebb

Auto-closing this issue after waiting for input for a month. If anyone finds the time to provide the requested information, please re-open the issue and we will continue handling it.

github-actions[bot] avatar Aug 24 '23 05:08 github-actions[bot]