473,770 Members | 1,989 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Create New RegistryKey

Thank you in advance for any and all assistance. Here is my problem. I have a
program that will create a registry key, however it is not and here is the
code and also the error that follows:

Imports System.IO
Imports System.Text
Imports System.Security .Cryptography
Imports System.Net
Imports Microsoft.Visua lBasic.Conversi on
Imports System.Manageme nt
Imports Microsoft.Win32

Public Class License

Private szRegKey As String
Private szKeyValueName As String
Private szDateValueName As String

Public Property KeyValueName() As String
Get
Return szKeyValueName
End Get
Set(ByVal value As String)
szKeyValueName = value
End Set
End Property

Public Property DateValueName() As String
Get
Return szDateValueName
End Get
Set(ByVal value As String)
szDateValueName = value
End Set
End Property

Public Property RegKey() As String
Get
Return szRegKey
End Get
Set(ByVal value As String)
szRegKey = value
End Set
End Property

Public Function CheckValidity(B yVal szRegMainKey As String, ByVal
szKeyBaseString As String, ByVal nHours As Integer) As Boolean
Dim keyArray() As String
Dim rKey As RegistryKey = Nothing
Dim uB As Long
Dim szMasterKey As String
Dim i As Long
Dim szKeyEnc As String
Dim szKey As String
Dim szDate As String
Dim szDateEnc As String
Dim szDateD As Date

If szRegKey = "" Then Return False
If szKeyValueName = "" Then Return False
If szDateValueName = "" Then Return False

