Skip to content

Commit

Permalink
Fix CSV File Writes
Browse files Browse the repository at this point in the history
  • Loading branch information
rcmaehl authored Jul 9, 2024
1 parent b4330af commit 95fe78c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions WhyNotWin11.au3
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
#AutoIt3Wrapper_Res_Comment=https://www.whynotwin11.org
#AutoIt3Wrapper_Res_CompanyName=Robert Maehl Software
#AutoIt3Wrapper_Res_Description=Detection Script to help identify why your PC isn't Windows 11 Release Ready. Now Supporting Update Checks!
#AutoIt3Wrapper_Res_Fileversion=2.6.1.0
#AutoIt3Wrapper_Res_Fileversion=2.6.1.1
#AutoIt3Wrapper_Res_ProductName=WhyNotWin11
#AutoIt3Wrapper_Res_ProductVersion=2.6.1.0
#AutoIt3Wrapper_Res_ProductVersion=2.6.1.1
#AutoIt3Wrapper_Res_LegalCopyright=Robert Maehl, using LGPL 3 License
#AutoIt3Wrapper_Res_Language=1033
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
Expand Down Expand Up @@ -96,7 +96,7 @@ Func ProcessCMDLine()
Local $sDrive = Null
Local $bForce = False
Local $bSilent = False
Local $aOutput[3] = [False, "", ""]
Local $aOutput[3] = [True, "csv", "test.csv"]
Local $iParams = $CmdLine[0]

If $aMUI[0] = Null Then
Expand Down Expand Up @@ -1374,9 +1374,9 @@ Func OutputResults(ByRef $aResults, ByRef $aSkips, $aOutput)
EndIf
If Not FileExists($sFile) Then
$hFile = FileOpen($sFile, $FO_CREATEPATH + $FO_OVERWRITE)
$sOut = FileWrite($hFile, "Hostname")
$sOut = "Hostname"
For $iLoop = 0 To 10 Step 1
$sOut &= FileWrite($hFile, "," & $aLabel[$iLoop])
$sOut &= "," & $aLabel[$iLoop]
Next
FileWrite($hFile, $sOut & @CRLF)
Else
Expand All @@ -1385,9 +1385,9 @@ Func OutputResults(ByRef $aResults, ByRef $aSkips, $aOutput)
$sOut = @ComputerName
For $iLoop = 0 To 10 Step 1
If $aSkips[$iLoop] Then
$sOut &= FileWrite($hFile, "," & True)
$sOut &= "," & True
Else
$sOut &= FileWrite($hFile, "," & $aResults[$iLoop][0])
$sOut &= "," & $aResults[$iLoop][0]
EndIf
Next

Expand Down

0 comments on commit 95fe78c

Please sign in to comment.