PowerShell integration?

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

Post Reply
Microp
New Member
Posts: 2
Joined: 2010 May 10, 09:57

PowerShell integration?

Post by Microp »

Hi!

It would be nice to get PowerShell integrated into xplorer2.

Or at least a hack to replace default Tools/run command or DOS command,  so it starts powershell instead.

It's a great tool.
User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

Please make your case in terms of improved user productivity for file management functionality.  
"It would be nice ..." arguments have little weight with the developer.
__________________________________________________________________
PS -
Have you tried making a user command (Customize | User commands | ...) for PowerShell and running it that way?
User avatar
nikos
Site Admin
Site Admin
Posts: 15808
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

i'm not sure about the workings of powershell but if it works from a console you can try adding its command in szDosCmdPreamble registry key
Mr.Pleasant
Silver Member
Silver Member
Posts: 281
Joined: 2006 Dec 29, 12:56
Location: Utrecht, NL

Post by Mr.Pleasant »

you can try adding its command in szDosCmdPreamble registry key
That could be interesting. Could you maybe elaborate on that? Would it be just replacing the default 'cmd.exe /K' with 'powershell.exe' (which, in a run command, brings up the window for powershell in much the same way as 'cmd.exe' does for the command window)? In that case, it doesn't work: it makes all '$ ...' commands ineffable.

Oh, and what did I screw up when (trying to reset it all in the registry) I end up with an empty cmd window always accompanying the X2 console when I type a '$' command in the address bar :oops: ? When I close this cmd window, it relentlessly closes X2... :(
User avatar
FrizzleFry
Platinum Member
Platinum Member
Posts: 1241
Joined: 2005 Oct 16, 19:09

Post by FrizzleFry »

It works for me... I used:

powershell.exe -NoExit

in szDosCmdPreamble

The -NoExit just prevents the console window from closing just like /K with cmd.exe. The original preamble had a space after the /K so you might need to add that.

I prefer just having a toolbar button with:

>powershell
User avatar
nikos
Site Admin
Site Admin
Posts: 15808
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

did you manage to integrate powershell with the fancy command line window used by xplorer2?
Mr.Pleasant
Silver Member
Silver Member
Posts: 281
Joined: 2006 Dec 29, 12:56
Location: Utrecht, NL

Post by Mr.Pleasant »

Thanks, FrizzleFry, I'll try it, as soon as I have my registry-settings sorted out. Then I can see if it is worth having it that way, or just to have a button like you (I'm new to this anyway...).
User avatar
FrizzleFry
Platinum Member
Platinum Member
Posts: 1241
Joined: 2005 Oct 16, 19:09

Post by FrizzleFry »

The x2 command line window seems to work fine with powershell. I ran a few commands... dir, cd, help... and I did not notice any problems. I don't usually use the x2 console but it looked and acted the same way it does with cmd.
Post Reply