Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
500MB 27GB Web Hosting - $9.95/Month
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleAdd a command to Autoexec.bat
Keywordsautoexec.bat, batch files, startup
CategoriesWindows, Files & 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
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated