Jump to content

How can i prevent the installation of default favorites?


Recommended Posts

Hi, I was wondering if i just add this entry on winnt.sif will it disable installing favorites for all users?

[FavoritesEx]

currently i use the following on batch.cmd GuiRunOnce

however when i create a new user the default favorites are installed again.

ATTRIB -S -H -R "%userprofile%\Favorites" /S /D

DEL /S /Q "%userprofile%\Favorites\*.url"

DEL /S /Q "%userprofile%\Favorites\Links\*.url"

please advice , thanks

Link to comment
Share on other sites


The "hidestubpath" surpresses the just-in-time setup when creating new users.

To remove Outlook Express import this registry key.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\>{881dd1c5-3dcf-431b-b061-f3f88e8be88a}]
@="Outlook Express"
"ComponentID"="OEACCESS"
"Dontask"=dword:00000002
"IsInstalled"=dword:00000000
"Locale"="*"
"Version"="2,0,0,0"
"StubPath"=-
"HideStubPath"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,\
00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,\
73,00,68,00,6d,00,67,00,72,00,61,00,74,00,65,00,2e,00,65,00,78,00,65,00,20,\
00,4f,00,43,00,49,00,6e,00,73,00,74,00,61,00,6c,00,6c,00,55,00,73,00,65,00,\
72,00,43,00,6f,00,6e,00,66,00,69,00,67,00,4f,00,45,00,00,00

To remove Outlook Express Mail and News feature:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{44BBA840-CC51-11CF-AAFA-00AA00B6015C}]
"Version"="6,0,2900,2180"
@="Microsoft Outlook Express 6"
"IsInstalled"=dword:00000001
"Locale"="EN"
"ComponentID"="MailNews"
"CloneUser"=dword:00000001
"StubPath"=-
"HideStubPath"=hex(2):22,00,25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,\
00,69,00,6c,00,65,00,73,00,25,00,5c,00,4f,00,75,00,74,00,6c,00,6f,00,6f,00,\
6b,00,20,00,45,00,78,00,70,00,72,00,65,00,73,00,73,00,5c,00,73,00,65,00,74,\
00,75,00,70,00,35,00,30,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,41,00,\
50,00,50,00,3a,00,4f,00,45,00,20,00,2f,00,43,00,41,00,4c,00,4c,00,45,00,52,\
00,3a,00,57,00,49,00,4e,00,4e,00,54,00,20,00,2f,00,75,00,73,00,65,00,72,00,\
20,00,2f,00,69,00,6e,00,73,00,74,00,61,00,6c,00,6c,00,00,00

To remove Internet Explorer Windows Marketplace:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{4b218e3e-bc98-4770-93d3-2731b9329278}]
@="Internet Explorer"
"ComponentID"="Windows Marketplace Link"
"IsInstalled"=dword:00000001
"Locale"="EN"
"Version"="1,0,0,0"
"StubPath"=-
"HideStubPath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,\
00,74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,\
72,00,75,00,6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,65,00,20,\
00,73,00,65,00,74,00,75,00,70,00,61,00,70,00,69,00,2c,00,49,00,6e,00,73,00,\
74,00,61,00,6c,00,6c,00,48,00,69,00,6e,00,66,00,53,00,65,00,63,00,74,00,69,\
00,6f,00,6e,00,20,00,4d,00,61,00,72,00,6b,00,65,00,74,00,70,00,6c,00,61,00,\
63,00,65,00,4c,00,69,00,6e,00,6b,00,49,00,6e,00,73,00,74,00,61,00,6c,00,6c,\
00,20,00,38,00,39,00,36,00,20,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,\
72,00,6f,00,6f,00,74,00,25,00,5c,00,69,00,6e,00,66,00,5c,00,69,00,65,00,2e,\
00,69,00,6e,00,66,00,00,00

