'قم بوضع مسار القرص من أي أشارة أي C
Public Sub SetDriveBackGround(ByVal Drive As String, ByVal FileName As String)
If IO.File.Exists(FileName) = True Then
Dim a As String
a = "[ExtShellFolderViews]" & vbCrLf
a = a & "{BE098140-A513-11D0-A3A4-00C04FD706EC}={BE098140-A513-11D0-A3A4-00C04FD706EC}" & vbCrLf
a = a & "[.ShellClassInfo]" & vbCrLf
a = a & "ConfirmFileOp=0" & vbCrLf
a = a & "[{BE098140-A513-11D0-A3A4-00C04FD706EC}]" & vbCrLf
a = a & "Attributes=1" & vbCrLf
IO.Directory.CreateDirectory(Drive & "WinFolderSetting")
Dim o As String
o = Drive & "WinFolderSetting\" & "BackGround" & IO.Path.GetExtension(FileName)
If IO.File.Exists(o) = True Then
IO.File.Delete(o)
End If
IO.File.Copy(FileName, o)
a = a & "IconArea_Image = " & o
If IO.File.Exists(Drive & "Desktop.ini") = True Then
IO.File.Delete(Drive & "Desktop.ini")
End If
Dim s As IO.StreamWriter = New IO.StreamWriter(Drive & "Desktop.ini")
SetAttr(Drive & "Desktop.ini", FileAttribute.System + FileAttribute.Hidden)
Dim i As IO.DirectoryInfo
i = My.Computer.FileSystem.GetDirectoryInfo(Drive & "WinFolderSetting\")
i.Attributes = IO.FileAttributes.System + IO.FileAttributes.Hidden
s.Write(a)
s.Close()
Else
MsgBox("The File Is Not Found ", MsgBoxStyle.Critical, "Error")
End If
End Sub
Please SUBSCRIBE to get new articles directly into your Email inbox!
Public Sub SetDriveBackGround(ByVal Drive As String, ByVal FileName As String)
If IO.File.Exists(FileName) = True Then
Dim a As String
a = "[ExtShellFolderViews]" & vbCrLf
a = a & "{BE098140-A513-11D0-A3A4-00C04FD706EC}={BE098140-A513-11D0-A3A4-00C04FD706EC}" & vbCrLf
a = a & "[.ShellClassInfo]" & vbCrLf
a = a & "ConfirmFileOp=0" & vbCrLf
a = a & "[{BE098140-A513-11D0-A3A4-00C04FD706EC}]" & vbCrLf
a = a & "Attributes=1" & vbCrLf
IO.Directory.CreateDirectory(Drive & "WinFolderSetting")
Dim o As String
o = Drive & "WinFolderSetting\" & "BackGround" & IO.Path.GetExtension(FileName)
If IO.File.Exists(o) = True Then
IO.File.Delete(o)
End If
IO.File.Copy(FileName, o)
a = a & "IconArea_Image = " & o
If IO.File.Exists(Drive & "Desktop.ini") = True Then
IO.File.Delete(Drive & "Desktop.ini")
End If
Dim s As IO.StreamWriter = New IO.StreamWriter(Drive & "Desktop.ini")
SetAttr(Drive & "Desktop.ini", FileAttribute.System + FileAttribute.Hidden)
Dim i As IO.DirectoryInfo
i = My.Computer.FileSystem.GetDirectoryInfo(Drive & "WinFolderSetting\")
i.Attributes = IO.FileAttributes.System + IO.FileAttributes.Hidden
s.Write(a)
s.Close()
Else
MsgBox("The File Is Not Found ", MsgBoxStyle.Critical, "Error")
End If
End Sub
Please SUBSCRIBE to get new articles directly into your Email inbox!
تعليقات
إرسال تعليق