Hi all,

I asked this question a while back somewhere and I believe there were some pitfalls, but I'm wondering....

Instead of writing user specific values to HKCU, why instead couldn't I write them to HKEY_USERS/.DEFAULT? That way, they would be available for non-installing users that log on and run our app. Windows Installer wouldn't kick off a repair if one of the keys previously written to HKCU was a component key. At least that is how I think it would work.

My goal would be to move away from having repair run for non-installing users. Are app needs some stuff in HKCU and we're hesitant to move them to HKLM with stricter security on more recent OSs.

When I got a reply last time (I think it was an old post in a Wise forum when we used that product.) it wasn't so much that there were pitfall mentioned, I don't think, but it wasn't a common practice. I think that was the jist of the reply, but it was way back.

Just wondering if anyone undertakes this practice. I posted this same inquiry at Flexerasoftware/InstallShield as well. Sorry if you see both. [:-]

Any information or tips would be greatly appreciated.
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
I use the following script to do something similar to what you are talking about:

dim strAllUsersDesktopPath, strUserProfilesDefaultFolder, strUserProfilesAdminFolder, strFileExt, strSharWiz, strCheckBox
dim objWshShell

Set objWshShell = WScript.CreateObject("WScript.Shell")
strAllUsersDesktopPath = objWshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Common Desktop")
' Attempts to configure Windows 2000/XP paths.
strUserProfilesDefaultFolder = Mid(strAllUsersDesktopPath,1,InStr(strAllUsersDesktopPath, "\All Users"))
If strUserProfilesDefaultFolder = "" Then
' Attempts to configure Windows Vista/7 paths.
strUserProfilesDefaultFolder = Mid(strAllUsersDesktopPath,1,InStr(strAllUsersDesktopPath, "\Public"))
End If
'Load the Default User profile registry hive
objWshShell.Run ("reg.exe load HKEY_USERS\CustomizeDefaultUserProfile """ & strUserProfilesDefaultFolder & "Default User\NTuser.dat"""), 0, True
'Set the registry key to turn off the Hidden File Extension folder option
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", "0","REG_DWORD"
'Set the registry key to turn off the Sharing Wizard folder option
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\SharingWizardOn", "0","REG_DWORD"
'Set the registry key to turn off Use Check Boxes to Select Items
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\AutoCheckSelect", "0","REG_DWORD"
'Set the registry key to remove Default Programs from the Start Menu
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_ShowSetProgramAccessAndDefaults", "0","REG_DWORD"
'Set the registry key to Show Recent Documents in the Start Menu
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_ShowRecentDocs", "1","REG_DWORD"
'Set the registry key to Hide My Music from the Start Menu
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_ShowMyMusic", "0","REG_DWORD"
'Set the registry key to Hide My Games from the Start Menu
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_ShowMyGames", "0","REG_DWORD"
'Set the registry key to Show Downloads on the Start Menu
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_ShowDownloads", "0","REG_DWORD"
'Set the registry key to Hide My Pictures from the Start Menu
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_ShowMyPics", "0","REG_DWORD"
'Set the Control Panel View to Small Icons
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\StartupPage", "1","REG_DWORD"
'Show My Computer on All User's Desktop
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel\{20D04FE0-3AEA-1069-A2D8-08002B30309D}", "0","REG_DWORD"
'Show On Screen Keyboard on Right Side of Screen
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\TabletTip\1.7\EdgeTargetOnLeft", "0","REG_DWORD"
'Unload the Default User profile registry hive
objWshShell.Run ("reg.exe unload HKEY_USERS\CustomizeDefaultUserProfile"), 0, True

'Make Changes to the Installation (Administrator) Account
'Set the registry key to turn off the Hidden File Extension folder option
objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", "0","REG_DWORD"
'Set the registry key to turn off the Hidden File Extension folder option
objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", "0","REG_DWORD"
'Set the registry key to turn off the Sharing Wizard folder option
objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\SharingWizardOn", "0","REG_DWORD"
'Set the registry key to turn off Use Check Boxes to Select Items
objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\AutoCheckSelect", "0","REG_DWORD"
'Set the registry key to Show Downloads on the Start Menu
objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_ShowDownloads", "0","REG_DWORD"
'Set the registry key to Hide My Pictures from the Start Menu
objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_ShowMyPics", "0","REG_DWORD"
'Set the Control Panel View to Small Icons
objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\StartupPage", "1","REG_DWORD"
'Show My Computer on Desktop
objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel\{20D04FE0-3AEA-1069-A2D8-08002B30309D}", "0","REG_DWORD"
'Show On Screen Keyboard on Right Side of Screen
objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\TabletTip\1.7\EdgeTargetOnLeft", "0","REG_DWORD"