To remove Messenger 4.7:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{5945c046-1e7d-11d1-bc44-00c04fd912be}]
"KeyFileName"="C:\\Program Files\\Messenger\\msmsgs.exe"
"Version"="4,7,0,3000"
"Locale"="EN"
"ComponentID"="Messenger"
"IsInstalled"=dword:00000001
@="Windows Messenger 4.7"
"StubPath"=-
"HideStubPath"=hex(2):72,00,75,00,6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,\
00,78,00,65,00,20,00,61,00,64,00,76,00,70,00,61,00,63,00,6b,00,2e,00,64,00,\
6c,00,6c,00,2c,00,4c,00,61,00,75,00,6e,00,63,00,68,00,49,00,4e,00,46,00,53,\
00,65,00,63,00,74,00,69,00,6f,00,6e,00,20,00,25,00,53,00,79,00,73,00,74,00,\
65,00,6d,00,52,00,6f,00,6f,00,74,00,25,00,5c,00,49,00,4e,00,46,00,5c,00,6d,\
00,73,00,6d,00,73,00,67,00,73,00,2e,00,69,00,6e,00,66,00,2c,00,42,00,4c,00,\
43,00,2e,00,49,00,6e,00,73,00,74,00,61,00,6c,00,6c,00,2e,00,50,00,65,00,72,\
00,55,00,73,00,65,00,72,00,00,00

To remove Address Book 6:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{7790769C-0471-11d2-AF11-00C04FA35D02}]
"Version"="6,0,2600,0000"
@="Address Book 6"
"IsInstalled"=dword:00000001
"Locale"="EN"
"ComponentID"="WAB"
"StubPath"=-
"HideStubPath"=hex(2):22,00,25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,\
00,69,00,6c,00,65,00,73,00,25,00,5c,00,4f,00,75,00,74,00,6c,00,6f,00,6f,00,\
6b,00,20,00,45,00,78,00,70,00,72,00,65,00,73,00,73,00,5c,00,73,00,65,00,74,\
00,75,00,70,00,35,00,30,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,41,00,\
50,00,50,00,3a,00,57,00,41,00,42,00,20,00,2f,00,43,00,41,00,4c,00,4c,00,45,\
00,52,00,3a,00,57,00,49,00,4e,00,4e,00,54,00,20,00,2f,00,75,00,73,00,65,00,\
72,00,20,00,2f,00,69,00,6e,00,73,00,74,00,61,00,6c,00,6c,00,00,00

Edited by mc134
Link to comment
Share on other sites

however when i create a new user the default favorites are installed again.

Dear illusions,

You're facing this problem just because you're only Removing Favorites from the USERPROFILE. And not Applying that into the Default User Profile. Thanks to the Cerebral Genius of our mate Boasoft, you can do these, and I request you do these as late as just before the Final Reboot from Cleanup.cmd(or whatsoever name you call it)

REM Copy Administrator Profile to Default User

REM Delete Old Default User profile

RD /S /Q "%SystemDrive%\Documents and Settings\Default User"

REM Copy Current User(Administrator) Profile to Default User Profile

XCOPY "%USERPROFILE%\*.*" "%SystemDrive%\Documents and Settings\Default User" /E /C /I /H /R /K /Y

REM Delete Some Unneeded Files

DEL /F /Q "%SystemDrive%\Documents and Settings\Default User\*.*"

REM ReStore Default Attributes

ATTRIB +H "%SystemDrive%\Documents and Settings\Default User" /S /D

REM Locked NTUSER.DAT File Can't be Directly Copied

REM Use REG Tools to Save Current User's(Administrator) Registry to File

START /WAIT reg save HKCU "%SystemDrive%\Documents and Settings\Default User\NTUSER.DAT"

REM Set Default Attributes to Default User Hive

ATTRIB +H +S "%SystemDrive%\Documents and Settings\Default User\NTUSER.DAT" /S

By doing so you are saving your finally edited Admin Profile as the Default User Profile. So, next time whenever a new user account is created, it'll not face any "Favoritism"! :D

I hope this helps.

MOONLIGHT SONATA

Link to comment
Share on other sites

OMG MOONLIGHT SONATA!

DO NOT DO THAT!

You can't just copy over a users registry hive into the defaut users. Man, I've seen some crazy s*** before, but doing stupid things like this will really cause weird things to happen in Windows later.

Now, instead of slapping you across the forehead for spreading bad advice, let me explain it to you. A users hive (HKCU) is just chock full of things called Security Identifiers (SIDS). These SIDS are unique to ever user on a system. The Defaut User profile has a special registry hive where the SIDS are set to be changed. REG_EXPAND_SZ instead of REG_SZ.

