VBA中的Shell(WSL)

时间:2016-11-30 22:43:39

标签: vba windows-subsystem-for-linux

我尝试在VBA中的windows子系统linux中执行Bash中的一些命令。

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ScrollWave
{
    public partial class Form1 : Form
    {
        readonly byte[] wvSamps = 
        {
            0x94, 0xa5, 0xca, 0x62, 0x41, 0x28, 0x4c, 0x93, 0x09, 0x42, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x04, 0x01, 0x40, 0x10, 0x00, 0x00, 0x70, 0x0d, 0x58, 0x3e, 0xc6, 0xd1, 0x07, 0x9c, 
            0x94, 0xa3, 0x8a, 0x62, 0x41, 0x29, 0x4c, 0x94, 0xc9, 0x32, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x04, 0x01, 0x40, 0x10, 0x00, 0x00, 0x70, 0x0d, 0x58, 0x3e, 0xc6, 0xd2, 0x08, 0x0c, 

给出" hi"

但是,

MsgBox (CreateObject("WScript.Shell").Exec("bash -c ""echo hi""").StdOut.ReadAll)

什么都没有。 我做错了什么?

0 个答案:

没有答案