Windows PowerShell Support

We welcome any suggestions for new features or improvements in Altap Salamander. Please post one suggestion per report.
Martin Hapl

Windows PowerShell Support

Post by Martin Hapl » 17 Apr 2007, 12:09

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

Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5117
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Post by Jan Rysavy » 17 Apr 2007, 12:14


Dangph
Posts: 5
Joined: 03 Sep 2010, 02:17

Re: Windows PowerShell Support

Post by Dangph » 03 Sep 2010, 02:30

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.

User avatar
th.
Posts: 115
Joined: 04 Sep 2006, 23:09
Location: Germany
Contact:

Re: Windows PowerShell Support

Post by th. » 03 Sep 2010, 12:20

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.

Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5117
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Re: Windows PowerShell Support

Post by Jan Rysavy » 03 Sep 2010, 13:26

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...

Dangph
Posts: 5
Joined: 03 Sep 2010, 02:17

Re: Windows PowerShell Support

Post by Dangph » 03 Sep 2010, 16:05

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.

User avatar
th.
Posts: 115
Joined: 04 Sep 2006, 23:09
Location: Germany
Contact:

Re: Windows PowerShell Support

Post by th. » 03 Sep 2010, 17:40

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.

Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5117
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Re: Windows PowerShell Support

Post by Jan Rysavy » 03 Sep 2010, 19:15

th. wrote:Maybe AS doesn't like it :mrgreen: , but it is actually working this way.
:lol:

oliiscool
Posts: 2
Joined: 24 Sep 2010, 18:05

Re: Windows PowerShell Support

Post by oliiscool » 24 Sep 2010, 18:15

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!

-=Majkl=-
Posts: 65
Joined: 12 Dec 2005, 14:51
Location: Brno, Czech Republic
Contact:

Re: Windows PowerShell Support

Post by -=Majkl=- » 09 Jun 2015, 17:47

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 /

Post Reply