This being the portion that loads the hive you're referencing:

'Load the Default User profile registry hive
objWshShell.Run ("reg.exe load HKEY_USERS\CustomizeDefaultUserProfile """ & strUserProfilesDefaultFolder & "Default User\NTuser.dat"""), 0, True
Answered 02/03/2011 by: dyehardfan
Second Degree Blue Belt

Please log in to comment
0
That key is used to create profiles for new users logging in locally to the machine. If your users are logging in to a domain, that key is not used. That is why Active Setup exists.
Answered 02/03/2011 by: VBScab
Red Belt

Please log in to comment
0
Yes, I was pointed to an Active Setup post here on AppDeplooy. I'm a bit confused with it though. Is it just a way to side-step or an alternative to having Windows Installer just run the repair visibly?

My app currently is launched from an Advertised Shortcut so I'm wondering, if Active Setup is deemed a good approach, if I would have to change the shorcut back to a non-advertised shortcut.

Or, is this how the whole thing works... User logs in, the two registry entries are compared, if needed a repair is run. After this, the user then could launch from whatever type of shortcut and and all HKCU keys will be in place so another repair wouldn't be fired. If this is how it works, I would think this might enongate the login time a bit.

I also read that you could fire off an .exe installed with the product instead of doing a full repair. If this is possible I would think it might be quicker than a full repair -> exe to just directly write the registry stuff needed. What context would this be running in at this point?

There were some posts on flexerasoftware regarding alternatives and one of them was to write a Custom Action to push user 'stuff' to each individual profile/HKCU area. That could work, if its possible, but I would have to hunt down some code samples to do that. I guess I could then fire that off in system context.

An uninstall action would then be needed to clean up everything not meant to be permanent.

The only user specific stuff we have is some registry keys and a folder that is created in the users profile. This directory contains a desktop.ini file to display an icon folder.

Any points to some code is greatly appreciated!
Answered 02/03/2011 by: Superfreak3
Black Belt

Please log in to comment
0
In packaging, AS is used to deploy user profile stuff for packages which have no advertised entry-point.

"Quicker", "full repair"...remember that, if your feature tree is built properly, only the feature with the missing component gets repaired.
Answered 02/04/2011 by: VBScab
Red Belt

Please log in to comment
0
Does it repair the full feature containing the broken component or just the component with the broken key?
Answered 02/04/2011 by: Superfreak3
Black Belt

Please log in to comment
0
Check out Ed Tippelt's article on self-healing.
Answered 02/04/2011 by: VBScab
Red Belt

Please log in to comment
0

Just to throw this out here, that registry key is not what you think it is:

 

The .Default user is not the default user

http://blogs.msdn.com/b/oldnewthing/archive/2007/03/02/1786493.aspx

Answered 04/11/2014 by: habeebtc
Senior Yellow Belt

Please log in to comment
0
Hi, I don't  know if the issue's resolved (or even what platform you're on), but this (Toussaint OTTAVI's Win7 ProfileTool) may prove to be of interest

Blurb:

With the good old Windows XP, there was a feature called "copy profile". You just had to define your standard settings just like a standard user would do, then copy this user profile into the "default user" profile, so that all the future users of the machine will get all your settings automatically.

Unfortunately, Microsoft removed this feature in Windows 7. Don't try to understand why. The official answer is : "You should not use the copy profile feature, you should use the deployment tools instead". This is a very common behavior from this company. Microsoft usually tries to impose their vision of things instead of proposing it. 

Of course, Microsoft proposes a lot of tools / features to achieve the same goal. Among them : SysPrep, Group Policies, Logon scripts. All these are complex tools, that suit complex needs, if you have several hundreds of machines, and maybe several hundreds of hours to spend. But none of them can do simple things, such as setting up quickly a few machines.

That's the reason why I decided to write this tool.
Answered 03/25/2015 by: i@mJonny
White Belt

Please log in to comment
Answer this question or Comment on this question for clarity