Portable Altap Salamander

Support for developers of new plugins, third-party plugin announcements and discussions.
User avatar
vld
Posts: 174
Joined: 06 Feb 2009, 21:21

Re: Portable Altap Salamander

Post by vld »

OK makes sense. I will start playing with standalone portables without the DLL and see if I notice any difference.
User avatar
Georgd
Posts: 101
Joined: 24 Jul 2006, 17:13

Off Topic: prog fro removing locks on files/folders

Post by Georgd »

vld wrote:
SelfMan wrote:Get Unlocker
I don't think that is a good solution. I can't see installing application on someone elses system that is not needed. I can always kill the file after a reboot. I'd like to avoid doing that if possible.
There is a tiny portable freeware program called finger weg (German, meaning "get your fingers off") showing you what is locking a file, offering to close down those locks, or even delete the file at next reboot. So far, it was very useful, stable and reliable. In several feature comparisions with other progs for the same purpose it turned out to have most features implemented.
Using Salamander since v 1.52
User avatar
Georgd
Posts: 101
Joined: 24 Jul 2006, 17:13

Re: Portable Altap Salamander

Post by Georgd »

vld wrote:I finally got the chance to play with this. Here's where I see there is a problem:

Code: Select all

rem Relative path to portable salamander directory (where portsal.reg and salamand.exe are). Do not add tailing \
set SalamanderPortableDir=.\PortableApps\SalamanderPortable
If you have to set the path in this file, you just cannot take the CMD file and drop it within the Salamander folder and make it a portable. What I do is carry Salamander with me on a thumbdrive and I may copy the folder to a desktop, D drive, or another location and then run it. If I have to have a variable, I need to edit the file each time. It really is not a universal CMD/application.
I also run salamander from my thumb drive, where I've all applications in <ThumbDrive>:\PortableApps and made available with GeekMenu (improved PortableApps-Menu). As I often just quickly want to compare & copy/move files, I don't want to load a full-blown GeekMenu but just start Salamander. That's why I've the CMD in <ThumbDrive>:\ The CMD I posted is configured to that use case. The directory variable shall allow to once change the source at only one point and being done, and the relative path shall make it portable, i.e. independant of installation path.
For your use case, with the CMD in the same directory as salamand.exe, just change the line to

Code: Select all

set SalamanderPortableDir=.\
and you shall be fine to start it on the stick as well as on a temporary PC. Does this work for you?
Using Salamander since v 1.52
User avatar
vld
Posts: 174
Joined: 06 Feb 2009, 21:21

Re: Portable Altap Salamander

Post by vld »

That did work, but I will have to play with it some more. I was just thinking, is there really a need for all the additional variables? What more does it give you from the original where it checks if the files are there and continues or aborts? I do like the idea of the command window displaying what is happening. Maybe it can display which "operation completed successfully".
User avatar
Georgd
Posts: 101
Joined: 24 Jul 2006, 17:13

Re: Portable Altap Salamander

Post by Georgd »

vld wrote:That did work [...] is there really a need for all the additional variables?
Fine :) The advantage is that you only need to change a path once (where the set command is) instead of all locations where the path is used => less work for each user to adapt the paths to his/her needs, lower risk to have inconsistent changes (e.g. having a typo in only one of all the occurrences of one path may break the whole script as it does not find its own stuff any more). It's a very common method in programming.
Using Salamander since v 1.52
User avatar
vld
Posts: 174
Joined: 06 Feb 2009, 21:21

Re: Portable Altap Salamander

Post by vld »

I've been using my portable version more and more on my thumbdrive. One thing I cannot figure out how to do is carry Apps within the Altap folder and expect them to work when I plug them into another system. Each time I plug them into a different PC, the drive letter may change and keep the apps working from the Menu bar. Can anything think of a solution?
User avatar
SvA
Posts: 483
Joined: 29 Mar 2006, 02:41
Location: DE

Re: Portable Altap Salamander

Post by SvA »

There are several approaches that come to mind immediately
  1. Set the PATH environment variable
  2. Use the Salamander Directory $(SalamDir) variable and store your programs relative to it (e.g. in a subfolder or peer folder)
  3. set an environment variable to the drive letter in the script and use it. You can set it like this from the script:
    SET THUMBDRIVE=%%~d0
    assuming you start the script from the thumb drive
Is there reason one or the other does not work for you?

I am not an active user of this script. I usually have some liberty on the machines I use Salamander on. I usually copy the installation folders to that machine, register a base configuration (reg) file which i customised to be mostly independent of absolute paths and moreover I register an entry to the App Paths registry key for salamand.exe with a path setting to a subdirectory of Salamander's path named tools where i keep some tools I frequently use. I run this script from the folder where salamand.exe is located, but with the portable script you can use the environment variable to find salamand.exe.

Here is the script

Code: Select all

for %%z in (salamand.ex?) do (
  reg ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\app paths\%%~nxz" /ve /t REG_SZ /d "%%~dpnxz"
  reg ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\app paths\%%~nxz" /v Path /t REG_SZ /d "%%~dpzTools"
)
(Note that there are two lines in the block to the for statment. Do not get confused by the line wrap in this forum's display)
Jeffin90620
Posts: 10
Joined: 20 Aug 2010, 20:14

Re: Portable Altap Salamander

Post by Jeffin90620 »

Georgd wrote:This is a really nice idea :) and very useful. I've worked through the code and made some changes that I wanna share with you; mainly it's improvements in avoiding and handling of errors. There are 2 TODOs that you might want to take care of :) And if you dislike to get status commands, be them pure information or errors, remove line 27 goto hide
Please excuse my ignorance as I haven't used scripts for a great long while.

I'm curious about the line
  • set SalamanderPortableDir=.\PortableApps\SalamanderPortable
[EDIT BEGIN]
In another thread (http://forum.altap.cz/viewtopic.php?f=4&t=4119&p=20502) where I asked about use on multiple computers, Jan said to copy the installed Altap Salamander directory to my flash drive.

Subsequent posts pointed me to this thread where I see all these scripts.

It seems that, for my application, the above script line should be changed to point to ".\Altap Salamander 2.5" (I copied it from Program Files without renaming it).

Once that is done, do I create a Shortcut pointing to the script and place it in the root directory of my flash drive?
[EDIT END]


Jeff
User avatar
Georgd
Posts: 101
Joined: 24 Jul 2006, 17:13

Re: Portable Altap Salamander

Post by Georgd »

Jeffin90620 wrote:I'm curious about the line
  • set SalamanderPortableDir=.\PortableApps\SalamanderPortable
It seems that, for my application, the above script line should be changed to point to ".\Altap Salamander 2.5" (I copied it from Program Files without renaming it).
Once that is done, do I create a Shortcut pointing to the script and place it in the root directory of my flash drive?
Hi Jeff, that seems to be correct if your script is in the directory that also contains the directory Altap Salamander 2.5. You could also place the script in the root dir of your flash device and change the path in the quoted line to pint to your directory, e.g. set SalamanderPortableDir=".\Jeff\Programs\Altap Salamander 2.5" (the " are required due to the spaces in the path name). Cheers Georg
Using Salamander since v 1.52
Eva Eden
Posts: 7
Joined: 13 Jan 2012, 09:24

Re: Portable Altap Salamander

Post by Eva Eden »

Hi there,

just an update of NoSpy...
Attachments
NoSpy.zip
(233.12 KiB) Downloaded 808 times
Post Reply