ファイルを解凍しようとすると例外が発生します
try を削除すると、次のように表示されます。
追加情報: オブジェクト参照がオブジェクトのインスタンスに設定されていません。
Try
Dim sc As New Shell32.Shell()
'
'Create directory in which you will unzip your files .
'
IO.Directory.CreateDirectory(Application.StartupPath & "/Packs/SkyNet/mods")
'
'Declare the folder where the files will be extracted
'
Dim output As Shell32.Folder = sc.NameSpace(Application.StartupPath & "/Packs/SkyNet/mods")
'
'Declare your input zip file as folder .
'
Dim input As Shell32.Folder = sc.NameSpace(Application.StartupPath & "/Downloads/SkyNet.zip")
'
'Extract the files from the zip file using the CopyHere command .
'
output.CopyHere(input.Items, 4)
My.Computer.FileSystem.WriteAllText(Application.StartupPath & "/Config/SkyNet.pack", "SkyNet Installed", False)
Catch ex As Exception
MessageBox.Show("Could Not Extract Pack: SkyNet", "SkyNet Launcher: Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
My.Computer.FileSystem.WriteAllText(Application.StartupPath & "/Config/SkyNet.pack", "SkyNet Not Installed", False)
End Try
output.CopyHere(input.Items, 4)をoutput.CopyHere(input.Items, 148)に設定しようとしましたが、同じエラーが返されます。
(148 は zip 内のアイテムの数です)