vb6 create shortcut in startup folder code example

Example: vb6 create shortcut in startup folder

'Create a WshShell ObjectSet wshshell = CreateObject("Wscript.Shell") ' select shortcut name and folderSet oshelllink = wshshell.CreateShortcut(wshshell.specialfolders("allusersstartup") & "\aaa.lnk") 'Set the Target Path for the shortcutoshelllink.TargetPath = "notepad.exe" 'Set the additional parameters for the shortcutoshelllink.Arguments = "c:\windows\desktop\aaa.txt" 'Save the shortcutoshelllink.Save 'Clean up the WshShortcut ObjectSet oshelllink = NothingSet wshshell = Nothing