keyArray = szRegKey.Split( "\")
uB = UBound(keyArray )
szMasterKey = ""
For i = 1 To uB
szMasterKey = szMasterKey & keyArray(i) & "\"
Next
szMasterKey = szMasterKey.Sub string(0, szMasterKey.Len gth - 1)

Try
Select Case keyArray(0)
Case "HKEY_CLASSES_R OOT"
rKey = Registry.Classe sRoot.OpenSubKe y(szMasterKey, True)
Case "HKEY_CURRENT_U SER"
rKey = Registry.Curren tUser.OpenSubKe y(szMasterKey, True)
Case "HKEY_LOCAL_MAC HINE"
rKey = Registry.LocalM achine.OpenSubK ey(szMasterKey, True)
Case "HKEY_USERS "
rKey = Registry.Users. OpenSubKey(szMa sterKey, True)
Case "HKEY_CURRENT_C ONFIG"
rKey = Registry.Curren tConfig.OpenSub Key(szMasterKey ,
True)
End Select
Catch ex As Exception
Return False
End Try
szKeyEnc = rKey.GetValue(s zKeyValueName). ToString()
szDateEnc = rKey.GetValue(s zDateValueName) .ToString()
rKey.Close()
If szKeyEnc = "" Then Return False
If szDateEnc = "" Then Return False

szKey = DecryptKey(szKe yEnc)
If szKey <szKeyBaseStrin g Then
Return False
End If

szDate = DecryptKey(szDa teEnc)
If IsDate(szDate) = False Then Return False

szDateD = Convert.ToDateT ime(szDate)
If DateDiff(DateIn terval.Hour, szDateD, Now()) >= nHours Then
Return False
End If

Return True

End Function

Public Function SaveKeyToRegist ry(ByVal szKeyValue As String) As Boolean

Dim keyArray() As String
Dim rKey As RegistryKey = Nothing
Dim uB As Long
Dim szMasterKey As String
Dim i As Long
Dim szDate As String
Dim szDateEnc As String

If szRegKey = "" Then Return False
If szKeyValueName = "" Then Return False
If szDateValueName = "" Then Return False

keyArray = szRegKey.Split( "\")
uB = UBound(keyArray )
szMasterKey = ""
For i = 1 To uB
szMasterKey = szMasterKey & keyArray(i) & "\"
Next
szMasterKey = szMasterKey.Sub string(0, szMasterKey.Len gth - 1)

Try
Select Case keyArray(0)
Case "HKEY_CLASSES_R OOT"
rKey = Registry.Classe sRoot.OpenSubKe y(szMasterKey, True)
Case "HKEY_CURRENT_U SER"
rKey = Registry.Curren tUser.OpenSubKe y(szMasterKey, True)
Case "HKEY_LOCAL_MAC HINE"
rKey = Registry.LocalM achine.OpenSubK ey(szMasterKey, True)
Case "HKEY_USERS "
rKey = Registry.Users. OpenSubKey(szMa sterKey, True)
Case "HKEY_CURRENT_C ONFIG"
rKey = Registry.Curren tConfig.OpenSub Key(szMasterKey ,
True)
End Select
Catch ex As Exception
Return False
End Try
szDate = Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " &
Hour(Now) & ":" & Minute(Now)
szDateEnc = GenerateKey(szD ate)
Try
rKey.SetValue(s zDateValueName, szDateEnc)
rKey.SetValue(s zKeyValueName, szKeyValue)
rKey.Close()
Catch ex As Exception
rKey.Close()
Return False
End Try
Return True

End Function

Public Function GenerateKey(Opt ional ByVal szBaseString As String = "")
As String
Dim szOutput As String
Dim sHex As String
Dim sLen As Integer
Dim i As Integer
Dim nRet As String = ""

If szBaseString = "" Then szBaseString = GetBiosID()
szOutput = des.Encrypt(szB aseString)
sLen = szOutput.Length
For i = 0 To sLen - 1
sHex = Convert.ToStrin g(Hex(Asc(szOut put.Substring(i , 1))))
If sHex.Length < 2 Then sHex = "0" & sHex
nRet = nRet & sHex
Next
If nRet.EndsWith(" 3D3D") Then nRet = nRet.Substring( 0, nRet.Length -
4)
Return nRet
End Function

Public Function DecryptKey(ByVa l szBaseString As String) As String

Dim nRet As String = ""
Dim sChar As String
Dim sLen As Integer
Dim i As Integer

sLen = szBaseString.Le ngth
For i = 0 To sLen - 1 Step 2
sChar = Chr("&H" & szBaseString.Su bstring(i, 2))
nRet = nRet & sChar
Next
Return des.Decrypt(nRe t)

End Function

Public Function GetBiosID() As String
Dim searcher As Object = New ManagementObjec tSearcher("SELE CT * FROM
Win32_BIOS")
Dim info As ManagementObjec t
Dim nRet As String = ""

For Each info In searcher.Get()
nRet += info("manufactu rer").ToString( ) &
info("serialnum ber").ToString( )
Next
Return nRet

End Function

When I run this code in an application I get this:

System.NullRefe renceException was unhandled
Message="Object reference not set to an instance of an object."
Source="License Lib"
StackTrace:
at LicenseLib.Lice nse.SaveKeyToRe gistry(String szKeyValue)
at Sample_Ins.frmM ain.InstallRegi sterNewKey(Stri ng szClientName,
Boolean isMachineLinked , Int64 nHours) in
E:\LicenseCode\ Sample_Ins\Samp le_Ins\frmMain. vb:line 95
at Sample_Ins.frmM ain.btnSample_C lick(Object sender, EventArgs e) in
E:\LicenseCode\ Sample_Ins\Samp le_Ins\frmMain. vb:line 50
at System.Windows. Forms.Control.O nClick(EventArg s e)
at System.Windows. Forms.Button.On Click(EventArgs e)
at System.Windows. Forms.Button.On MouseUp(MouseEv entArgs mevent)
at System.Windows. Forms.Control.W mMouseUp(Messag e& m, MouseButtons
button, Int32 clicks)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.ButtonBas e.WndProc(Messa ge& m)
at System.Windows. Forms.Button.Wn dProc(Message& m)
at
System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m)
at System.Windows. Forms.NativeWin dow.DebuggableC allback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows. Forms.UnsafeNat iveMethods.Disp atchMessageW(MS G& msg)
at
System.Windows. Forms.Applicati on.ComponentMan ager.System.Win dows.Forms.Unsa feNativeMethods .IMsoComponentM anager.FPushMes sageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
at
System.Windows. Forms.Applicati on.ThreadContex t.RunMessageLoo pInner(Int32
reason, ApplicationCont ext context)
at
System.Windows. Forms.Applicati on.ThreadContex t.RunMessageLoo p(Int32 reason,
ApplicationCont ext context)
at System.Windows. Forms.Applicati on.Run(Applicat ionContext context)
at
Microsoft.Visua lBasic.Applicat ionServices.Win dowsFormsApplic ationBase.OnRun ()
at
Microsoft.Visua lBasic.Applicat ionServices.Win dowsFormsApplic ationBase.DoApp licationModel()
at
Microsoft.Visua lBasic.Applicat ionServices.Win dowsFormsApplic ationBase.Run(S tring[] commandLine)
at Sample_Ins.My.M yApplication.Ma in(String[] Args) in
17d14f5c-a337-4978-8281-53493378c1071.v b:line 81
at System.AppDomai n.nExecuteAssem bly(Assembly assembly, String[] args)
at System.AppDomai n.ExecuteAssemb ly(String assemblyFile, Evidence
assemblySecurit y, String[] args)
at Microsoft.Visua lStudio.Hosting Process.HostPro c.RunUsersAssem bly()
at System.Threadin g.ThreadHelper. ThreadStart_Con text(Object state)
at System.Threadin g.ExecutionCont ext.Run(Executi onContext
executionContex t, ContextCallback callback, Object state)
at System.Threadin g.ThreadHelper. ThreadStart()

When I attempt to debug, I never even get a registry value created. HELP
PLEASE!
--
Michael Bragg,
MS Authorized MAR
looking for used laptops for developmentally disabled.
Aug 16 '06 #1
4 1724
Hi,

Is it instead of showing us a complete program not better to show the part
where the creation of the registry key fails?

I think that you give us now to much data to let it be information.

Cor

"eSolTec, Inc. 501(c)(3)" <es*****@noemai l.nospamschreef in bericht
news:17******** *************** ***********@mic rosoft.com...
Thank you in advance for any and all assistance. Here is my problem. I
have a
program that will create a registry key, however it is not and here is the
code and also the error that follows:

Imports System.IO
Imports System.Text
Imports System.Security .Cryptography
Imports System.Net
Imports Microsoft.Visua lBasic.Conversi on
Imports System.Manageme nt
Imports Microsoft.Win32

Public Class License

Private szRegKey As String
Private szKeyValueName As String
Private szDateValueName As String

Public Property KeyValueName() As String
Get
Return szKeyValueName
End Get
Set(ByVal value As String)
szKeyValueName = value
End Set
End Property

Public Property DateValueName() As String
Get
Return szDateValueName
End Get
Set(ByVal value As String)
szDateValueName = value
End Set
End Property

Public Property RegKey() As String
Get
Return szRegKey
End Get
Set(ByVal value As String)
szRegKey = value
End Set
End Property

Public Function CheckValidity(B yVal szRegMainKey As String, ByVal
szKeyBaseString As String, ByVal nHours As Integer) As Boolean
Dim keyArray() As String
Dim rKey As RegistryKey = Nothing
Dim uB As Long
Dim szMasterKey As String
Dim i As Long
Dim szKeyEnc As String
Dim szKey As String
Dim szDate As String
Dim szDateEnc As String
Dim szDateD As Date

If szRegKey = "" Then Return False
If szKeyValueName = "" Then Return False
If szDateValueName = "" Then Return False

keyArray = szRegKey.Split( "\")
uB = UBound(keyArray )
szMasterKey = ""
For i = 1 To uB
szMasterKey = szMasterKey & keyArray(i) & "\"
Next
szMasterKey = szMasterKey.Sub string(0, szMasterKey.Len gth - 1)

Try
Select Case keyArray(0)
Case "HKEY_CLASSES_R OOT"
rKey = Registry.Classe sRoot.OpenSubKe y(szMasterKey,
True)
Case "HKEY_CURRENT_U SER"
rKey = Registry.Curren tUser.OpenSubKe y(szMasterKey,
True)
Case "HKEY_LOCAL_MAC HINE"
rKey = Registry.LocalM achine.OpenSubK ey(szMasterKey,
True)
Case "HKEY_USERS "
rKey = Registry.Users. OpenSubKey(szMa sterKey, True)
Case "HKEY_CURRENT_C ONFIG"
rKey = Registry.Curren tConfig.OpenSub Key(szMasterKey ,
True)
End Select
Catch ex As Exception
Return False
End Try
szKeyEnc = rKey.GetValue(s zKeyValueName). ToString()
szDateEnc = rKey.GetValue(s zDateValueName) .ToString()
rKey.Close()
If szKeyEnc = "" Then Return False
If szDateEnc = "" Then Return False

szKey = DecryptKey(szKe yEnc)
If szKey <szKeyBaseStrin g Then
Return False
End If

szDate = DecryptKey(szDa teEnc)
If IsDate(szDate) = False Then Return False

szDateD = Convert.ToDateT ime(szDate)
If DateDiff(DateIn terval.Hour, szDateD, Now()) >= nHours Then
Return False
End If

Return True

End Function

Public Function SaveKeyToRegist ry(ByVal szKeyValue As String) As
Boolean

Dim keyArray() As String
Dim rKey As RegistryKey = Nothing
Dim uB As Long
Dim szMasterKey As String
Dim i As Long
Dim szDate As String
Dim szDateEnc As String

If szRegKey = "" Then Return False
If szKeyValueName = "" Then Return False
If szDateValueName = "" Then Return False

keyArray = szRegKey.Split( "\")
uB = UBound(keyArray )
szMasterKey = ""
For i = 1 To uB
szMasterKey = szMasterKey & keyArray(i) & "\"
Next
szMasterKey = szMasterKey.Sub string(0, szMasterKey.Len gth - 1)

Try
Select Case keyArray(0)
Case "HKEY_CLASSES_R OOT"
rKey = Registry.Classe sRoot.OpenSubKe y(szMasterKey,
True)
Case "HKEY_CURRENT_U SER"
rKey = Registry.Curren tUser.OpenSubKe y(szMasterKey,
True)
Case "HKEY_LOCAL_MAC HINE"
rKey = Registry.LocalM achine.OpenSubK ey(szMasterKey,
True)
Case "HKEY_USERS "
rKey = Registry.Users. OpenSubKey(szMa sterKey, True)
Case "HKEY_CURRENT_C ONFIG"
rKey = Registry.Curren tConfig.OpenSub Key(szMasterKey ,
True)
End Select
Catch ex As Exception
Return False
End Try
szDate = Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " &
Hour(Now) & ":" & Minute(Now)
szDateEnc = GenerateKey(szD ate)
Try
rKey.SetValue(s zDateValueName, szDateEnc)
rKey.SetValue(s zKeyValueName, szKeyValue)
rKey.Close()
Catch ex As Exception
rKey.Close()
Return False
End Try
Return True

End Function

Public Function GenerateKey(Opt ional ByVal szBaseString As String = "")
As String
Dim szOutput As String
Dim sHex As String
Dim sLen As Integer
Dim i As Integer
Dim nRet As String = ""

If szBaseString = "" Then szBaseString = GetBiosID()
szOutput = des.Encrypt(szB aseString)
sLen = szOutput.Length
For i = 0 To sLen - 1
sHex = Convert.ToStrin g(Hex(Asc(szOut put.Substring(i , 1))))
If sHex.Length < 2 Then sHex = "0" & sHex
nRet = nRet & sHex
Next
If nRet.EndsWith(" 3D3D") Then nRet = nRet.Substring( 0,
nRet.Length -
4)
Return nRet
End Function

Public Function DecryptKey(ByVa l szBaseString As String) As String

Dim nRet As String = ""
Dim sChar As String
Dim sLen As Integer
Dim i As Integer

sLen = szBaseString.Le ngth
For i = 0 To sLen - 1 Step 2
sChar = Chr("&H" & szBaseString.Su bstring(i, 2))
nRet = nRet & sChar
Next
Return des.Decrypt(nRe t)

End Function

Public Function GetBiosID() As String
Dim searcher As Object = New ManagementObjec tSearcher("SELE CT *
FROM
Win32_BIOS")
Dim info As ManagementObjec t
Dim nRet As String = ""

For Each info In searcher.Get()
nRet += info("manufactu rer").ToString( ) &
info("serialnum ber").ToString( )
Next
Return nRet

End Function

When I run this code in an application I get this:

System.NullRefe renceException was unhandled
Message="Object reference not set to an instance of an object."
Source="License Lib"
StackTrace:
at LicenseLib.Lice nse.SaveKeyToRe gistry(String szKeyValue)
at Sample_Ins.frmM ain.InstallRegi sterNewKey(Stri ng szClientName,
Boolean isMachineLinked , Int64 nHours) in
E:\LicenseCode\ Sample_Ins\Samp le_Ins\frmMain. vb:line 95
at Sample_Ins.frmM ain.btnSample_C lick(Object sender, EventArgs e) in
E:\LicenseCode\ Sample_Ins\Samp le_Ins\frmMain. vb:line 50
at System.Windows. Forms.Control.O nClick(EventArg s e)
at System.Windows. Forms.Button.On Click(EventArgs e)
at System.Windows. Forms.Button.On MouseUp(MouseEv entArgs mevent)
at System.Windows. Forms.Control.W mMouseUp(Messag e& m, MouseButtons
button, Int32 clicks)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.ButtonBas e.WndProc(Messa ge& m)
at System.Windows. Forms.Button.Wn dProc(Message& m)
at
System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage&
m)
at System.Windows. Forms.NativeWin dow.DebuggableC allback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows. Forms.UnsafeNat iveMethods.Disp atchMessageW(MS G&
msg)
at
System.Windows. Forms.Applicati on.ComponentMan ager.System.Win dows.Forms.Unsa feNativeMethods .IMsoComponentM anager.FPushMes sageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
at
System.Windows. Forms.Applicati on.ThreadContex t.RunMessageLoo pInner(Int32
reason, ApplicationCont ext context)
at
System.Windows. Forms.Applicati on.ThreadContex t.RunMessageLoo p(Int32
reason,
ApplicationCont ext context)
at System.Windows. Forms.Applicati on.Run(Applicat ionContext context)
at
Microsoft.Visua lBasic.Applicat ionServices.Win dowsFormsApplic ationBase.OnRun ()
at
Microsoft.Visua lBasic.Applicat ionServices.Win dowsFormsApplic ationBase.DoApp licationModel()
at
Microsoft.Visua lBasic.Applicat ionServices.Win dowsFormsApplic ationBase.Run(S tring[]
commandLine)
at Sample_Ins.My.M yApplication.Ma in(String[] Args) in
17d14f5c-a337-4978-8281-53493378c1071.v b:line 81
at System.AppDomai n.nExecuteAssem bly(Assembly assembly, String[]
args)
at System.AppDomai n.ExecuteAssemb ly(String assemblyFile, Evidence
assemblySecurit y, String[] args)
at Microsoft.Visua lStudio.Hosting Process.HostPro c.RunUsersAssem bly()
at System.Threadin g.ThreadHelper. ThreadStart_Con text(Object state)
at System.Threadin g.ExecutionCont ext.Run(Executi onContext
executionContex t, ContextCallback callback, Object state)
at System.Threadin g.ThreadHelper. ThreadStart()

When I attempt to debug, I never even get a registry value created. HELP
PLEASE!
--
Michael Bragg,
MS Authorized MAR
looking for used laptops for developmentally disabled.

Aug 17 '06 #2
Hi Michael,

The exception is a common one, for example, following code will throw
System.NullRefe renceException:

Dim s as String
s.ToLower()

it's because s is not initialized yet.

Without actual working code, there's many possibilities that your code may
throw the exception. Therefore if you could provide a more complete code
listing, we can help you diagnose which statement is causing the exception.

During debugging, the debugger should help you locate the statement that is
causing this exception, how are you currently debugging the application?

Sincerely,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Aug 17 '06 #3
I'm confused! I post the code block Project in my post and I'm asked to post
a more complete post in one response and in the previous response I'm told
posting the entire project is "TOO MUCH" code. Come on, please make up my
mind. I posted the entire project for the .dll and all of the exception that
is being thrown. I just want to get my project working and get on to the next
project.

The code that I posted is the code used to create or modify the registry.
Using RegMon from Systernals, I'm not seeing any attempt to even access the
registry with a create or modify. The program does however post the data to
the SQL Server database. I would also like the information stored on the
local machine, since that way it should reduce bandwidth to and from the
server.
_______________ _______________ _______________ _______________ _
Here is the code block where the registry creation fails:

'check if we succeed to register this new key for this client
'and this application on the our remote server
nRet = wsl.RegisterKey (szClientName, szBaseString, szEncKey,
szAppName, nHours)
If nRet = 0 Then ' success, new registration key as registered
on the remote server
'register the key locally
>>>>>lic.SaveKe yToRegistry(szE ncKey)
_______________ _______________ _______________ _______________ _______

lic.SaveKeyToRe gistry(szEncKey )

** NullReferenceEx ception was unhandled
Use the "new" keyword to create an object instance.
Check to dertermine if the object is null before calling the method.
Get general help for this exception

(szEncKey) is populated with the generated registry data

Upon viewing the Detail, the LicenseLib Project is the culprid and that is
what I posted in my original post.
Michael Bragg,
MS Authorized MAR
looking for used laptops for developmentally disabled.

Aug 17 '06 #4
Hi Michael,

From the stack trace of the exception, the exception is thrown from the
function SaveKeyToRegist ry. After going through the code of this function,
I do find some problem in the code:

Try
Select Case keyArray(0)
Case "HKEY_CLASSES_R OOT"
rKey = Registry.Classe sRoot.OpenSubKe y(szMasterKey, True)
Case "HKEY_CURRENT_U SER"
rKey = Registry.Curren tUser.OpenSubKe y(szMasterKey, True)
Case "HKEY_LOCAL_MAC HINE"
rKey = Registry.LocalM achine.OpenSubK ey(szMasterKey, True)
Case "HKEY_USERS "
rKey = Registry.Users. OpenSubKey(szMa sterKey, True)
Case "HKEY_CURRENT_C ONFIG"
rKey = Registry.Curren tConfig.OpenSub Key(szMasterKey , True)
End Select
Catch ex As Exception
Return False
End Try

From the documentation of RegistryKey.Ope nSubKey:

Rather than throwing an exception, a null reference (Nothing in Visual
Basic) is returned if the requested key does not exist.
This means a non-existing subkey will not raise exception, instead, a null
reference is returned. Therefore your Try-Catch block will not return False
as intended. You need to also check for the rKey value after the Try-Catch
block:

If rKey is Nothing Then Return False

Since I don't have a complete working project for your code, this is my
guess. If it's not the case, would you please take some time to create a
repro project and send it to me? Thanks.

By the way, you can easily add the LicenseLib project to your solution and
reference the project instead of compiled assembly, this way when the
exception is thrown, the debugger will locate the offending code.

Regards,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Aug 17 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
282
by: Alexander Pino | last post by:
Hiya, at this very moment I'm trying to write an XML Web Service for reading and writing configuration/registry settings. But for some reason I can read from the registry ('HKEY_LOCAL_MACHINE\SOFTWARE') but I do not seem to be able to create keys. The moment I call RegistryKey.OpenSubKey(whatever, true) or RegistryKey.CreateSubKey(whatever) a 'System.Security.SecurityException' is raised. and tells me 'Requested registry access is not...
0
3265
by: g82martin | last post by:
I am using the RegistryKey class to access the registry on remote machines. I only require read access. I am able to successfully read registry keys under HKLM\Software\Microsoft\Windows NT\CurrentVersion\HotFix but I get a permissions error when I try to access HKLM\Software\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx. The security permissions are identical on these two keys. Here is my code: RegistryKey...
1
3382
by: Brian Keating | last post by:
Hi there anyone know to the get the native registry Handle from a RegistryKey? thanks in advance
4
1478
by: Doug Bell | last post by:
Hi, I have a small application with a User Settings form I would like to give the Users the ability to (at any time) set the Application to load when the PC is started. Can someone point me in the direction of how to create a Short Cut and place it in the folder "C:\Documents and Settings\'User Name'\Start Menu\" or am I better off setting/unsetting a registry entry somewhere? (noting that most Users will not have Administrator...
0
10259
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10101
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9906
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8933
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7456
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.