Systemdaten und Screenshot in Temp-Ordner

This commit is contained in:
2023-11-23 16:11:55 +01:00
parent 52cc8e0bde
commit c046e4c082
2 changed files with 6 additions and 6 deletions

View File

@@ -83,12 +83,12 @@ Public Class frmErrorMeldung
If cbxEnviromentVariables.Checked Then
If Not My.Computer.FileSystem.DirectoryExists(My.Computer.FileSystem.SpecialDirectories.Desktop & "\Screenshots_" & My.Application.Info.AssemblyName & "\") Then
My.Computer.FileSystem.CreateDirectory(My.Computer.FileSystem.SpecialDirectories.Desktop & "\Screenshots_" & My.Application.Info.AssemblyName & "\")
If Not My.Computer.FileSystem.DirectoryExists(My.Computer.FileSystem.SpecialDirectories.Temp & "\Screenshots_" & My.Application.Info.AssemblyName & "\") Then
My.Computer.FileSystem.CreateDirectory(My.Computer.FileSystem.SpecialDirectories.Temp & "\Screenshots_" & My.Application.Info.AssemblyName & "\")
End If
Dim filename = "SystemEnviroment_" & Now.ToFileTime & "_.txt"
Dim strFile As String = My.Computer.FileSystem.SpecialDirectories.Desktop & "\Screenshots_" & My.Application.Info.AssemblyName & "\" & filename
Dim strFile As String = My.Computer.FileSystem.SpecialDirectories.Temp & "\Screenshots_" & My.Application.Info.AssemblyName & "\" & filename
Dim fileExists As Boolean = File.Exists(strFile)
Using sw As New StreamWriter(File.Open(strFile, FileMode.CreateNew))