Running app in Powershell
-
I'm just guessing, but did you try a hyphen instead of the slash?
The difficult we do right away... ...the impossible takes slightly longer.
app doesn't recognize hyphens (I wrote the app, so that's how I know).
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013 -
I have an app that is in a folder, which is in the environment path. When i run the app, at the prompt like so, it runs fine.
> MyApp
If I add a commandline parameter to it, I get nothing:
> MyApp /msg:"test"
I know the command line parameter is valid, because it works when I run it in visual studio. I've also tried (none of these worked either):
> MyApp /msg:"test"
MyApp /msg:'test'
MyApp '/msg:"test"'
MyApp "/msg:""test"""I have next to zero knowledge regarding powershell. What am I doing wrong?
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013 -
I have just run a simple test and my app works fine:
PS C:\Users\rjmac\Documents\VSCode\C++> test /msg:"test"
argc = 2
argv[1] = /msg:test
C++ test result: 0
PS C:\Users\rjmac\Documents\VSCode\C++>I have to do this to get it to work: Start-Process PSMsgBox.exe -ArgumentList "/msg:""This is a test message"""
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013 -
I have to do this to get it to work: Start-Process PSMsgBox.exe -ArgumentList "/msg:""This is a test message"""
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013Interesting. I wonder if perhaps that colon after
msg
was the problem? Even though it worked in my test; which is very basic of course. [edit] There is a section in about_Special_Characters - PowerShell | Microsoft Docs[^] headed "Stop-parsing token", which may be of interest. [/edit] -
Interesting. I wonder if perhaps that colon after
msg
was the problem? Even though it worked in my test; which is very basic of course. [edit] There is a section in about_Special_Characters - PowerShell | Microsoft Docs[^] headed "Stop-parsing token", which may be of interest. [/edit]Richard MacCutchan wrote:
I wonder if perhaps that colon after
msg
was the problem? Even though it worked in my test; which is very basic of course.The colon isn't a special char. I even tried combinations of single/double quotes... :(
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013 -
Richard MacCutchan wrote:
I wonder if perhaps that colon after
msg
was the problem? Even though it worked in my test; which is very basic of course.The colon isn't a special char. I even tried combinations of single/double quotes... :(
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013 -
I have an app that is in a folder, which is in the environment path. When i run the app, at the prompt like so, it runs fine.
> MyApp
If I add a commandline parameter to it, I get nothing:
> MyApp /msg:"test"
I know the command line parameter is valid, because it works when I run it in visual studio. I've also tried (none of these worked either):
> MyApp /msg:"test"
MyApp /msg:'test'
MyApp '/msg:"test"'
MyApp "/msg:""test"""I have next to zero knowledge regarding powershell. What am I doing wrong?
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013 -
I'm just guessing, but did you try a hyphen instead of the slash?
The difficult we do right away... ...the impossible takes slightly longer.
Amazon Web Services (AWS) is a secure cloud services platform, offering compute power, database storage, content delivery and other functionality to help businesses scale and grow. In simple words AWS allows you to do the following things- Running web and application servers in the cloud to host dynamic websites. For click here to know more details AWS Training in Pune Amazon Web Services offers a broad set of global cloud-based products including compute, storage, databases, analytics, networking, mobile, developer tools, management tools, IoT, security and enterprise applications. These services help organizations move faster, lower IT costs, and scale.
-
app doesn't recognize hyphens (I wrote the app, so that's how I know).
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013 -
I have an app that is in a folder, which is in the environment path. When i run the app, at the prompt like so, it runs fine.
> MyApp
If I add a commandline parameter to it, I get nothing:
> MyApp /msg:"test"
I know the command line parameter is valid, because it works when I run it in visual studio. I've also tried (none of these worked either):
> MyApp /msg:"test"
MyApp /msg:'test'
MyApp '/msg:"test"'
MyApp "/msg:""test"""I have next to zero knowledge regarding powershell. What am I doing wrong?
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013