Program to edit a section of .bat file?
Hey, completely new to using VB or the forums, and I was just wondering how I would go about creating a program that when executed will open the .bat file that it gets installed with and provide a text box with a section of the text inside the file so that when the user changes it there wont be room for them to accidentally delete parts of the script.
Hope I posted this in the correct section.
Re: Program to edit a section of .bat file?
Not sure what you are getting at, but if you want to modify a .bat file, you can use the normal file IO methods in dotnet to do that. A .bat file is after all a text file.
If you want to control what parts of the .bat file a user can or cannot change, using a .bat file may not be the right way. Please post exactly what you are trying to achieve so that others here may guide you better.
.
Re: Program to edit a section of .bat file?
So what I'm doing is making a program that installs a .bat file into the start up folder so that it deletes certain log files everytime someone turns their computer on rather than manually doing it. The one problem is the directory for mine may not be the same as others, so I want people to have the option to be able to change it with a simple text box rather than having to go into the .bat file and do it manually.
Re: Program to edit a section of .bat file?
I am assuming that you are talking about the location of the "Startup" folder may be different on each operating system? If so you can write code to check which operating system the user is using and set the path for the "Startup" folder accordingly.
Edit:
Also, are you using VB6 or VB.Net?