Hi all and thanks for reading this. I can read anywhere in the registry,
but I can't write to the local machine (XP Pro, I am not the admin.). My
application needs to write to the registry the registration code, but
because of the permissions thing, it won't let me. Any ideas on how I can
resolve this??
Many thanks,
Steve. 6 1443
Steve,
Security is there for a reason so you won't be able to. Can you use the
Current User Hive or alternatively use an XML file to hold your local
settings.
Doug
"stephen coleman" <st***************@ntlworld.com> wrote in message
news:kr************@newsfe1-gui.ntli.net... Hi all and thanks for reading this. I can read anywhere in the registry, but I can't write to the local machine (XP Pro, I am not the admin.). My application needs to write to the registry the registration code, but because of the permissions thing, it won't let me. Any ideas on how I can resolve this??
Many thanks, Steve.
Hi,
You need to specify you want the sub key to writeable when you
open it otherwise you get a security error.
Try
Dim hku As Microsoft.Win32.RegistryKey =
Microsoft.Win32.Registry.CurrentUser
Dim PreventFocus As Microsoft.Win32.RegistryKey = hku.OpenSubKey("Control
Panel\desktop", True)
PreventFocus.SetValue("ForegroundLockTimeout", 200000)
Catch ex As Exception
Trace.WriteLine(ex.ToString)
End Try
This gives security error.
Try
Dim hku As Microsoft.Win32.RegistryKey =
Microsoft.Win32.Registry.CurrentUser
Dim PreventFocus As Microsoft.Win32.RegistryKey = hku.OpenSubKey("Control
Panel\desktop")
PreventFocus.SetValue("ForegroundLockTimeout", 200000)
Catch ex As Exception
Trace.WriteLine(ex.ToString)
End Try
Ken
-------------------------
"stephen coleman" <st***************@ntlworld.com> wrote in message
news:kr************@newsfe1-gui.ntli.net...
Hi all and thanks for reading this. I can read anywhere in the registry,
but I can't write to the local machine (XP Pro, I am not the admin.). My
application needs to write to the registry the registration code, but
because of the permissions thing, it won't let me. Any ideas on how I can
resolve this??
Many thanks,
Steve.
Thanks all for your help, sorted!!
"stephen coleman" <st***************@ntlworld.com> wrote in message
news:kr************@newsfe1-gui.ntli.net... Hi all and thanks for reading this. I can read anywhere in the registry, but I can't write to the local machine (XP Pro, I am not the admin.). My application needs to write to the registry the registration code, but because of the permissions thing, it won't let me. Any ideas on how I can resolve this??
Many thanks, Steve.
Thanks all for your help, sorted!!
"stephen coleman" <st***************@ntlworld.com> wrote in message
news:kr************@newsfe1-gui.ntli.net... Hi all and thanks for reading this. I can read anywhere in the registry, but I can't write to the local machine (XP Pro, I am not the admin.). My application needs to write to the registry the registration code, but because of the permissions thing, it won't let me. Any ideas on how I can resolve this??
Many thanks, Steve.
Ken,
If you read Steve's question, he is trying to write to the Local Machine
Hive without Admin Privledges.
Doug
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:el**************@TK2MSFTNGP10.phx.gbl... Hi,
You need to specify you want the sub key to writeable when you open it otherwise you get a security error.
Try
Dim hku As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.CurrentUser
Dim PreventFocus As Microsoft.Win32.RegistryKey = hku.OpenSubKey("Control Panel\desktop", True)
PreventFocus.SetValue("ForegroundLockTimeout", 200000)
Catch ex As Exception
Trace.WriteLine(ex.ToString)
End Try This gives security error. Try
Dim hku As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.CurrentUser
Dim PreventFocus As Microsoft.Win32.RegistryKey = hku.OpenSubKey("Control Panel\desktop")
PreventFocus.SetValue("ForegroundLockTimeout", 200000)
Catch ex As Exception
Trace.WriteLine(ex.ToString)
End Try Ken
-------------------------
"stephen coleman" <st***************@ntlworld.com> wrote in message news:kr************@newsfe1-gui.ntli.net... Hi all and thanks for reading this. I can read anywhere in the registry, but I can't write to the local machine (XP Pro, I am not the admin.). My application needs to write to the registry the registration code, but because of the permissions thing, it won't let me. Any ideas on how I can resolve this??
Many thanks, Steve.
Ken,
If you read Steve's question, he is trying to write to the Local Machine
Hive without Admin Privledges.
Doug
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:el**************@TK2MSFTNGP10.phx.gbl... Hi,
You need to specify you want the sub key to writeable when you open it otherwise you get a security error.
Try
Dim hku As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.CurrentUser
Dim PreventFocus As Microsoft.Win32.RegistryKey = hku.OpenSubKey("Control Panel\desktop", True)
PreventFocus.SetValue("ForegroundLockTimeout", 200000)
Catch ex As Exception
Trace.WriteLine(ex.ToString)
End Try This gives security error. Try
Dim hku As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.CurrentUser
Dim PreventFocus As Microsoft.Win32.RegistryKey = hku.OpenSubKey("Control Panel\desktop")
PreventFocus.SetValue("ForegroundLockTimeout", 200000)
Catch ex As Exception
Trace.WriteLine(ex.ToString)
End Try Ken
-------------------------
"stephen coleman" <st***************@ntlworld.com> wrote in message news:kr************@newsfe1-gui.ntli.net... Hi all and thanks for reading this. I can read anywhere in the registry, but I can't write to the local machine (XP Pro, I am not the admin.). My application needs to write to the registry the registration code, but because of the permissions thing, it won't let me. Any ideas on how I can resolve this??
Many thanks, Steve. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Pat Blair |
last post by:
Sorry to anyone who read this post, but in case it's useful to anyone:
Further experiments reveal that while a tuple comes back if you read a
multi-line string, you set the value using a list (not...
|
by: Paul P |
last post by:
I am having a problem writing errors to the application log on a Windows 2003 server running IIS 6
The error message is "InvalidOperationException: Cannot open log for source {0}."
I have created...
|
by: msnews.microsoft.com |
last post by:
Hi all,
I was trying to find an easy way to write in the standard configuration
(like app.config) xml-based files. I found classes that can be used to read
this information (in...
|
by: glenn |
last post by:
I am trying to write to the registry and the objects that are suppose to be
handling this function are not working. Here is what is happening.
I am issuing the following commands:
RegistryKey...
|
by: Bry |
last post by:
I'm having problems writing (and reading) boolean data to the registry.
// Write a boolean value to the registry
// I've not included the obvious bits of code in these samples
bool myBool =...
|
by: UJ |
last post by:
I have a system that has five programs that all communicate with each other
via Message Queues. Works well. One program is a watchdog that will make
sure the others are up and going. Currently I...
|
by: Sreppohcdoow |
last post by:
I have a simple tool that I create that stores some settings in the
Registry... however, if the user running it doesn't have Admin priveleges on
the machine, the app fails when trying to write to...
|
by: Chris Mullins |
last post by:
I have an application that installs some 64-bit binaries for development use
in Visual Studio 2005. As such I want them to appear in the .Net References
menu when someone attempts to "Add...
|
by: Chris Mullins |
last post by:
I need to write to the 32-bit registry, and need to do so from a 64-bit MSI.
It never occurred to me that this would be difficult...
I have an application that installs some 64-bit binaries for...
|
by: projectVBA |
last post by:
Hi ,
I wrote some add in for PowerPoint and i'm trying to find an automatic way to load it every time PowerPoint starts.
I found Microsoft Code example (see below ) BUT the problem is :
I can't...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
| |