Hi,

I've created an AIO tool in Visual Basic and i need to create some code so when the application is opened it places itself in the computer startup folder. I know i can do it manually but i want to do it on school computers (restricted access)

Thanks in anticipation

Member Avatar for Huntondoom

Hi,

I've created an AIO tool in Visual Basic and i need to create some code so when the application is opened it places itself in the computer startup folder. I know i can do it manually but i want to do it on school computers (restricted access)

Thanks in anticipation

Dim aFile as string = Application.ExecutablePath
Dim Split() as string = aFile.split("/")
Dim Filename as string = Split(Ubound(Split))
DIm Path as string = Environment.GetFolderPath(Environment.SpecialFolder.Startup)
System.io.File.move(Afile, Path & "/" & Filename

shall i just put the dim features under public class form1 and them the system.io... in the form load event? thanks

Member Avatar for Huntondoom

but why would you want to place it in startup?
if you do implant the code then do it so people can chose if they want that application there yes or no

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.