|
|
Title | Add a command to Autoexec.bat |
Keywords | autoexec.bat, batch files, startup |
Categories | Windows, Files and Directories |
|
|
Open the file Autoexec.bat for Append and write the new command.
|
|
Private Sub cmdAdd_Click()
Dim fnum As Integer
Dim txt As String
' Open the file for append.
fnum = FreeFile
Open "C:\autoexec.bat" For Append As fnum
' Add the command.
txt = txtCommand.Text
Print #fnum, txt
' Close the file.
Close fnum
MsgBox "Ok"
End Sub
|
|
|
|
|
|