| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 718 人关注过本帖
标题:How to solve this PowerShell command error message?
只看楼主 加入收藏
vincent90152
Rank: 1
等 级:新手上路
帖 子:32
专家分:0
注 册:2007-7-24
收藏
 问题点数:0 回复次数:4 
How to solve this PowerShell command error message?

I'm trying to get PowerShell script to run a program. Here is the command line I need to run:

"\"C:\\Program Files\\PDF2allTest\\pdf2all\" -c pdf2jpg -s \"c:\\test\\test\\01.pdf\" -or 600"

I get the following error message. How to solve this?

System.Management.Automation.ParseException was unhandled
Message="You must provide a value expression on the right-hand side of the '-' operator."
Source="System.Management.Automation"
StackTrace:
at System.Management.Automation.Parser.addExpressionRule(Tokenizer tok)
at System.Management.Automation.Parser.comparisonExpressionRule(Tokenizer tok)
at System.Management.Automation.Parser.bitwiseExpressionRule(Tokenizer tok)
at System.Management.Automation.Parser.logicalExpressionRule(Tokenizer tok)
at System.Management.Automation.Parser.assignmentStatementRule(Tokenizer tok)
at System.Management.Automation.Parser.pipelineRule(Tokenizer tok)
at System.Management.Automation.Parser.statementRule(Tokenizer tok)
at System.Management.Automation.Parser.statementListRule(Tokenizer tok)
at System.Management.Automation.Parser.Parse(String input, Int32 cursorPosition)
at System.Management.Automation.AutomationEngine.Parse(String script, Boolean interactiveCommand)
at System.Management.Automation.ShellFunctionCommandProcessor..ctor(String script, ExecutionContext context, Boolean isFilter, Boolean useLocalScope, Boolean interactiveCommand)
at System.Management.Automation.Runspaces.Command.CreateCommandProcessor(ExecutionContext executionContext, CommandFactory commandFactory, Boolean addToHistory)
at System.Management.Automation.Runspaces.LocalPipeline.CreatePipelineProcessor()
at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()
at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()

搜索更多相关主题的帖子: message command How PowerShell 
2007-07-31 11:54
立志成佛
Rank: 1
等 级:新手上路
威 望:2
帖 子:314
专家分:0
注 册:2006-11-1
收藏
得分:0 
You must provide a value expression on the right-hand side of the '-' operator.

参数跟错了吧

曾经的曾经已不在
2007-07-31 12:39
vincent90152
Rank: 1
等 级:新手上路
帖 子:32
专家分:0
注 册:2007-7-24
收藏
得分:0 
回复:(vincent90152)How to solve this PowerShell...

The command can be execute correctly in the “command prompt”. The original command is below.

"C:\Program Files\PDF2allTest\pdf2all" -c pdf2jpg -s "c:\test\test\01.pdf" -or 600

2007-07-31 16:05
立志成佛
Rank: 1
等 级:新手上路
威 望:2
帖 子:314
专家分:0
注 册:2006-11-1
收藏
得分:0 
Helpless

曾经的曾经已不在
2007-07-31 16:35
vincent90152
Rank: 1
等 级:新手上路
帖 子:32
专家分:0
注 册:2007-7-24
收藏
得分:0 
回复:(立志成佛)Helpless[em03]
Thank you very much.
You are so kind.
2007-07-31 16:50
快速回复:How to solve this PowerShell command error message?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016030 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved