Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 256
  • Last Modified:

Registry editing...

I made a program somewhat simillar to TweakUI in functionality only I noticed for options in the HKEY_LOCAL_MACHINE directory of the registry if you are a limited user you cannot edit the settings. So, I was wondering is there any possible way to enable a limited user to be able to edit settings in the HKEY_LOCAL_MACHINE directory of the registry as editing anything in HEKY_CURRENT_USER works fine (obviously). I'd appreciate any help, thanks!
0
Jmjl3
Asked:
Jmjl3
  • 2
  • 2
  • 2
  • +2
2 Solutions
 
gecko_au2003Commented:
Isnt there a registry key that applys settings to all users, so maybe use those keys to alter settings so that they take affect on all users including limited users as apposed to trying to write to keys that are denied access if your not on an admin account  ??
0
 
Jmjl3Author Commented:
Yes, that would be HKEY_LOCAL_MACHINE... I have this problem because people have complained to me asking why they can't edit certain things and it's becasue Limited users don't have access to the HLM section of the registry, I'm just hoping there is some way around it.
0
 
nmcdermaidCommented:
If the user profile doesn't have access to the registry, then there is no way that any application or manual intervention is going to let you edit it.

Otherwise you would have all kinds of viruses getting around it.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Shiju SasidharanAssoc Project ManagerCommented:
0
 
nmcdermaidCommented:
But this still won't work if the user running the app doesn't have rights in the registry.
0
 
Shiju SasidharanAssoc Project ManagerCommented:
yes , it wont lol
user must have enough permission to manupulate registry
0
 
nffvrxqgrcfqvvcCommented:
'If you know the Admin account and password then you can use this to impersonate...give it a try..
call logon when you want to impersonate and then call logoff when finished.


Declare Function RevertToSelf Lib "advapi32.dll" () As Long
Declare Function LogonUser Lib "advapi32.dll" Alias "LogonUserA" (ByVal lpszUsername As String, ByVal lpszDomain As String, ByVal lpszPassword As String, ByVal dwLogonType As Long, ByVal dwLogonProvider As Long, phToken As Long) As Long
Declare Function ImpersonateLoggedOnUser Lib "advapi32.dll" (ByVal hToken As Long) As Long

Const LOGON32_LOGON_INTERACTIVE = 2
Const LOGON32_PROVIDER_DEFAULT = 0

Public Sub Logon(ByVal strAdminUser As String, ByVal strAdminPassword As String, ByVal strAdminDomain As String)
 Dim lngTokenHandle, lngLogonType, lngLogonProvider As Long
 Dim blnResult As Boolean
 lngLogonType = LOGON32_LOGON_INTERACTIVE
 lngLogonProvider = LOGON32_PROVIDER_DEFAULT
 blnResult = RevertToSelf()
 blnResult = LogonUser(strAdminUser, strAdminDomain, strAdminPassword, lngLogonType, lngLogonProvider, lngTokenHandle)
 blnResult = ImpersonateLoggedOnUser(lngTokenHandle)
End Sub

Public Sub Logoff()
 Dim blnResult As Boolean
 blnResult = RevertToSelf()
End Sub
0
 
Jmjl3Author Commented:
Alright, well thanks for the tips anyways guys. I really appreciate all your help.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now