Hallo mal was kleines neues 😉
Der Denis wollte mal sehen ob ich noch Programmieren kann 🙂
Und hat mich gebeten ein kleines Prog zu schrieben was die boot.ini einließt und den timeout Wert auf 0 setzt.
Hier der Code:
Private Sub Form_Load()
On Error Resume Next
Dim strText As String
Dim strLang As String
Dim strPath As StringDim iniorg As Integer
strPath = Environ(„SystemDrive“) & „\boot.ini“
Open strPath For Input As #1
Do
Line Input #1, strText
‚Debug.Print strText
If InStr(1, strText, „timeout“) > 0 ThenstrText = „timeout=0“
End If
If strLang = „“ ThenstrLang = strText
Else
strLang = strLang & vbCrLf & strText
End If
Loop Until EOF(1) = True
Close #1
‚Debug.Print strLang
Dim fso As New FileSystemObject
Dim f As File
Set fso = CreateObject(„Scripting.FileSystemObject“)
Set f = fso.GetFile(strPath)‚Debug.Print f.Attributes
iniorg = f.Attributesf.Attributes = Normal
Open strPath For Output As #1
Print #1, strLang
Close #1
f.Attributes = iniorg
End
End Sub