将VBScript语句转换为VB.Net [英] Convert VBScript statement to VB.Net

查看:88
本文介绍了将VBScript语句转换为VB.Net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨。


我在vb.net或vbscript都没有完成,但最近一直在欺骗他们。我有一个vb.net GUI,调用2个vbscripts,我想把它减少到一个(我的技能水平不是这样我甚至可以尝试将大的转换为vb.net)。


2个vbscripts中较小的一个只是通过运行命令行语句来调用较大的一个。我想知道是否有人可以帮助我开始将其发送到vb.net。这是声明...

Hi.

I''m neither accomplished at vb.net or vbscript, but have been fooling with both of them as of late. I have a vb.net GUI that calls 2 vbscripts, and I would like to cut it down to just one (my skill level is not such that I could even attempt to convert the big one to vb.net).

The smaller of the 2 vbscripts just calls the larger one by running a command line statement. I wonder if someone can help me get started in getting this to vb.net. Here is the statement...

展开 | 选择 | Wrap | 行号

推荐答案

嗯...我做了一些进展。


我使用了Dim oShell = CreateObject(" WScript.Shell"),然后离开了If语句和WScript.Quit。剩下的工作,除了...


& " > DNLD.csv"不起作用。它只是将结果打印到cmd窗口。


那么如何将结果发送到DNLD.csv?


谢谢,

Brad
Well... I made some progress.

I used Dim oShell = CreateObject("WScript.Shell"), and then left off the If statement and the WScript.Quit. The rest of it works, except...

The & " >DNLD.csv" does not work. It is just printing results to the cmd window.

So how do I send the results to the DNLD.csv?

Thanks,
Brad


在我看来你应该在DNLD.csv前面指定一个驱动器和/或目录(例如: C:\ TestTolder \\ \\DNLD.csv 的)。我也知道你说你不是很精通VBS和VB.NET,但你可以在VBScript中做任何事情,你可以在VB.NET中做。因此,值得花时间进行研究,并在VB.NET中只创建一个程序来执行VBScripts所做的事情,而不是从VB.NET程序中调用脚本。请随意发布您想要的任意数量的问题(作为新问题,而不是在此主题中)并且我非常乐意提供帮助。
Looks to me like you should specify a drive and/or directory in front of DNLD.csv (example: C:\TestFolder\DNLD.csv). I also know that you state you aren''t very proficient in neither VBS nor VB.NET, but anything that you can do in a VBScript, you can do in VB.NET. So, it''s worth your time doing the research and creating only one program in VB.NET to carry out what the VBScripts do, rather than calling scripts from a VB.NET program. Please feel free to post as many questions as you''d like (as new questions, not in this thread) and I''d be more than happy to help.


感谢您的洞察力。这是我试过的......

Thanks for the insight. Here is what I tried...

展开 | 选择 | Wrap | 行号


这篇关于将VBScript语句转换为VB.Net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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