echo中的错误>在cmd中为vbscript ... [英] Error in echo > in cmd for vbscript...

查看:88
本文介绍了echo中的错误>在cmd中为vbscript ...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我有一个问题...



在我的代码中我回应到一个vbscript文件但在echo中我保存输出...我怎么能解决它所以回复整个事情?



Hello all i have a problem...

in my code i echo into a vbscript file but inside the echo i save output... how can i fix it so it echos the whole thing?

echo If intAnswer = vbYes Then   >>C:\users\%username%\appdata\roaming\box.bat.vbs  
echo Set oShell = WScript.CreateObject("WSCript.shell") >>C:\users\%username%\appdata\roaming\box.bat.vbs
echo oShell.run "cmd echo dont delete>C:\users\%username%\appdata\roaming\box.yes.syst" >>C:\users\%username%\appdata\roaming\box.bat.vbs







你会看到




You see on the line

echo oShell.run "cmd echo dont delete>C:\users\%username%\appdata\roaming\box.yes.syst" >>C:\users\%username%\appdata\roaming\box.bat.vbs



它回声不要删除int o文件C:\users ... \ box.yes.vbs并没有回显整个事情。有没有办法把整个东西放进去?顺便说一句,我只有一台笔记本电脑,所以我无法访问num键快捷键...除非我从这里复制它。万分感谢! -LUKAKA


it echos the dont delete into the file C:\users...\box.yes.vbs and it does not echo the whole thing. is there a way to put the whole thing in? by the way i only have a laptop so i do not have access to the num key shortcuts... unless i copy it from here. thanks a ton! -LUKAKA

推荐答案

引用:

大家好我有问题...

Hello all i have a problem...

问题出在你脑海里!

当你在不知道它做什么的情况下使用推荐时,这就是附加的东西。

说不然,你的程序运行正常,你只是不知道你问的是什么。



建议/解决方案:

- 阅读关于 Echo <的参考文献/ code>



更常见的是,在使用之前阅读有关您使用的任何命令/功能的文档。这样可以避免像你这样问愚蠢的问题。



没有对你所要求的完美工作的程序进行修正。唯一的问题是你不知道你要求的是什么。



[更新]

你需要阅读有关逃避字符的文档回声。

为了说清楚,你应该用另一种方式提出你的问题。

我有这个代码

代码

生成这个

错误的结果

我需要

合适的结果



这应该已经明确了每个人的问题。

The problem is in your head !
That's what append when you use a commend without knowing what it does.
Said otherwise, your program works perfectly, you just don't know what you asked.

Advice/solution:
-Read reference documentation about Echo

more generally, read documentation about any command /function you use, before using it. This will avoid asking stupid question like yours.

There is no correction to a program that works perfectly as you requested. The only problem is that you don't know what you requested.

[Update]
You need to read documentation about escaping chars in echo.
To make things clear, you should have presented your question in another way.
I have this code
CODE
which produce this
WRONG RESULT
And I need
RIGHT RESULT

That should have made clear what is the problem for every one.


这篇关于echo中的错误&gt;在cmd中为vbscript ...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