Jump to content

Make Portable apps Unportable?


RBCC

Recommended Posts


I don't understand what you want. If you don't want them to move, then don't move them. Just because they "CAN" be moved to a new location, doesn't mean they will or can move by themselves. Or do I not understand the problem?

Cheers and Regards

Link to comment
Share on other sites

If by "unportable" you are meaning that if a portable exe is on a computer, if it is copied to a different location or onto another drive or computer then it won't function... then yes.

There are multiple ways to approach it, one would involve modifying the portable program itself, which may not be allowed under license.

Another option is to write a wrapper. This wrapper would do the following:
1. Check against some data on the local system (look for a file, contents of a file, WMI/DMI, etc) before execution.
2. If pass, then extract the portable exe into memory.
3. Execute exe from memory.

In this scenario, the wrapper contains the portable exe within itself and the original program does not exist separately. There would have to be some work to determine how to get the exe into memory and/or whether or not to make use of temp files as installers do.

NOTE: this is a theory post. I have not made a wrapper like this before, and this is just one example of how it could be accomplished.

Link to comment
Share on other sites

If an app does not save any data in any way, there is no distinction between a portable and non-portable app.

Many portable apps (single or multiple files) support the creation of a configuration or settings file. If that file contains any file paths, any relative paths can be rewritten to include a uniquely-named system subfolder.

RegDllView (even if renamed) saves menu settings in an app-local RegDllView.cfg file. To make RegDllView non-portable (each computer gets its own settings), those settings need to be stored non-locally or in the registry. Changing the Start In folder with a shortcut does not work and RegDllView will not use the registry. If RegDllView.exe is unUPXed, then hexed, "RegDllView.cfg" can't be changed to another drive. The following batch file allows each computer to retain its own settings:

rem npRegDllView.bat
del RegDllView.cfg
copy %TEMP%\RegDllView.cfg
start /w RegDllView
copy RegDllView.cfg %TEMP%
del RegDllView.cfg


If what is really being asking is how to prevent RegDllView.exe from creating a RegDllView.cfg settings file, delete RegDllView.cfg then create a folder with that name instead.

Note: tested on Win98se.

Edited by jumper
Link to comment
Share on other sites

  • 2 weeks later...

I do not understand the reason why the OP wants to do this but a different approach might be to use WSCC (Windows System Control Centre). It is an organizational program that can run program suites like MS Sysinternals and multiple NIRSoft utilities, including RegDLLView, under a single umbrella.

There are currently almost 400 free to use tools/programs it supports and chances are you won't use 95% of them ever but having this huge toolbox all neatly arranged in one place can be very useful.

There are a few issue in that some of the tools/programs do not like being run, initially, from WSCC because the creator wants you to register them first. In those few cases you need to launch them directly from their .exe  and afterwards they should launch from WSCC perfectly. Other tools require specific admin permissions so it is probably a good idea to set up WSCC to always run as administrator ie. create a desktop shortcut and then use right mouse click > context menu  > Shortcut tab > Properties > Advanced button and tick that option.

I've had WSCC on all my machines for as long as I can remember and even if it doesn't do whatever the OP wants or doesn't want that NIRSoft program to do I thought it worth mentioning this useful program.

It comes in both portable and installed versions:-

https://www.kls-soft.com/wscc/downloads.php

https://www.youtube.com/watch?v=ed2yFM37qNg

 

Edited by WalksInSilence
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...