Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

HKEY_Current_users key for all users

Posted on 2012-04-05
9
Medium Priority
?
849 Views
Last Modified: 2012-04-05
Hi,

How Can I save a register key that must be stored in

[HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\excel\...]

For all Users that logon in this machine?

Regards
0
Comment
Question by:lnrivera
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
9 Comments
 
LVL 17

Expert Comment

by:Anuroopsundd
ID: 37810253
can you provide more information about the key and settings. it will be helpful as their are some keys which are just for Current user and other can be set by Local Machine.
0
 

Author Comment

by:lnrivera
ID: 37810315
I have this issue  http://support.microsoft.com/kb/2570623   and I fix it with the manual solution (I attach a copy in the end of the email)

The question is that the solution only work for the current user, if any other user logon in this machine, I need to do again the the fix for each user.


"You can use the EnableOnLoad registry entry to configure how you want Excel to handle opening workbooks for the OFV. By default, the EnableOnLoad entry is not present in the Windows registry. To add the EnableOnLoad entry to the Windows registry, follow these steps:
1.Exit Excel.
2.Click Start, click Run, type regedit, and then click OK.
3.Locate and then click to select the following registry key:

HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\
4.After you select the key that is specified in step 3, point to New on the Edit menu, and then click Key.
5.Type Excel, and then press ENTER.
6.Select Excel, point to New on the Edit menu, and then click Key.
7.Type Security, and then press ENTER.
8.Select Security, point to New on the Edit menu, and then click Key.
9.Type FileValidation, and then press ENTER.
10.Select FileValidation, point to New on the Edit menu, and then click DWORD Value.
11.Type EnableOnLoad, and then press ENTER.
Note: The default value is 0 which disables the validation.
12.On the File menu, click Exit to quit Registry Editor."
0
 
LVL 17

Expert Comment

by:Anuroopsundd
ID: 37810444
so as i understand you want a registry key as below
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\Security\FileVaidation\
and then DWORD Value ....Enable on Load with value 0

am i right?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:lnrivera
ID: 37810488
Exactly
0
 
LVL 17

Accepted Solution

by:
Anuroopsundd earned 2000 total points
ID: 37811587
Function RegistryKaySet (subkey)
Const HKEY_USERs = &H80000003
strComputer = "."
Set oReg = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
       
strKeyPath = "SOFTWARE\Microsoft\Office\11.0"
oReg.CreateKey HKEY_USERS,subkey&"\"&strKeyPath
strKeyPath = "SOFTWARE\Microsoft\Office\11.0\Excel"
oReg.CreateKey HKEY_USERS,subkey&"\"&strKeyPath
strKeyPath = "SOFTWARE\Microsoft\Office\11.0\Excel\Security"
oReg.CreateKey HKEY_USERS,subkey&"\"&strKeyPath
strKeyPath = "SOFTWARE\Microsoft\Office\11.0\Excel\Security\FileValidation"
oReg.CreateKey HKEY_USERS,subkey&"\"&strKeyPath

strKeyPath = "SOFTWARE\Microsoft\Office\11.0\Excel\Security\FileValidation"
strValueName = "Enable on Load"
strValue= 0

oReg.SetDWordValue HKEY_USERS,subkey&"\"&strKeyPath,strValueName,strValue
End Function

    Const HKEY_LOCAL_MACHINE = &H80000002

    strComputer = "."
 
    Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
        strComputer & "\root\default:StdRegProv")
 
    strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\"
    oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
 
    For Each subkey In arrSubKeys
RegistryKaySet(subkey)
    Next
0
 
LVL 17

Expert Comment

by:Anuroopsundd
ID: 37811590
Save above Code as file.Vbs and run it....
this will create entry for all the users profile under the HKEY_USERS.
so when the user login he should get the key already.

took some time to think for best solution... :)
0
 

Author Comment

by:lnrivera
ID: 37811774
Thanks, but I thionk that when a new user logon for the first time has the same problem, in case that a new user, this new account hasn't got the registry key
0
 
LVL 17

Expert Comment

by:Anuroopsundd
ID: 37811785
entry is also made on HKLM so new user should also get the key  for new profile...
0
 
LVL 17

Expert Comment

by:Anuroopsundd
ID: 37811807
I mean entry can be made to HKLM and .Default profile so that new profile also have this entry by default.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question