Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

Can't run external app from command line

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 05-03-2007   #1 (permalink)
Flomo Togba Kwele
Guest


 

Can't run external app from command line

I can run this command successfully from the DOS command:

flashfxp.exe -download POWDB -remotepath="test.ps1"

However, when I try to run this from the Powershell prompt,
../flashfxp.exe -download POWDB -remotepath="test.ps1"

I get the continuation prompt on the next line. If I remove the double-quotes
from the last parm, the app sees the 2nd and 3rd parms as a single parm and
fails. If I substitute the double with single quotes, I still get the
continuation line.

What am I missing here? Thanks Flomo
--


My System SpecsSystem Spec
Old 05-03-2007   #2 (permalink)
Brandon Shell
Guest


 

Re: Can't run external app from command line

Have you tried ./flashfxp.exe "-download POWDB -remotepath='test.ps1'"

"Flomo Togba Kwele" <Flomo@community.nospam> wrote in message
news:Tu6dnfP7GNG11afbnZ2dnUVZ_rGinZ2d@giganews.com...
>I can run this command successfully from the DOS command:
>
> flashfxp.exe -download POWDB -remotepath="test.ps1"
>
> However, when I try to run this from the Powershell prompt,
> ./flashfxp.exe -download POWDB -remotepath="test.ps1"
>
> I get the continuation prompt on the next line. If I remove the
> double-quotes
> from the last parm, the app sees the 2nd and 3rd parms as a single parm
> and
> fails. If I substitute the double with single quotes, I still get the
> continuation line.
>
> What am I missing here? Thanks Flomo
> --
>


My System SpecsSystem Spec
Old 05-03-2007   #3 (permalink)
Gerd Schneider
Guest


 

RE: Can't run external app from command line

Really funny. I have a version that should work

flashfxp.exe -download POWDB '-remotepath="test.ps1"'

but I can't tell why your version fails. I've played around a little bit
with your commandline and found out that the misbehavior is bound to both the
- in front of remotepath and the . within the quotes.

This type of commandline always fails
any.exe -x="."
but I'm not aware of any syntactical rules that may cause this behavior. As
long as nobody can explain that, I would rate it as a bug.

Gerd


"Flomo Togba Kwele" wrote:

> I can run this command successfully from the DOS command:
>
> flashfxp.exe -download POWDB -remotepath="test.ps1"
>
> However, when I try to run this from the Powershell prompt,
> ../flashfxp.exe -download POWDB -remotepath="test.ps1"
>
> I get the continuation prompt on the next line. If I remove the double-quotes
> from the last parm, the app sees the 2nd and 3rd parms as a single parm and
> fails. If I substitute the double with single quotes, I still get the
> continuation line.
>
> What am I missing here? Thanks Flomo
> --
>
>

My System SpecsSystem Spec
Old 05-03-2007   #4 (permalink)
Flomo Togba Kwele
Guest


 

Re: Can't run external app from command line

Thanks to you both for your ideas. Brandon, when I try to embed all the
arguments in double-quotes and the last argument in single-quotes, the app sees
it as a single parameter and fails.

Gerd, when I tried your suggestion, the app said it "Cannot open file".

It sure would be nice to see what data Powershell is supplying to the app. I
can't get this information from FlashFxp.

Flomo

My System SpecsSystem Spec
Old 05-03-2007   #5 (permalink)
Keith Hill [MVP]
Guest


 

Re: Can't run external app from command line

"Flomo Togba Kwele" <Flomo@community.nospam> wrote in message
news:Tu6dnfP7GNG11afbnZ2dnUVZ_rGinZ2d@giganews.com...
>I can run this command successfully from the DOS command:
>
> flashfxp.exe -download POWDB -remotepath="test.ps1"
>
> However, when I try to run this from the Powershell prompt,
> ./flashfxp.exe -download POWDB -remotepath="test.ps1"
>
> I get the continuation prompt on the next line. If I remove the
> double-quotes
> from the last parm, the app sees the 2nd and 3rd parms as a single parm
> and
> fails. If I substitute the double with single quotes, I still get the
> continuation line.
>
> What am I missing here? Thanks Flomo


I think this might work (subsitute flasfxp for echoargs):

280# echoargs.exe -download POWDB '-remotepath=\"test.ps1\"'
Arg 0 is "-download"
Arg 1 is "POWDB"
Arg 2 is "-remotepath="test.ps1""

Note that echoargs.exe comes with PSCX 1.1:

http://www.codeplex.com/powershellcx

--
Keith


My System SpecsSystem Spec
Old 05-03-2007   #6 (permalink)
Flomo Togba Kwele
Guest


 

Re: Can't run external app from command line

Keith,

Thanks for the tip about pscx and echoargs - exactly what I asked for.

I ran per you suggestion, and it got further than before. But now it needs an
output spec. Here is my attempt:

32# echoargs.exe -download POWDB '-remotepath=\"test.ps1\"'
'-localpath=\"c:\temp\test.ps1\"'
Arg 0 is "-download"
Arg 1 is "POWDB"
Arg 2 is "-remotepath="test.ps1""
Arg 3 is "-localpath="c:\temp\test.ps1""

When I do the transfer through the GUI app, it splits the transfer into Source
and Target.
Source-Name = test.ps1
Source-Path = g:/Backup/
Target-Name = test.ps1
Target-Path = C:\TEMP\
The transfer works just fine.

When I do it with the commmandline as the echoargs above:
Source-Name = " #(That's a double-quote)
Source-Path = \"test.ps1\
Target-Name = "
Target-Path = \"c:\temp\test.ps1\

What echoargs sees doesn't translate too well with what the app sees.

My System SpecsSystem Spec
Old 05-03-2007   #7 (permalink)
Keith Hill [MVP]
Guest


 

Re: Can't run external app from command line

"Flomo Togba Kwele" <Flomo@community.nospam> wrote in message
news:i_Gdnck7PJmZFqfbnZ2dnUVZ_veinZ2d@giganews.com...
> What echoargs sees doesn't translate too well with what the app sees.
>


What happens if you try it without the \" around the paths?

--
Keith


My System SpecsSystem Spec
Old 05-03-2007   #8 (permalink)
Flomo Togba Kwele
Guest


 

Re: Can't run external app from command line

Keith,

That did it! Thanks so much for all your help.

Flomo

37# echoargs.exe -download POWDB '-remotepath="test.ps1"'
'-localpath="c:temp\test.ps1"'
Arg 0 is "-download"
Arg 1 is "POWDB"
Arg 2 is "-remotepath=test.ps1"
Arg 3 is "-localpath=c:temp\test.ps1"

My System SpecsSystem Spec
Closed Thread
Update your Vista Drivers Update Your Drivers Now!!

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Line Ren (Rename) command broken? SixSigmaGuy Vista General 5 05-20-2008 05:52 AM
XP command line Qfreed Vista networking & sharing 2 08-25-2007 09:31 AM
Elevation from Command Line? Puppy Breath Vista account administration 4 03-07-2007 08:35 PM
Help: command line with no UAC interferance? =?Utf-8?B?c2VucmFiZGV0?= Vista General 10 08-31-2006 05:19 PM
Command Line Input? Singee PowerShell 1 05-31-2006 09:46 AM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51