Skip to content

Commit 73f702c

Browse files
committed
Switched back to using CMD and (I think) it should no longer be broken for non-English users
1 parent 6bf3f0d commit 73f702c

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

WindowsApp1/Compact.vb

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Imports System.Text.RegularExpressions
55
Imports Ookii.Dialogs 'Uses Ookii Dialogs for the non-archaic filebrowser dialog. http://www.ookii.org/Software/Dialogs
66

77
Public Class Compact
8-
Dim version = "1.3.4"
8+
Dim version = "1.3.5"
99
Private WithEvents MyProcess As Process
1010
Private Delegate Sub AppendOutputTextDelegate(ByVal text As String)
1111

@@ -32,7 +32,7 @@ Public Class Compact
3232
Dim fileCountProgress As Int64
3333
Dim fileCountOutputCompressed As Int64
3434
Dim QdirCountProgress As Int64
35-
Dim localisationAdjustment = "[Threading.Thread]::CurrentThread.CurrentUICulture = 'en'; "
35+
3636

3737
Private Sub MyProcess_ErrorDataReceived _
3838
(ByVal sender As Object, ByVal e As System.Diagnostics.DataReceivedEventArgs) _
@@ -344,7 +344,7 @@ Public Class Compact
344344
MyProcess = New Process
345345

346346
With MyProcess.StartInfo
347-
.FileName = "powershell.exe"
347+
.FileName = "CMD.exe"
348348
.Arguments = ""
349349
.UseShellExecute = False
350350
.CreateNoWindow = True
@@ -367,6 +367,8 @@ Public Class Compact
367367
MyProcess.StandardInput.WriteLine("") 'Required for the embedded console to show the next line in the buffer after the 'cd' command. No idea why
368368
MyProcess.StandardInput.Flush()
369369

370+
MyProcess.StandardInput.WriteLine("chcp 437")
371+
MyProcess.StandardInput.Flush()
370372

371373
RunCompact(passthrougharg)
372374

@@ -599,7 +601,7 @@ Public Class Compact
599601
compactArgs = compactArgs + " /EXE:LZX"
600602
End If
601603

602-
MyProcess.StandardInput.WriteLine(localisationAdjustment & compactArgs)
604+
MyProcess.StandardInput.WriteLine(compactArgs)
603605
MyProcess.StandardInput.Flush()
604606

605607
isQueryCalledByCompact = 1
@@ -616,13 +618,13 @@ Public Class Compact
616618
compactArgs = compactArgs + " /A"
617619
End If
618620

619-
MyProcess.StandardInput.WriteLine(localisationAdjustment & compactArgs)
621+
MyProcess.StandardInput.WriteLine(compactArgs)
620622
MyProcess.StandardInput.Flush()
621623

622624
ElseIf desiredfunction = "query" Then
623625
compactArgs = "compact /S /Q /EXE"
624626

625-
MyProcess.StandardInput.WriteLine(localisationAdjustment & compactArgs)
627+
MyProcess.StandardInput.WriteLine(compactArgs)
626628
MyProcess.StandardInput.Flush()
627629

628630
End If

WindowsApp1/My Project/AssemblyInfo.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
3232
' by using the '*' as shown below:
3333
' <Assembly: AssemblyVersion("1.0.*")>
3434

35-
<Assembly: AssemblyVersion("1.3.4.0")>
36-
<Assembly: AssemblyFileVersion("1.3.4.0")>
35+
<Assembly: AssemblyVersion("1.3.5.0")>
36+
<Assembly: AssemblyFileVersion("1.3.5.0")>
3737
<Assembly: NeutralResourcesLanguage("en")>

0 commit comments

Comments
 (0)