[WFX] VirtualPanel: Temporary panel for TC

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: sheep, Hacker, Stefan2, white

Post Reply
User avatar
MVV
Power Member
Power Member
Posts: 8395
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV » 2017-03-20, 18:01 UTC

Nice to hear that!

BTW I've also found why your command doesn't work w/o a backslash: because of a space at the end of path. These both work:

Code: Select all

<add /f >myShare { <exec cd \\localhost\Share<<shell32.DLL,81 }

Code: Select all

<add /f >myShare { <exec cd "\\localhost\Share" <<shell32.DLL,81 }
Perhaps I'll add space trimming for cd command when path is not quoted.

amilino
Junior Member
Junior Member
Posts: 53
Joined: 2015-02-23, 23:47 UTC
Location: Germany

Post by *amilino » 2017-03-25, 23:24 UTC

Is it possible to execute a program, something like this:

Code: Select all

<add >Putty { <exec ""%COMMANDER_PATH%\TOOLS\Putty\putty.exe" -ssh 192.168.192.201"<<WCMICON2.DLL,53 }
Normally this command would open a putty ssh terminal:

Code: Select all

"%COMMANDER_PATH%\TOOLS\Putty\putty.exe" -ssh 192.168.192.201

User avatar
MVV
Power Member
Power Member
Posts: 8395
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV » 2017-03-26, 21:01 UTC

You should either add putty.exe to VP and execute it, or add Exec.exe or Exec64.exe (from VP installation folder) and start physical applications through it, e.g (if Exec.exe is added as \Bin\Exec.exe):

Code: Select all

<add >Putty { <exec \Bin\Exec.exe "%COMMANDER_PATH%\TOOLS\Putty\putty.exe" -ssh 192.168.192.201<<WCMICON2.DLL,53 }

amilino
Junior Member
Junior Member
Posts: 53
Joined: 2015-02-23, 23:47 UTC
Location: Germany

Post by *amilino » 2017-03-26, 22:10 UTC

I don't need to specify path for Exec.exe if it is already located in VP folder? Something like this should work:

Code: Select all

<add >Putty { <exec Exec.exe "%COMMANDER_PATH%\TOOLS\Putty\putty.exe" -ssh 192.168.192.201<<WCMICON2.DLL,53 }
or I am missing something, because it is not executed.

User avatar
MVV
Power Member
Power Member
Posts: 8395
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV » 2017-03-27, 07:19 UTC

Works for me:

Code: Select all

<add ">Edit wincmd.ini" {<exec Exec.exe notepad.exe "%COMMANDER_INI%"<<WCMICON2.DLL,53}
When I add this script in \Bin folder where Exec.exe is located.

amilino
Junior Member
Junior Member
Posts: 53
Joined: 2015-02-23, 23:47 UTC
Location: Germany

Post by *amilino » 2017-03-27, 07:59 UTC

How can I add this script in Bin folder, what is the extension of script and how to call it?

User avatar
MVV
Power Member
Power Member
Posts: 8395
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV » 2017-03-27, 09:25 UTC

You should just add Exec.exe from VP physical installation dir to \Bin VP dir via regular copying, it is not a script, it is a link to physical executable.

amilino
Junior Member
Junior Member
Posts: 53
Joined: 2015-02-23, 23:47 UTC
Location: Germany

Post by *amilino » 2017-03-27, 09:51 UTC

MVV wrote:You should just add Exec.exe from VP physical installation dir to \Bin VP dir via regular copying, it is not a script, it is a link to physical executable.
I don't understand sorry, why did you made all this so complicated?

This is what I have copied:

Code: Select all

TotalCommander\PLUG-INS\wfx\VirtualPanel\Bin\Exec.exe
and this is what I added:

Code: Select all

<add ">Edit wincmd.ini" {<exec Exec.exe notepad.exe "%COMMANDER_INI%"<<WCMICON2.DLL,53}
and when i double click on created "virtual" file nothing happen.

User avatar
MVV
Power Member
Power Member
Posts: 8395
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV » 2017-03-27, 10:31 UTC

I don't understand sorry, why did you made all this so complicated?
You can only execute files within virtual file system using <exec. So, if you want to start some program that is not added to VP, you can only do it via programs that added to VP. Exec.exe is a special tool that only executes command line, so it allows starting any external programs from VP. Just add it to VP once and use - is it so complicated?
and when i double click on created "virtual" file nothing happen
Do you created both items in the same dir? If you start something via <exec w/o path, that something have to be in same dir with script...

amilino
Junior Member
Junior Member
Posts: 53
Joined: 2015-02-23, 23:47 UTC
Location: Germany

