Zdravim Vas! Chcel by som pridat do mojej aplikacie start up pomocou prvkov ActiveX. Mohli by ste mi prosim poradit co je na tomto kode zle, lebo to do registrov nic nezapise.
Public Sub CreateActiveXStartup(ActiveXKey As String, ExecutablePath As String)
Dim rk As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Active Setup\Installed Components", True)
rk.CreateSubKey(ActiveXKey)
rk = rk.OpenSubKey(ActiveXKey, True)
rk.SetValue("StubPath", ExecutablePath)
rk.SetValue("IsInstalled", 1, RegistryValueKind.DWord)
End Sub
Proceduru volam pomocou
CreateActiveXStartup("{f98f6f94-f336-456f-8cc9-68c86a4a47e5}", Application.ExecutablePath)
A este jedna otazka dali by sa nejako obist prava administratora napr ak by som zmenil Local Machine za Current User alebo to co hovorim je blbost.
|