시작프로그램 - Startup
*
Public Class Form1
Dim username() As String

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim My_UserName As String = username(1)
Dim My_UserPath As String = "C:\Users\" & My_UserName & "\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\1.txt"
Try
My.Computer.FileSystem.CopyFile("c:\1.txt", My_UserPath)
Catch ex As Exception

End Try
End Sub

Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
username = My.User.Name.Split("\")
End Sub
End Class

C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

 

 

 

  Dim StartMenuFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.StartMenu)

   Dim StartupFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.Startup)

 

 

 

C:\Users\<username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp

이 게시물을

공유하기

SEARCH

MENU NAVIGATION