views:

896

answers:

1

I'd like to copy an icon into the computer's startup folder from vb.net code.

+2  A: 

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
JaredPar