我想将图标从vb.net代码复制到计算机的启动文件夹中。
答案 0 :(得分:2)
您可以使用Environment.GetSpecialFolder函数找到启动文件夹,然后使用File.Copy复制文件。
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