Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Makecab Expand Tool

Featured Replies

I have made this Vb.net app to run either Makecab or Expand, this app now displays the output of either function.

MakeCabExpandImg.png


Public Class Form1
Dim MeClose
Dim MeLabel = Chr(187) & " Drag And Drop Single File Or Multiple Files. Drag And Drop A Single Folder Or Multiple Folders. This will auto sort the files for either Makecab or Expand process."
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Label1.Text = MeLabel
Me.Text = "Gunsmokingman MakeCab And Expand Tool"
ShowInfo(False)
'-> To Accept Cmd Line Arguments EG
'-> Start /Wait PATH_TO\MakeCabAndExpand.exe "SomeFileToCabOrExpand.zzz"
'-> Run The App From Sendto Folder
For Each Args In My.Application.CommandLineArgs
If Args.Count >= 1 Then
MeClose = True
SortFileFolder(Args.ToString)
End If
Next
'-> Close The App After Files Or Folder Are Completed
If MeClose = True Then
Me.Close()
End If
End Sub
''' <summary>
''' Change Status Bar Background
''' </summary>
''' <param name="Show"></param>
''' <remarks></remarks>
Private Sub ShowInfo(ByVal Show As Boolean)
If Show Then
TxtInfo1.BackgroundImage = MakeCabAndExpand.My.Resources._125_LightLime
Else
TxtInfo1.BackgroundImage = MakeCabAndExpand.My.Resources._125_LightTan
TxtInfo1.Text = ""
End If
End Sub
''' <summary>
''' Drag And Drop Action
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
''' <remarks></remarks>
Private Sub Form1_Drag(ByVal sender As Object, ByVal e As DragEventArgs) Handles MyBase.DragEnter, MyBase.DragDrop
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
Dim MyObject As String() = CType(e.Data.GetData(DataFormats.FileDrop), String())
Try
For Each I In MyObject
SortFileFolder(I.ToString)
Next
Catch ex As Exception
End Try
End If
Label1.TextAlign = ContentAlignment.TopLeft
Label1.Text = MeLabel
End Sub
''' <summary>
''' Check Either A File Or Folder
''' </summary>
''' <param name="Chk"></param>
''' <remarks></remarks>
Private Sub SortFileFolder(ByRef Chk)
If Microsoft.VisualBasic.Right(InStr(Chk, "."), 5) Then
Me.Focus()
Work(Chk)
Else
Me.Focus()
ListAll(My.Computer.FileSystem.GetFiles(Chk), My.Computer.FileSystem.GetDirectories(Chk))
End If
End Sub
''' <summary>
''' List All Files From Parent Folder Threw All Sub Folders
''' </summary>
''' <param name="Files"></param>
''' <param name="Folders"></param>
''' <remarks></remarks>
Private Sub ListAll(ByRef Files, ByRef Folders)
For Each File In Files
Work(File)
Next
For Each Folder In Folders
ListAll(My.Computer.FileSystem.GetFiles(Folder), My.Computer.FileSystem.GetDirectories(Folder))
Next
End Sub
''' <summary>
''' Makecab Or Expand Display Output To App
''' </summary>
''' <param name="File"></param>
''' <remarks></remarks>
Private Sub Work(ByRef File)
Environment.CurrentDirectory = My.Computer.FileSystem.GetParentPath(File)
Dim F = Chr(34) & File.ToString & Chr(34)
Dim Run As New Process()
ShowInfo(True)
If Not Microsoft.VisualBasic.Right(File, 1) = "_" Then
'-> MakeCab
Run.StartInfo.RedirectStandardOutput = True
Run.StartInfo.UseShellExecute = False
Run.StartInfo.CreateNoWindow = True
Run.StartInfo.FileName = Environment.SystemDirectory & "\makecab.exe "
Run.StartInfo.Arguments = " /D CompressionType=LZX /D CompressionMemory=21 " & F
Run.Start()
Label1.TextAlign = ContentAlignment.MiddleLeft
Label1.Text = "Path : " & My.Computer.FileSystem.GetParentPath(File) & vbCrLf & _
"Name : " & My.Computer.FileSystem.GetFileInfo(File).Name
Do
MyBase.Update()
TxtInfo1.Text = Run.StandardOutput.ReadLine.ToString()
Me.Activate()
Loop Until Run.HasExited
Else
'-> Expand
Run.StartInfo.RedirectStandardOutput = True
Run.StartInfo.UseShellExecute = False
Run.StartInfo.CreateNoWindow = True
Run.StartInfo.FileName = Environment.SystemDirectory & "\expand.exe "
Run.StartInfo.Arguments = F & " /R"
Run.Start()
Label1.TextAlign = ContentAlignment.MiddleLeft
Label1.Text = "Path : " & My.Computer.FileSystem.GetParentPath(File) & vbCrLf & _
"Name : " & My.Computer.FileSystem.GetFileInfo(File).Name
Do
MyBase.Update()
TxtInfo1.Text = Run.StandardOutput.ReadLine.ToString()
Me.Activate()
Loop Until Run.HasExited
End If
If My.Computer.FileSystem.FileExists(File) Then My.Computer.FileSystem.DeleteFile(File, 2, 2)
ShowInfo(False)
End Sub
'-> Close App
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Close()
End Sub
End Class

New Source Code

MakeCabAndExpand.exe

Uses .NET Framework 3.5?

Edit: after the primary error (no .NET 3.5), if I click Continue, it still works.

Thank you very much, saves a lot of lines pointing Command Prompt to folders.

Edited by Sp0iLedBrAt

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.