Private Sub Доступность_Директорий()
Dim Путь_Зарузки, Путь_документы, Путь_Стол, Путь_Д, Путь_Темп
If Len(TextBox14.Text + "\C$\Users\") = 0 Then
Err.Clear()
Else
Dim Dir() As String = IO.Directory.GetDirectories(TextBox14.Text + "\C$\Users\")
For Each D As String In Dir
'MessageBox.Show(D)
Dim Имя_папки As String = TextBox14.Text
If D = Имя_папки + "\C$\Users\Default" Then
'ListBox2.Items.Add("")
ElseIf D = TextBox14.Text + "\C$\Users\UpdatusUser" Then
'ListBox2.Items.Add("")
ElseIf D = TextBox14.Text + "\C$\Users\user" Then
' ListBox2.Items.Add("")
ElseIf D = TextBox14.Text + "\C$\Users\Общие" Then
'ListBox2.Items.Add("")
ElseIf D = TextBox14.Text + "\C$\Users\All Users" Then
'ListBox2.Items.Add("")
ElseIf D = TextBox14.Text + "\C$\Users\Default User" Then
'ListBox2.Items.Add("")
ElseIf D = TextBox14.Text + "\C$\Users\kaspersky_user" Then
'ListBox2.Items.Add("")
ElseIf D = TextBox14.Text + "\C$\Users\Все пользователи" Then
'ListBox2.Items.Add("")
ElseIf D = TextBox14.Text + "\C$\Users\Public" Then
'ListBox2.Items.Add("")
ElseIf D = TextBox14.Text + "\C$\Users\isb_krk" Then
'ListBox2.Items.Add("")
Else : ListBox2.Items.Add(IO.Path.GetFileName(D))
End If
Next
End If
For Each users In ListBox2.Items
Путь_Зарузки = TextBox14.Text + "\C$\Users\" + users + "\Downloads"
Путь_документы = TextBox14.Text + "\C$\Users\" + users + "\Documents"
Путь_Стол = TextBox14.Text + "\C$\Users\" + users + "\Desktop"
If Len(Путь_Зарузки) = 0 Then
Err.Clear()
Else : TextBox12.Text = Путь_Зарузки
ListBox3.Items.Add(TextBox12.Text)
End If
If Len(Путь_документы) = 0 Then
Err.Clear()
Else : TextBox13.Text = Путь_документы
ListBox3.Items.Add(TextBox13.Text)
End If
If Len(Путь_Стол) = 0 Then
Err.Clear()
Else : TextBox15.Text = Путь_Стол
ListBox3.Items.Add(TextBox15.Text)
End If
'Очистить LB2
Next
Путь_Д = TextBox14.Text + "\D$\"
Путь_Темп = TextBox14.Text + "\C$\Temp"
If Len(Путь_Д) = 0 Then
Err.Clear()
Else : TextBox9.Text = Путь_Д
ListBox3.Items.Add(TextBox9.Text)
End If
If Len(Путь_Темп) = 0 Then
Err.Clear()
Else : TextBox11.Text = Путь_Темп
ListBox3.Items.Add(TextBox11.Text)
End If
End Sub