In addition, every user you create will have their internal file/directory pointers pointing to the Administrator users location. Windows may repair some of these - but not all.

There are other issues that I will not get into because they take too long to explain. Suffice it to say - DO NOT DO THAT!@

Link to comment
Share on other sites

Nois3

Will you write a guide on Default User Profile and How to Manipulate It to User Advantage? You know and you may not know that GreenMachine's Evergreen Article named "Customizing the Default User's Profile" has still not lost an iota of Chlorophyll. There he wrote:

Whenever a user profile is created, Windows copies the user profile template, the Default User Profile, to a sub-directory of the Documents and Settings directory, with the name of the user. In order to present each new user with a profile that is customized to our requirements, we must edit this Default User Profile. This is done with relative ease during the GUI section of setup, as the Default User Profile is the active profile, and any changes made to the HKCU section of the registry (the section that determines individual settings) will be saved and perpetuated to all subsequent users.

The two main areas of Profile Customization are the user's visual settings (how the explorer is laid out, quick launch bar, default icon style, etc.) and shortcut creation and placement.

Again in the end he wrote:
Repalcing the Default User Profile (NTUSER.DAT) with a preconfigured version

One other option would be to preconfigure both the user settings (NTUSER.DAT) and other files (desktop, quick launch, send to, etc.) and copy these to the new installation. This cannot, however, be done from the GUI section of setup, as these files are in use at this time. The solution would be to automatically boot into the Administrators account after setup has completed, and run the necessary commands to copy these files over the original Default Profile files. The disadvantage of this method is that the administrator account, which was created before the Default User Profile was modified, will not have these settings.

Finally, take a look at Copy Admin profile to Default user, How can I make it? where Boasoft posted his code. Look at the dicussions there and see how many people achieved success with it. In same breath, I advice you to browse Windows XP SP2 Post Install Script Pack V1.02, particularly the introductory post by Roguespear where he included such thing into his script bundle.

Discussions in this context will continue; After you look at those.

Finally, about your use of language in reference to me; well, it's my misfortune that I've come across you tonight. I hope there'll be a better tommorrow for me.Computing is not the first language we're taught. Certainly, next day someone will come across me with better use of his first language.

@illusions

I still say you'll face no problem after doing that. Living in illusions is better than living in shadow of nightmares. Just pass by the comment of Nois3 for the moment; try it and let us know what you feel.

MOONLIGHT SONATA

Link to comment
Share on other sites

@illusions

Why not just remove the %SystemDrive%\Documents and Settings\Default User\Favorites folder? When anew user is created he/she inherits everything that has been set within %SystemDrive%\Documents and Settings\Default User. Beside, all you want to do is avoid getting the standard favorites for every new user so there is no point in removing the default hive.

As Nois3 pointed out it is not a good idea to completely overwrite the registry hive for the default user as most of the entries are kept in such a way so that they will be redirected to the correct place once the new account is active.

There are guides that tell you that this is fine, as MOONLIGHT SONATA pointed out, so it is up to you to try and see how each method affects your system/settings. In my experience with 2k distribution of profiles, there are going to be plenty of references to the 'Administrator' if you overwrite the default user hive with the administrator's hive. There is a nice article to read about the default user profile. The same principles hold for an isolated workstation, although that guide was written with a domain in mind

Still I think that removing the above folder/emptying its contents is the best way to go ...

CF

Link to comment
Share on other sites

MOONLIGHT SONATA,

Understanding how user profiles are created is one of the most difficult aspects of supporting Windows. I have been supporting Microsoft products since the late '80's (really). Many people think they understand it, but they really only understand a part of it. This particular issue I ran into personally many many years ago in NT4. I thought I had it figured out, but I did not.

The best way (and only way I do it) to modify the Default User profile is to load clean registry files during the cmdlines.txt phase of an automated installation. By clean registry files I mean they have been manually edited to remove any superfluous crap that may have been included during their creation. They contain the bare minimum needed to complete the desired setting.

