Jump to content


  • 0
Terence

Configure default user profile while deploying windows 7

Question

Hello this is my first post, be gentle

 

I am currently working on a project to deploy windows 7 to about 2000 machines. Using SCCM R2

 

Previously we would use a VM to build the capture a build but we are going in a different direction

 


  1.  
  2. Windows 7 will install a vanilla image using a unattended.xml
  3. Install Office and a few adobe products
  4. then join the domain
     

My problem is that i want to make changed to the default user(certain icons on the desktop etc, i have the reg key but , i have seen that some people have used the setupcomplete.cmd to add the registry entries to the default user before the gets to the login screen

 

Has anyone else done this or has any other idea

Thanks in advance

 

Terence :rolleyes:

Share this post


Link to post
Share on other sites

Recommended Posts

  • 0

If it was me.... I'd just make a VBScript that does the needed changes. Then just place that, and any accompanying files needed into a folder and make a package out of it. Then just add it into your Task Sequence. Here's an example of how you can copy files to user profiles via VBScript: http://myitforum.com/cs2/blogs/rbennett806/pages/vbscript-to-copy-to-a-user-profile-subfolder.aspx

Share this post


Link to post
Share on other sites

  • 0

I was just working on this yesterday actually.

Simple batch file and a reg file that I import to the default user profile.

Basically the same procedure as Lucid explained.

where did you put it in the TS

 

Also did you load the default user(ntuser.dat) or some other method

 

thanks

Terence

Share this post


Link to post
Share on other sites

  • 0

I have this program in the same place as Lucid in the Task Sequence.

 

I've done this with Batch scripting and a registry file though. Bit of a manual job setting up the reg file, but it's working fine so far.

I've got two files:

 

Norway.cmd

REG LOAD HKU\DU c:\Users\Default\NTUSER.DAT
REG IMPORT %~dp0Norway.reg
REG UNLOAD HKU\DU

 

Norway.reg

Windows Registry Editor Version 5.00

;Control Panel\Region and Language\Formats.
[HKEY_USERS\DU\Control Panel\International]
"Locale"="00000414"
"LocaleName"="nb-NO"
"s1159"=""
"s2359"=""
"sCountry"="Norge"
"sCurrency"="kr"
"sDate"="."
"sDecimal"=","
"sGrouping"="3;0"
"sLanguage"="NOR"
"sList"=";"
"sLongDate"="d. MMMM yyyy"
"sMonDecimalSep"=","
"sMonGrouping"="3;0"
"sMonThousandSep"=" "
"sNativeDigits"="0123456789"
"sNegativeSign"="-"
"sPositiveSign"=""
"sShortDate"="yyyy-MM-dd"
"sThousand"="."
"sTime"=":"
"sTimeFormat"="HH:mm:ss"
"sShortTime"="HH:mm"
"sYearMonth"="MMMM yyyy"
"iCalendarType"="1"
"iCountry"="47"
"iCurrDigits"="2"
"iCurrency"="2"
"iDate"="1"
"iDigits"="2"
"NumShape"="1"
"iFirstDayOfWeek"="0"
"iFirstWeekOfYear"="2"
"iLZero"="1"
"iMeasure"="0"
"iNegCurr"="12"
"iNegNumber"="1"
"iPaperSize"="9"
"iTime"="1"
"iTimePrefix"="0"
"iTLZero"="1"

;Control Panel\Region and Language\Location\Current location.
[HKEY_USERS\DU\Control Panel\International\Geo]
"Nation"="177"

;Control Panel\Region and Language\Keyboards and Languages\Change Keyboards.
;Comment_Removing secondary keyboard to prevent users from mistakenly changing it with the keyboard shortcut.
[HKEY_USERS\DU\Keyboard Layout\Preload]
"1"="00000414"
"2"=-

;Control Panel\All Control Panel Items\Notification Area Icons
;Always show all icons and notifications on the taskbar
[HKEY_USERS\DU\Software\Microsoft\Windows\CurrentVersion\Explorer]
"EnableAutoTray"=dword:00000000

;My Computer\Folder Options
;Show extensions for known file types
;Show all folders in navigation pane
[HKEY_USERS\DU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"HideFileExt"=dword:00000000
"NavPaneShowAllFolders"=dword:00000001

;Internet Explorer 8 disable first run dialogue.
[HKEY_USERS\DU\Software\Microsoft\Internet Explorer\Main]
"IE8RunOnceLastShown"=dword:00000001
"IE8RunOncePerInstallCompleted"=dword:00000001
"IE8RunOnceCompletionTime"=hex:
"IE8TourShown"=dword:00000001
"IE8TourShownTime"=hex:
"IE8RunOnceLastShown_TIMESTAMP"=hex:

;Internet Explorer 8 Default search engine is Google, and allow searchbar updates.
[HKEY_USERS\DU\Software\Microsoft\Internet Explorer\SearchScopes]
"DefaultScope"="{6A8AC388-E60D-4E72-9552-AFBDAEF1E9BD}"
"DownloadRetries"=dword:00000000
"DownloadUpdates"=dword:00000001
"Version"=dword:00000002
"UpgradeTime"=hex:

;Internet Explorer: Add Google as search engine
[HKEY_USERS\DU\Software\Microsoft\Internet Explorer\SearchScopes\{6A8AC388-E60D-4E72-9552-AFBDAEF1E9BD}]
"DisplayName"="Google"
"URL"="http://www.google.co.uk/search?hl=en&q={searchTerms}&meta="
"ShowSearchSuggestions"=dword:00000001
"SuggestionsURL"="http://clients5.google.com/complete/search?hl={language}&q={searchTerms}&client=ie8&inputencoding={inputEncoding}&outputencoding={outputEncoding}"
"OSDFileURL"="http://download.microsoft.com/download/9/f/4/9f4d1caf-3622-4dbd-872f-90a8a7e9fd52/Google_UK.xml"
"FaviconURL"="http://www.google.co.uk/favicon.ico"

;Internet Explorer: Disable the Accelerator button popup when selecting text on a website
[HKEY_USERS\DU\Software\Microsoft\Internet Explorer\Services]
"SelectionActivityButtonDisable"=dword:00000001

;Turn off messages about Windows Backup in the Action Center
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsBackup]
"DisableMonitoring"=dword:00000001

 

I've done it this way as it was the first way that popped into my head.

Don't know if it's a good enough method, or if perhaps Lucid's way is better?

Stuff works in my environment though, but would appreciate a comment if anyone has some input.

Share this post


Link to post
Share on other sites

  • 0

Just tossin out my own two cents... As far as .REG versus pure VBScript - I think either way is perfectly fine. To be honest, I just prefer to use as much pure VBScript as possible so I don't have to worry about loosing track of the additional files. Nothing like kicking out a package just to find out that a co-worker unknowingly tweaked the .REG file :)

Share this post


Link to post
Share on other sites

  • 0

Thanks for all the suggestions, i think a vbscript is a good idea for modifying the default profile

I found a sample script on appdeploy which is pretty good.

 

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

 

This can be run before the appliations are installed, should do the trick

 

thanks Guys

Share this post


Link to post
Share on other sites

  • 0

You have to specify a "name" to use when you load a user's registry hive. So in my case I just used "CustomizeDefaultUserProfile", and Thomas just happpend to use "DU". It can be called just about anything you want. If you want to get a better idea of what's happening, crack open Registry Editor and then highlight the "HKEY_USERS" area. Then select File | Load Hive and navigate to a user's profile (other than your own) on the machine. Select the NTUSER.DAT file and load it.

 

Just be sure to highlight the loaded registry hive and select File | Unload when you're done...

Share this post


Link to post
Share on other sites

  • 0

I dont know if anyone wants to know but i have a script now that does the job nicely, hope it helps someone.

 

Just run this in the TS using the cscript.exe %scriptroot%\win7config.vbs

 

 

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

 

'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

'Default User

'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

objWshShell.Run ("reg.exe load HKEY_USERS\CustomizeDefaultUserProfile """ & strUserProfilesDefaultFolder & "Default User\NTuser.dat"""), 0, True

 

'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

'Settings

'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

'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"

 

'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

'Start Menu

'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

'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 registry key to Stop Highlighting new programs in the Start Menu

objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_NotifyNewApps", "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 Administrator Tools menu

objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_AdminToolsRoot", "2","REG_DWORD"

objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\StartMenuAdminTools", "1","REG_DWORD"

objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_AdminToolsTemp", "2","REG_DWORD"

 

'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

'Control Panel

'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

'Set the Control Panel View to Small Icons

objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\ForceClassicControlPanel", "1","REG_DWORD"

 

'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

'Desktop Icons

'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

'Show 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 User Folders on All User's Desktop

objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel\{59031a47-3f72-44a7-89c5-5595fe6b30ee}", "0","REG_DWORD"

'Show Network on All User's Desktop

objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel\{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}", "0","REG_DWORD"

 

'Unload the Default User profile registry hive

objWshShell.Run ("reg.exe unload HKEY_USERS\CustomizeDefaultUserProfile"), 0, True

 

'Administrator

 

 

'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

'Settings

'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

'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"

 

'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

'Start Menu

'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

'Set the registry key to Hide My Music from the Start Menu

objWshShell.RegWrite "HKEY_CURRENT_USER\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_CURRENT_USER\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_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 registry key to Stop Highlighting new programs in the Start Menu

objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_NotifyNewApps", "0","REG_DWORD"

'Set the registry key to remove Default Programs from the Start Menu

objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_ShowSetProgramAccessAndDefaults", "0","REG_DWORD"

'Set the registry key to Show Administrator Tools menu

objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_AdminToolsRoot", "2","REG_DWORD"

objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\StartMenuAdminTools", "1","REG_DWORD"

objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_AdminToolsTemp", "2","REG_DWORD"

 

'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

'Control Panel

'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

'Set the Control Panel View to Small Icons

objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\ForceClassicControlPanel", "1","REG_DWORD"

 

'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

'Desktop Icons

'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

'Show Computer on All User's Desktop

objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel\{20D04FE0-3AEA-1069-A2D8-08002B30309D}", "0","REG_DWORD"

'Show User Folders on All User's Desktop

objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel\{59031a47-3f72-44a7-89c5-5595fe6b30ee}", "0","REG_DWORD"

'Show Network on All User's Desktop

objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel\{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}", "0","REG_DWORD"

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.