JIT Setup - really nice feature and most people dont know about it!
Well, when I talked with Noise in discussion under one of my previous posts, I decided I will write something about this feature. It is called Active Setup.
When new user logged on first time, their profile is created from Default user and ntuser.dat from default user... However there are some things that you cant find in default user - for example icons for Outlook Express. Most administrators dont want to have these icons - mostly because they are using more robust email client like outlook.
Most of these administrators just left them where they are. However how are these icons created?
When you look to HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components, you will see a pack of GUIDs -
every GUID here means what to do when new profile is created. The most important value is StubPath - it is path to command to execute. When this is not available, it will just ignore it.
Lets try small experiment - first locate key {6BF52A52-394A-11d3-B153-00C04F79FAA6} - it is key responsible for creating WMP icon. When you change the name of StubPath (for example DisableStubPath), the icons wont create. Neat, right? :)
Now you know how to disable certain components - however there is of course another use for them - you can create new!
For example you have application, that is using per-user settings. You want to specify default settings and you cant use HKLM\All users.
If you dont know how to create GUID, you can use my script:
strGuid = Left(CreateObject("Scriptlet.TypeLib").Guid, 38)
strInterpreter = Wscript.FullName
strInterpreter = InStr(strInterpreter,"cscript")
If strInterpreter = 0 Then
InputBox "Generated GUID:", "GUID Generator", strGuid
Else
Wscript.Echo strGUID
End If
- create new key containing GUID.
- create file test.cmd with content “mkdir c:\test“ in c:\temp
- create value StubPath with path to your script, that will create this settings. In our example it will be “C:\Temp\test.cmd“
- create value ComponentID with any name you prefer. For example “Test active setup“
- Last needed value is IsInstalled. It should be REG_DWORD with value 1.
Now try to log as new user... Is it working? :)