![]() ![]() NB: all the above code you write it in one line to prevent the Errors. If my.("C:\autorun.inf") ThenĪuto-run = vbCrl & "" & vbCrl & "icon=your icon.ico" & vb Crl & "open=your application name.exe" & vbCrl & "action=Run" & vbCrl & "shell\open\command=your location when your application will or is installed at.exe" Remember, these codes will go under the Form_load Private Sub Form1_Load() On your code on form_load you first have to check if the Auto-run is existing or not, so here is how you do it. You don't have to remove it or override it because the program that is using it will not automatically run. So if there is an auto-run, then you will just have to edit it and keep in mind that the auto-run that is already there is stored for another program. You also have to check if there is an auto-run already there because the computer won't store two of the same files. If you are a vb.net user, here is the line of code I've manage to write to automatically write and save auto-run on a computer.įirst, you will need to locate the correct place or directory in which a computer will look for the auto-run, and if you are targeting the users who use Windows XP, the directory is just Drive "C". ![]() ![]() I'm also looking for the same answer like code to the program the Auto-run which the computer will read then execute the program. I think the question here is that as a programmer how to make a program automatically run on it own when a computer starts up just like anti virus programs which automatically starts once the user has logged on his computer. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |