Custom command line interpreter
Custom command line interpreter
This falls in between a bug and wish
1. The custom command line interpreter doesn't work with shortnames. If I type powershell in Windows Run dialog it works, but in the text box, this doesn't work and we need to give the full path
2. There are two versions (x86 and x64) for PowerShell. I tried giving both paths, but it always open the 32 bit version if I enter ! in the address bar. If I navigate to the directory and launch them, the correct versions are launched.
The show real system32 checkbox is ticked.
1. The custom command line interpreter doesn't work with shortnames. If I type powershell in Windows Run dialog it works, but in the text box, this doesn't work and we need to give the full path
2. There are two versions (x86 and x64) for PowerShell. I tried giving both paths, but it always open the 32 bit version if I enter ! in the address bar. If I navigate to the directory and launch them, the correct versions are launched.
The show real system32 checkbox is ticked.
Re: Custom command line interpreter
1. Confirmed, it doesn't work here either.
2. Maybe confirmed...
I get 32-bit using any of these:
2. Maybe confirmed...
I get 32-bit using any of these:
- %winsysdir%\WindowsPowerShell\v1.0\powershell.exe
- C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
- C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe
- %winsysnative%\WindowsPowerShell\v1.0\powershell.exe
- C:\Windows\SysNative\WindowsPowerShell\v1.0\powershell.exe
Re: Custom command line interpreter
Thanks. %winsysnative%\WindowsPowerShell\v1.0\powershell.exe opens 64 bit. I hadn't tried this %winsysnative% earlier.
Re: Custom command line interpreter
Doesn't work. Powershell launches and disappears. I couldn't get the error message, but I tried replacing powershell with notepad
It gives me the below error.
It gives me the below error.
The /k switch is causing the issue it seems and hence I tried to launch powershell with /k form command prompt and it gave me the below error.---------------------------
Notepad
---------------------------
Cannot find the /k .txt file.
Do you want to create a new file?
---------------------------
Yes No Cancel
---------------------------
/k : The term '/k' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ /k
+ ~~
+ CategoryInfo : ObjectNotFound: (/k:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
-
- Site Admin
- Posts: 60288
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Custom command line interpreter
Don't know which syntax is needed. At least it's called now. So I think my part is done.
FAQ | XY News RSS | XY Twitter
Re: Custom command line interpreter
The syntax without the /k
Re: Custom command line interpreter
Sure looks like you add '/c' for !! and '/k' for ! if the arguments field is left blank.admin wrote:I did not do any /k.
We can work around this though by setting that field to '<command>'.
This does make me wonder if we need separate argument fields for '!' vs '!!'?
Re: Custom command line interpreter
Ok, I tried following four commands and third and fourth one works
!pause
!ls;pause
!!pause
!!ls;pause
BTW, this opens 32 bit powershell and don't think Don would be able to control that. I shall stick to %winsysnative%\WindowsPowerShell\v1.0\powershell.exe
!pause
!ls;pause
!!pause
!!ls;pause
BTW, this opens 32 bit powershell and don't think Don would be able to control that. I shall stick to %winsysnative%\WindowsPowerShell\v1.0\powershell.exe
Last edited by nerdweed on 14 Jan 2016 20:22, edited 1 time in total.
-
- Site Admin
- Posts: 60288
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Custom command line interpreter
1. Ups, right. Will fix.
2. No time for this now.
2. No time for this now.
FAQ | XY News RSS | XY Twitter
-
- Site Admin
- Posts: 60288
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Custom command line interpreter
All four will work in next ver.nerdweed wrote:Ok, I tried following four commands and third and fourth one works
!pause
!ls;pause
!!pause
!!ls;pause
BTW, this opens 32 bit powershell and don't think Don would be able to control that. I shall stick to %winsysnative%\WindowsPowerShell\v1.0\powershell.exe
Yes, 32 bit powershell is called when you just pass "powershell".
FAQ | XY News RSS | XY Twitter
Re: Custom command line interpreter
Not really liking 16.10.0308...
I was using:
Exe: 'C:\Windows\SysNative\cmd.exe'
Args: ''
Which gave me the native cmd instead of the 32-bit one and worked correctly for ! and !! (presumably a stroke of luck though).
Now both ! and !! just open a command prompt but do not execute the command.
To get that to work I have to start Args or my command with either '/c' or '/k' which means I cannot take advantage of having both ! and !! work differently.
Meanwhile using:
Exe: 'powershell'
Args: ''
Both ! and !! behave the same and end the shell right after the command. Like above we need to make use of additional arguments such as '-NoExit'.
That said, it does look like the behavior is now correct and logical, but I think I'll missing having ! and !! work differently.
I know you say no time for that now (at least I think that's what you meant by #2), but here's hoping you find the time sooner rather than later.
Until then I suppose I'll be trying to train myself to instead use @! and @!!.
I was using:
Exe: 'C:\Windows\SysNative\cmd.exe'
Args: ''
Which gave me the native cmd instead of the 32-bit one and worked correctly for ! and !! (presumably a stroke of luck though).
Now both ! and !! just open a command prompt but do not execute the command.
To get that to work I have to start Args or my command with either '/c' or '/k' which means I cannot take advantage of having both ! and !! work differently.
Meanwhile using:
Exe: 'powershell'
Args: ''
Both ! and !! behave the same and end the shell right after the command. Like above we need to make use of additional arguments such as '-NoExit'.
That said, it does look like the behavior is now correct and logical, but I think I'll missing having ! and !! work differently.
I know you say no time for that now (at least I think that's what you meant by #2), but here's hoping you find the time sooner rather than later.
Until then I suppose I'll be trying to train myself to instead use @! and @!!.
-
- Site Admin
- Posts: 60288
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Custom command line interpreter
I will re-add /k and /c for cmd.exe. That should do, right?
FAQ | XY News RSS | XY Twitter
Re: Custom command line interpreter
In 309
With shortname
! and !! don't seem to do anything
!ls and !!ls - do a directory listing and exit
With the longname, %winsysnative%\WindowsPowerShell\v1.0\powershell.exe
!, !!, !ls and !!ls all behave the same. - They just open a window
This is breaking a lot of things.
Probably, that /c and /k is required for all full paths. And short paths don't need /k
With shortname
! and !! don't seem to do anything
!ls and !!ls - do a directory listing and exit
With the longname, %winsysnative%\WindowsPowerShell\v1.0\powershell.exe
!, !!, !ls and !!ls all behave the same. - They just open a window
This is breaking a lot of things.
Probably, that /c and /k is required for all full paths. And short paths don't need /k