If you wish to copy a user profile from one user to another (or the Default User), there is another way. However, I do not recommend it as I have also had issues arise with this method. You must use the "Copy to" function in (XP) Control Panel/System Properties/Advanced/User Profiles/Settings. This "Copy To" function does not just copy. It clears out and resets the appropriate registry keys (and there are many of them) from the source profile. This avoids the problems with duplicate GUIDS and SIDS in the destination and sets reg_sz keys back to reg_expand_sz. Most importantly, it resets the security settings on the registry keys - Remember, registry keys have access rights, much as the NTFS filesystem has access rights.

I could write a book on this subject, but I have neither the inclination nor the time. Frankly I've argued with a few "experts" here and have no wish to support my ego by trying to prove myself right, I know I'm right. I've supported thousands of desktops over the years and when I'm wrong it slaps me in the face.

I have nothing but respect for the abilities of both GreenMachine and RogueSpear, especially with regards to their scripting ability. But understanding how Microsoft implements registry hives is a black art and 99% of the "experts" I've ran into do not fully understand it. You may (as you have) do something that seems to work OK. No errors will show up immediately, nothing immediately strange happens.

However, later on problems will arise - especially in areas of cryptography and users rights. These errors will manifest themselves in strange ways. Things like "duplicate user", "invalid path" and "invalid credentials" may pop up. You may have an inability to access certain areas of the registry or may have inadvertently loosened your security settings. Errors will be especially apparent when you create a non-administrative user account. Or you may see no problems at all because you got lucky. It depends on how you use your PC.

PS. I apologize for my tone in my last message. I have a tendency to be an arrogant hothead :)

Link to comment
Share on other sites

@Nois3

Sounds like you know your sh*t...I'm jealous!

I picked up on your points about loading fresh reg setting via cmdlines.txt. I am very interesting in knowing more about this...specificially, I want to try and create as basic a user profile as I can. I'm looking to use that as the default profile, and then do all reg customizing after the fact via scripts and all that noise. But I've never really found any info that specifies what are the minimum entries/values to create a profile.

Link to comment
Share on other sites

Nois3

I apologize for my tone in my last message. I have a tendency to be an arrogant hothead.

This is the most surprising part of life and the most amazing shocker are our own lives; today, i find none other than you, who comes across me with the better language that i expected yesterday from someone for today.. Thanks, mate. I like you.

About, Profiles, tomorrow I'll comment, it's still past midnight in my time zone. Little sleepy my profile right now.

See you tomorrow. :D

MOONLIGHT SONATA

Link to comment
Share on other sites

InTheWayBoy,

Here's a brief description of how I do it.

First. You create a bunch of small registry files that are given to a certain task. Here are two samples:

TempDir.reg

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Environment]

"TEMP"="c:\\Temp"

"TMP"="c:\\Temp"

NumberLock.reg:

Windows Registry Editor Version 5.00

[HKEY_USERS\.DEFAULT\Control Panel\Keyboard]

"InitialKeyboardIndicators"="2"

This method is better than having all your registry settings in one big reg file. For example, if you wanted to modify your installation for a laptop computer you would just delete NumberLock.reg before you create your CDROM. Trust me, you don't want to enable NumberLock on laptop's it will drive you crazy.

Once you get all your reg files done (I have 83 of them) put them all into a directory in your $OEM$, For example:

CDROOT\$OEM$\C\INSTALL\SETTINGS

This will create a directory on the destination C: drive with all the registry files in it (C:\INSTALL\SETTINGS). Now all we have to do is load them during cmdlines.txt. Here's how I do it...

First, a simple cmd file to loop through all the reg files and load them:

CDROOT\$OEM$\SETREG.CMD

@echo off

echo *** Default Registry Settings

for %%i in (C:\INSTALL\SETTINGS\*.reg) do regedit /s "%%i"

Then, we tell cmdlines.txt to run the above script:

CDROOT\$OEM$\CMDLINES.TXT

[Commands]

".\SETREG.CMD"

And that's it. Every profile created on the new PC will have these registry settings incorporated in it. If you need to add a registry setting later, just throw the reg file into the settings directory.

Link to comment
Share on other sites

@Nois3, I must agree with 99% of your sayings, and i loved the clear way you explained it. :thumbup

The only peanut remaining is about the Default User being the Current User during install.

From what I experimented and found in the registry itself (you may have a look at HKLM\SYSTEM\CurrentControlSet\Control\hivelist), during install the Current User hive (HKCU) is not mapped to the NTUSER.DAT located in the Default User's profile dir.

