Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/mongodb/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net 在visual basic中提取CAB文件。可能的_.net_Vb.net_Cab - Fatal编程技术网

.net 在visual basic中提取CAB文件。可能的

.net 在visual basic中提取CAB文件。可能的,.net,vb.net,cab,.net,Vb.net,Cab,在过去的几天里,我一直在研究附加InfoPath文件(.xsn)、将其转换为.cab并从中提取所有文件的要求。我似乎找不到任何好的代码片段允许这种情况发生。到目前为止,我遇到的大多数线程都需要使用第三方软件,我希望不惜一切代价避免使用。我想我需要使用一个批处理文件来进行提取。我还没有找到任何关于这(那项工作)的好帖子或帖子 对于如何通过Visual Basic或批处理文件完成此操作的任何有用输入或帖子,我们将不胜感激。您必须添加对Microsoft Shell控件和自动化的参考。完成后,请参阅以

在过去的几天里,我一直在研究附加InfoPath文件(.xsn)、将其转换为.cab并从中提取所有文件的要求。我似乎找不到任何好的代码片段允许这种情况发生。到目前为止,我遇到的大多数线程都需要使用第三方软件,我希望不惜一切代价避免使用。我想我需要使用一个批处理文件来进行提取。我还没有找到任何关于这(那项工作)的好帖子或帖子


对于如何通过Visual Basic或批处理文件完成此操作的任何有用输入或帖子,我们将不胜感激。

您必须添加对Microsoft Shell控件和自动化的参考。完成后,请参阅以下代码:

        Dim sc As New Shell32.Shell()
    IO.Directory.CreateDirectory("C:\test")
    Dim output As Shell32.Folder = sc.NameSpace("C:\test")
    Dim input As Shell32.Folder = sc.NameSpace("C:\Form1.cab")
    output.CopyHere(input.Items, 4)
这应该能奏效