Page 1 of 1

Windows PowerShell Support

Posted: 17 Apr 2007, 12:09
by Martin Hapl
Hi,

It would be nice to have a chance to configure what kind of shell will be started after pressing Grey /. More specifically I'm using Windows PowerShell so I'l like to bring it up instead of standard Windows Shell.

Thanks,
Martin

Posted: 17 Apr 2007, 12:14
by Jan Rysavy

Re: Windows PowerShell Support

Posted: 03 Sep 2010, 02:30
by Dangph
I would like Powershell support too. I haven't used cmd.exe for a long time. Cmd.exe is obsolete as a shell as far as I'm concerned.

The other thread suggests changing the COMSPEC environment variable. I don't want to do that because I don't know if anything relies on it to point to cmd.exe.

Re: Windows PowerShell Support

Posted: 03 Sep 2010, 12:20
by th.
You could patch the salamand.exe file to read a different environment variable which points to powershell.exe.

Or you could use a command file like this to start AS with a modified COMSPEC only for that process:

Code: Select all

set comspec=powershell.exe
"C:\Program Files\Altap Salamander\salamand.exe"
Programs started from this AS instance would inherit that setting, of course.

Re: Windows PowerShell Support

Posted: 03 Sep 2010, 13:26
by Jan Rysavy
th. wrote:You could patch the salamand.exe file to read a different environment variable which points to powershell.exe.
This isn't a good idea. Salamander doesn't like patching...

Re: Windows PowerShell Support

Posted: 03 Sep 2010, 16:05
by Dangph
Thanks for the responses. I made a command in the User Menu. It works pretty well. Here are the settings:

Code: Select all

Command: C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe
Arguments:
Initial directory: $(FullPath)
Execute through shell: no
Click Change Icon to set the icon.

You have to set up the colors for the Powershell window that comes up. For some reason it is black and white. Click on the icon at the top-left of the Powershell window and copy the color settings values from a regular Powershell window.

Right-click on the command line at the bottom of the Salamander window and deselect it if you don't want it.

Re: Windows PowerShell Support

Posted: 03 Sep 2010, 17:40
by th.
Jan Rysavy wrote:
th. wrote:You could patch the salamand.exe file to read a different environment variable which points to powershell.exe.
This isn't a good idea. Salamander doesn't like patching...
Maybe AS doesn't like it :mrgreen: , but it is actually working this way.

Re: Windows PowerShell Support

Posted: 03 Sep 2010, 19:15
by Jan Rysavy
th. wrote:Maybe AS doesn't like it :mrgreen: , but it is actually working this way.
:lol:

Re: Windows PowerShell Support

Posted: 24 Sep 2010, 18:15
by oliiscool
Hi guys, I have a new way to launch Console2 (or your favorite shell) from Salamander. I have documented my findings on my blog at http://oliiscool.blogspot.com/2010/09/c ... ether.html but the short version is:
  1. Create Automation script (I used VBScript) that launches Console2:

    Code: Select all

    Set ShellApp = CreateObject("Shell.Application")
    ShellApp.ShellExecute "E:\Program Files (x86)\Altap Salamander 2.54\Console2\Console.exe", "-d """ & Salamander.SourcePanel.Path & """", ""
  2. Bind script to some unused key combination, say Alt+-
  3. Use AutoHotKey to intercept Numpad / to Alt+- when Salamander has focus:

    Code: Select all

    #IfWinActive,ahk_class SalamanderMainWindowVer25
    NumpadDiv::SendEvent !-
    RETURN
  4. You're done!

Re: Windows PowerShell Support

Posted: 09 Jun 2015, 17:47
by -=Majkl=-
I've found just some workarounds here...

Please add an option to select whether to run cmd.exe or powershell.exe after pressing numeric keyboard /