It is rather mapped to a default system hive, used by windows when No User is logged in. This hive is better known by the name of HKU/.DEFAULT in the registry, and it is mapped to a file simply called 'default', located in %systemroot%\system32\config\ (see the above key).

At the end of windows setup (EDIT: this happens right after T12*), a copy of this hive is transfered (the right way, obviously !) to make the Default User one, in its profile dir. That's why setting applied to HKCU or to HKU/.DEFAULT at T12 are indeed also found in the Default User's hive later.

But those settings still remain in the No User hive (HKU/.DEFAULT) where they have nothing to do, especially as they are intended for when a user is logged in.

A first concern is that it is just plain not-very-clean. Maybe InTheWayBoy would also want to consider this.

A second one is about security, as you pointed out, with the mixing of setting made for one situation (a user logged in) with those made for another situation (no user logged in). But for this I have no clue**.

Now, a simple experiment to confirm what I said, is to open a CMD window during install in order to have some control ('cmd.exe /K', called from cmdlines.txt at T12, or even better from DetachedPrograms at T39 so you have plenty of time), to import a test key to HKCU (reg add ...), and to look in regedit.exe where is your test key.

BTW, feel free to try to load the NTUSER.DAT hive from the Default User's profile dir during setup, in order to check what's in it ;) .

* I launched the following command from a batch called by cmdlines.txt and no NTUSER.DAT in the result:

DIR /A:H "C:\Documents and Settings\Default User" 1>c:\dir.txt

Then I manually ran the same DIR command from a CMD prompt launched @T39. I did it a few successive times from a bit before T12, and the hive appeared right after T12.

**For example, I'm just wondering about those settings I have to import to HKCU at T12 in order to lower security for allowing unsigned programs to be installed unattendedly.

Edited by Djé
Link to comment
Share on other sites

Djé,

Just do it like I said. Quit over thinking things. During cmdlines.txt things are not what they seem... magic can occur.

Don't edit your reg files and replace HKEY_CURRENT_USER with HKEY_CURRENT_USER\.Default or something similar. You're not being clever, you're screwing things up.

Link to comment
Share on other sites

Don't edit your reg files and replace HKEY_CURRENT_USER with HKEY_CURRENT_USER\.Default or something similar. You're not being clever, you're screwing things up.

I think you did not get me:

I'm not saying that it's better to replace HKCU by HKU/.DEFAULT (because they map to the same hive anyway).

I'm just saying that by mistaking HKCU with the Default User hive at T12, you will leave some dirt in the HKU/.DEFAULT hive, making this a not-very-clean way of doing thing.

As for myself, I just import my reg files (broken down into bits, a bit like yours) only to my account, at RunOnceEx time (when HKCU maps only to it).

I have absolutely no will nor need to impose any settings to the other users.

And if I had, I would just load the Default User hive, import the settings in it, and unload it. Clean & straight.

And as for "Quit over thinking things" ... you'll have to give me a goog reason for that :P !

Link to comment
Share on other sites

  • 3 weeks later...

Don't know if anyone is still reading this, but I've been setting up different users on my systems depending on there needs for Windows XP.

Here's what I do:

  1. Back up Default User\ntuser.dat to ntuser-orig.dat
  2. Run regedit and Load Default User ntuser.dat Hive
  3. Make modifications based on overall system needs (setup Policies, Explorer settings, ...)
  4. Unload Hive
  5. Login as new User and setup specific user settings (Explorer settings, Desktop Theme, ...) this could also be done in a .reg file for later step (see below)
  6. Logout as New User
  7. Run regedit and Load New User Hive and load as LimitedUser
  8. Import .reg files that set settings on HKU\LimitedUser
  9. Unload Hive
  10. Close regedit
  11. Login as new user, and all settings are there

I have different .reg files for specific users:

  1. The Gamer - totally locked out except access to the Programs\My Games folder - no internet access - not able to access My Computer, Control Panel, ...
  2. The Visitor - access to system but no internet access - no Control Panel, Folder Options, ...
  3. The Friend - access to system and internet (except Mail) - created as Limited User
  4. The Administrator - guess who and guess what access?

Each .reg file supports one of the above types. This allows me to create different typs of users on different systems in as little as steps as possible.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...