Post by *amilino » 2017-03-27, 10:36 UTC

So, notepad.exe must me located in VP folder?

I also tried with putty.exe located in my VP folder, with this script:

Code: Select all

<add >Putty { <exec Exec.exe putty.exe<<WCMICON2.DLL,53 }
Can I somehow debug this? If I execute this "Exec.exe putty.exe" under the VP folder it does work perfectly, but with script no luck.

User avatar
nsp
Power Member
Power Member
Posts: 1218
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp » 2017-03-27, 13:50 UTC

amilino wrote:So, notepad.exe must me located in VP folder?

I also tried with putty.exe located in my VP folder, with this script:

Code: Select all

<add >Putty { <exec Exec.exe putty.exe<<WCMICON2.DLL,53 }
Can I somehow debug this? If I execute this "Exec.exe putty.exe" under the VP folder it does work perfectly, but with script no luck.
A) copy Exec.exe from the installation forlder of VirtualPanel into the Virtual Panel as \Exec.exe
B) add your script like : <add >Putty { <exec /Exec.exe putty.exe<<WCMICON2.DLL,53 }

You can also copy all your tools into a tools folder and execute them directly.

amilino
Junior Member
Junior Member
Posts: 53
Joined: 2015-02-23, 23:47 UTC
Location: Germany

Post by *amilino » 2017-03-27, 14:09 UTC

Ok first solution is working, tested, I didn't realized that I have to copy exec.exe in Virtual panel not in installation folder of VP.
You can also copy all your tools into a tools folder and execute them directly.
I am just curious about this second option with direct execution, how to actually achieve that? Is it something like this:

Code: Select all

<add >Putty { <exec %COMMANDER_PATH%\TOOLS\Putty\Exec.exe %COMMANDER_PATH%\TOOLS\Putty\putty.exe<<WCMICON2.DLL,53 }
Last edited by amilino on 2017-03-27, 16:02 UTC, edited 1 time in total.

amilino
Junior Member
Junior Member
Posts: 53
Joined: 2015-02-23, 23:47 UTC
Location: Germany

Post by *amilino » 2017-03-27, 15:11 UTC

This is how fare I manage to end up with:

Code: Select all

<add >Putty { <exec "\Bin\Exec.exe" "%COMMANDER_PATH%\TOOLS\Putty\putty.exe" -ssh 192.168.192.201<<WCMICON2.DLL,53 }
It would be good to use exec.exe directly from VP installation folder, but this is also a good solution to copy it in Bin folder for an example inside Virtual panel. Thank you all for the great feedback.

User avatar
nsp
Power Member
Power Member
Posts: 1218
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp » 2017-03-27, 15:43 UTC

amilino wrote:Ok first solution is working, tested, I didn't realized that I have to copy exec.exe in Virtual panel not in installation folder of VP.
You can also copy all your tools into a tools folder and execute them directly.
I am just queries about this second option with direct execution, how to actually achieve that? Is it something like this:

Code: Select all

<add >Putty { <exec %COMMANDER_PATH%\TOOLS\Putty\Exec.exe %COMMANDER_PATH%\TOOLS\Putty\putty.exe<<WCMICON2.DLL,53 }
Exec.exe allows you to run any executable on the path.
What i do is to copy from real path inside a virtual folder called tools some pgms. I reuse in VP scripts or launch directly from this tools folder.
I have pspad, askparam, exec, tfind, tcbl, cmd, popershell ......
To reuse it in a VP script <exec /Tools/<MyTools> Params....

amilino
Junior Member
Junior Member
Posts: 53
Joined: 2015-02-23, 23:47 UTC
Location: Germany

Post by *amilino » 2017-03-27, 16:11 UTC

Exec.exe allows you to run any executable on the path.
What i do is to copy from real path inside a virtual folder called tools some pgms. I reuse in VP scripts or launch directly from this tools folder.
I have pspad, askparam, exec, tfind, tcbl, cmd, popershell ......
To reuse it in a VP script <exec /Tools/<MyTools> Params....
I understand but if I use it directly (without copy of Exec.exe in Virtual panel) it doesn't work, I tried this:

Code: Select all

<add >"Putty" { <exec "/Tools/Exec.exe" "/Tools/putty.exe"<<imageres.DLL,249 }
or

Code: Select all

<add >"Putty" { <exec "/Tools/putty.exe"<<imageres.DLL,249 }
Of course I copied Exec.exe and putty.exe in Tools folder inside root of VP folder. The thing is that you cannot use it outside of Virtual panel folder i.e. VP folder under TotalCommander/plugins/wfx/VirtualPanel location.

Post Reply