Copy Icon into Startup Folder Using VB.Net
-
22-08-2019 - |
Question
I'd like to copy an icon into the computer's startup folder from vb.net code.
Solution
You can find the Startup Folder using the Environment.GetSpecialFolder function and then use File.Copy to copy out the file.
Public Sub CopyIconFromStartup(iconName as String, target As String)
Dim path as String = Environment.GetSpecialFolder(SpecialFolder.Startup)
path = IO.Path.Combine(path, iconName)
File.Copy(path, target)
End Sub
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow