Forum

Vb ile Registry.Loc...
 
Bildirimler
Hepsini Temizle

Vb ile Registry.LocalMachine Dizinine Değer Atama sorunu

3 Yazılar
2 Üyeler
0 Reactions
624 Görüntüleme
(@KerimAcar)
Gönderiler: 72
Estimable Member
Konu başlatıcı
 


Imports Microsoft.Win32


Public Class Form1


Private Sub korumaac(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kac.Click


Registry.CurrentUser.CreateSubKey("Kerim")


End Sub


End Class


*********************************************** Şeklinde kodu girince buton düzgün çalışıyor CurrenUser de klasor yada değer oluşturabiliyorum


**********Registry.LocalMachine.CreateSubKey()     **********************

Yaptığımda çalışmamakta.


 


'WindowsApplication7.vshost.exe' (Managed (v4.0.30319)): Loaded 'c:\users\kerim\documents\visual studio 2010\Projects\WindowsApplication7\WindowsApplication7\bin\Debug\WindowsApplication7.exe', Symbols loaded.


'WindowsApplication7.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Remoting\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Remoting.dll'


A first chance exception of type 'System.IO.IOException' occurred in mscorlib.dll


'WindowsApplication7.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_tr_b77a5c561934e089\mscorlib.resources.dll'


 


Registry.LocalMachine.  


 Dizinine nasıl veri yazabilirim yardımcı olurmusunuz?

 
Gönderildi : 15/12/2013 18:54

(@kenanilgun)
Gönderiler: 544
Üye
 

Merhaba,

Birde "Registry.LocalMachine.CreateSubKey("SOFTWARE\Kerim")" olarak dener misiniz.

 
Gönderildi : 16/12/2013 11:14

(@KerimAcar)
Gönderiler: 72
Estimable Member
Konu başlatıcı
 

System.IO.IOException was unhandled
  HResult=87
  Message=Parametre hatalı.


  Source=mscorlib
  StackTrace:
       konum: Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
       konum: Microsoft.Win32.RegistryKey.CreateSubKeyInternal(String subkey, RegistryKeyPermissionCheck permissionCheck, Object registrySecurityObj, RegistryOptions registryOptions)
       konum: Microsoft.Win32.RegistryKey.CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck)
       konum: Microsoft.Win32.RegistryKey.CreateSubKey(String subkey)
       konum: WindowsApplication11.Form1.tik(Object sender, EventArgs e) c:\users\kerim\documents\visual studio 2010\Projects\WindowsApplication11\WindowsApplication11\Form1.vb içinde: satır 5
       konum: System.Windows.Forms.Control.OnClick(EventArgs e)
       konum: System.Windows.Forms.Button.OnClick(EventArgs e)
       konum: System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       konum: System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       konum: System.Windows.Forms.Control.WndProc(Message& m)
       konum: System.Windows.Forms.ButtonBase.WndProc(Message& m)
       konum: System.Windows.Forms.Button.WndProc(Message& m)
       konum: System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       konum: System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       konum: System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       konum: System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       konum: System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       konum: System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       konum: System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       konum: System.Windows.Forms.Application.Run(ApplicationContext context)
       konum: Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       konum: Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       konum: Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       konum: WindowsApplication11.My.MyApplication.Main(String[] Args) 17d14f5c-a337-4978-8281-53493378c1071.vb içinde: satır 81
       konum: System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       konum: System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       konum: Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       konum: System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       konum: System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       konum: System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       konum: System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       konum: System.Threading.ThreadHelper.ThreadStart()
  InnerException:

---------------------------------------------------------------------------------


Imports Microsoft.Win32


Public Class Form1


Private Sub tik(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click


Registry.LocalMachine.CreateSubKey("SOFTRARE\kerim", RegistryKeyPermissionCheck)


End Sub


End Class


***************************          yapıncada
System.IO.IOException was unhandled
  HResult=87
  Message=Parametre hatalı.


  Source=mscorlib
  StackTrace:
       konum: Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
       konum: Microsoft.Win32.RegistryKey.CreateSubKeyInternal(String subkey, RegistryKeyPermissionCheck permissionCheck, Object registrySecurityObj, RegistryOptions registryOptions)
       konum: Microsoft.Win32.RegistryKey.CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck)
       konum: WindowsApplication11.Form1.tik(Object sender, EventArgs e) c:\users\kerim\Desktop\Yeni klasör (2)\Form1.vb içinde: satır 5
       konum: System.Windows.Forms.Control.OnClick(EventArgs e)
       konum: System.Windows.Forms.Button.OnClick(EventArgs e)
       konum: System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       konum: System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       konum: System.Windows.Forms.Control.WndProc(Message& m)
       konum: System.Windows.Forms.ButtonBase.WndProc(Message& m)
       konum: System.Windows.Forms.Button.WndProc(Message& m)
       konum: System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       konum: System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       konum: System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       konum: System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       konum: System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       konum: System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       konum: System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       konum: System.Windows.Forms.Application.Run(ApplicationContext context)
       konum: Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       konum: Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       konum: Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       konum: WindowsApplication11.My.MyApplication.Main(String[] Args) 17d14f5c-a337-4978-8281-53493378c1071.vb içinde: satır 81
       konum: System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       konum: System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       konum: Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       konum: System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       konum: System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       konum: System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       konum: System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       konum: System.Threading.ThreadHelper.ThreadStart()
  InnerException:


Form açiliyor , Butona tıklayinca Proğram(Demo) donuyor.. Görev yöneticisinden kapatmak zorunda kalıyorum

 
Gönderildi : 17/12/2013 08:59

Paylaş: