Autorun keys for new users and/or add registry keys to HKEY_CURRENT_USER

its rather simple, create an entry in the “HKEY_LOCAL_MACHINESOFTWAREMicrosoftActive SetupInstalled Components” key. the entrees in this key is the stuff you se in the upper left hand corner during first log on. (the Personalized Settings box). Most if not all entries in this key will be in the GUID format, but it does not have to be..

Open REGEDIT and follow the instructions below.

image Right click Installed Components and click New KEY, and name the key {Z-UserSetup}. NOTE: The different keys are executed in number and alphabetical order, so to make sure our key is executed last we name it Z-“something” and put it in { }. Everything not in curly braces wile be executed first.
image In the new key create two new String Values (REG_SZ) and name them
StubPath and
Version. StubPath has info on what we want to run, and could be any executable, script, run.dll e.t.c. Version will show in the Installed Components section in CURRENT_USER

(Default) will be the info showed in the Personalized settings box during logon. (can also be sat as @=”info”)

Now just reboot and log on with a different user, and notepad will be executed during logon.

If you want to set this with a script ,then here small one for disabling the Windows Media Player wizard.

Set oShell = CreateObject("WScript.Shell") 

RegPath="HKEY_LOCAL_MACHINESOFTWAREMicrosoftActive SetupInstalled Components{Z-UserSetup}"
oshell.RegWrite Regpath & "Stubpath", "reg.exe add HKCUSOFTWAREMicrosoftMediaPlayerPreferences _
/v AcceptedPrivacyStatement /t REG_DWORD /d 1 /f", "REG_SZ"
oshell.RegWrite Regpath & "Version", "1.00", "REG_SZ"
oshell.RegWrite Regpath & "@", "Accept MP Privacy Statement", "REG_SZ"

you can add as many as you want, just remeber the execution order.

Feel free to comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.