VBS script or method for writing "logged in user" HKCU keys , while installing under system context
I had a script that a packager I contracted with gave me, and I lost my backup data. He had a VBS script for writing "logged in user" HKCU keys , while installing under system context. Example: SCCM deployment(system) installing an msi that writes HKCU keys, and add the VBS script to add the keys to the current logged in user, NOT the system account.Any help appreciated
thanks and regards,
Please log in to answer
Posted by: EdT 5 years ago
The key may exist under HKey_Users even if the user is not logged in. Also, the solution may depend on whether the user has a local or roaming profile. Are there no apps in production that use this script that you could recover the script from?
Finally, you don't actually need to log a user off to force active setup. Just kill the explorer tasks and restart explorer. Generally doesn't get noticed too much by users unless they are actually navigating the file system with an explorer session when it happens. However, as VBScab mentioned, if there is an advertised entry point in the app, you can use self healing to populate the user profile. Even if there isn't, it's not that difficult to find a way of adding one.
Posted by: GAKIS 5 years ago
Scripts will only be able to write to users that already have profiles created.
The best way is to create a transform for the msi file with active setup:
Details can be found here: http://blogs.msdn.com/b/aruns_blog/archive/2011/06/20/active-setup-registry-key-what-it-is-and-how-to-create-in-the-package-using-admin-studio-install-shield.aspx
Posted by: anonymous_9363 5 years ago
"No! Stop! Don't do it!
"I can't...stop...myself! www.lmgt....Nooooooooooooooooooo! Mustn't..."
Anyway, back to avoiding the script at all costs...
If the MSI contains even a single shortcut or other entry-point capable of being advertised, you can convert that to an advertised shortcut and use self-healing to propagate user data. Search for John McFadyen's excellent article on self-healing.
Do it the right way,not the kludged way!