windows - 当我使用动态 args powershell trim 命令输出运行 exe 时。怎么修?
问题描述
我有脚本通过 &
例如运行一些命令
$output = & rc.exe /d N_MAJOR=1 /d N_MINOR=0 /d N_PATCH=0 version.rc
$output
变量包含修剪的命令输出,例如
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation. All rights reserved.
d:\tfs\
但它必须包含
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation. All rights reserved.
d:\tfs\...\version.rc(1) : error RC2135 : file not found: xx.ico
怎么了?
解决方案
推荐阅读
- javascript - 如何在 JavaScript 中读取文件夹中的 txt 文件列表?
- java - Maven编译打包后不会将其他类编译成jar
- php - 合并具有相同值的数组
- linux - 1 线程 vs 5 线程用于分布式系统通信?
- azure - 具有特定端点 (DNS) 的 Kubernetes 服务发现
- c# - 使用 StreamReader 跳过行
- r - 确定用于生成 lm() 模型的数据集
- python - 使用 Django/Python 阅读 Shopify 商店元字段:AJAX 调用和后端视图行为之间的差异
- pdf - MVC 打印 PDF 而不在打印对话框中显示
- mongodb - MongoDB 聚合显示没有结果