Win7: how to deploy custom quicklaunch icons

Source: Internet
Author: User

In a strict network management environment, the end user's permissions are strictly restricted and the behavior of changing the system is prohibited. In our network environment, students are prohibited from adding/deleting icons on quicklaunch. In addition, wireless networks, printers, and so on are strictly controlled by permissions, these restrictions are not only designed to meet the management goals of the Education Bureau, but also to ensure that computer systems can provide continuous and consistent services and reduce service requirements. This article is written under such environmental requirements.

 

During system deployment, the installation and basic configurations of the operating system and software can be customized, and then the user environment needs to be customized, quick Launch customization is an aspect encountered in actual work. By searching for information, this process is still relatively simple. The main step is to customize the user icons on a computer, copy the shortcuts directory and related Registry, and then copy them to the default user directory, in this way, each new login user will automatically have a custom icon.

 

In reality, there are two other problems: first, to deploy the quicklaunch icon on a computer that has been used by many users, You need to delete all existing Local User Directories, when you log on to the system next time, the system processes the new users or directly changes the icons of these users. Second, on the basis of the template, how to automate the process as much as possible. This process is familiar to me and is easy to operate and maintain in the future. However, in a wide-area network environment, we have more than 200 schools located in different parts of the city, and many grass-roots technical support personnel who will face different school needs, they need to customize computer systems suitable for the school's software environment and teachers' expectations as needed. Although we can provide documents to help you use them or even provide training, we should minimize the manual process, to reduce additional problems caused by individual factors of individual technicians. Therefore, customizing templates and automating them as much as possible is a technical issue that needs to be considered.

 

Next, let's take a look at the implementation process I suggest and include all the script/command files.

 

Manual steps:

1. Backup Customization

First, find a testing machine, preferably a new system that has just been re-mirrored. All the software has been installed. Use a user that can at least customize the quicklaunch icon and run regisrter to log on (preferably the local system administrator, which will be explained later), drag the used icon to the quicklaunch bar, and arrange the order. Back up the following directories in the user directory:

"%USERPROFLIE%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar

Then, use Regedit to output the Registry directory in the following path to a file.

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband

Then, to facilitate the deployment, You need to modify a part of the Registry file and change HKEY_CURRENT_USER to available. I will change it to HKEY_USERS \ temphive, as shown in the figure below. In fact, it is not necessarily a temphive, as long as it is a valid registry key name with the same name before and after.


1. Test

Then, log on to the local system administrator account, run the Regedit program, select HKEY_USERS, select load hive from the menu, and select a user's ntuser from the file opening window. DAT file, and give it a name, we call it temphive. Then, select import... in the menu, select the modified registry file, select the menu unload hive, and save. See:

If you cannot see ntuser. dat, you need to cancel hide protected operating system files (recommended) in Folder Options ). After canceling it, all the files are visible in the windows browser, which is annoying. Therefore, it is best to reselect it after this operation is completed. See:

Copy all the files in the taskbar directory that was previously backed up to the corresponding directory under the user.

Log on to the modified User and check whether the icon has been changed. If the modified user is the default user, use a new user to log on to the test.

Automatic deployment:

If the preceding test results are valid, you can use the following command file to automate the deployment process.

Create a directory named quicklanuch_win7 and a subdirectory named shortcuts and tempregs. Suppose we copy the file in taskbar to shortcuts and copy the Registry file to temregs. Copy the following two command files to the quicklaunch_win7 directory.

The following file name is install. cmd.

ECHO OFF:: ---------------------------------------------------------------------------------------:: Add QuickLaunch icons for all users:: History:::    Initial: Oct 24, 2012 Tony Liu:::: Description: Install.cmd.:::: How TO:::    Put all the program shortcuts in Shortcuts folders.:::: Copyright (c) 2012, Tony Liu':::: This program is free software; you can redistribute it and/or:: modify it under the terms of the GNU General Public License:: as published by the Free Software Foundation; either version 2:: of the License, or (at your option) any later version.:::: This program is distributed in the hope that it will be useful,:: but WITHOUT ANY WARRANTY; without even the implied warranty of:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the:: GNU General Public License for more details.:::: You should have received a copy of the GNU General Public License:: along with this program; if not, write to the Free Software:: Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.:::: Contact: Tonyliu2ca@gmail.com:: ---------------------------------------------------------------------------------------cd %~d0cd %~d0%~p0Echo ---------------------------------------------------------------------------- >> History.logEcho : Add QuickLaunch icons for all users : >> History.logEcho Start: %time%, %date% >> History.logsysteminfo | find "Host Name" >> History.logEcho Windows Version:  >> History.logsysteminfo | find "OS Name" | find "Windows 7" >> History.logif %ERRORLEVEL% NEQ 0 goto Endfor /F "delims=*" %%i in ('dir /A /B %SystemDrive%\Users') do @Putin.cmd "%%i" Shortcuts "History.log":EndEcho End: %time%, %date% >> History.log

The following file name is Putin. cmd.

echo off:: ---------------------------------------------------------------------------------------:: Process files in place for one user.:: History:::    Initial: Oct 24, 2012 Tony Liu:::: Description: Putin.cmd.:::: How TO:::    Put all the program shortcuts in Shortcuts folders and import registry entry.:::: Copyright (c) 2012, Tony Liu':::: This program is free software; you can redistribute it and/or:: modify it under the terms of the GNU General Public License:: as published by the Free Software Foundation; either version 2:: of the License, or (at your option) any later version.:::: This program is distributed in the hope that it will be useful,:: but WITHOUT ANY WARRANTY; without even the implied warranty of:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the:: GNU General Public License for more details.:::: You should have received a copy of the GNU General Public License:: along with this program; if not, write to the Free Software:: Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.:::: Contact: Tonyliu2ca@gmail.com:: ---------------------------------------------------------------------------------------IF NOT Exist %~2  Exit /B 0IF "%USERNAME%" == "%~1" (   Echo - %1 is Current user. >> %~3) ELSE (   IF EXIST "%SystemDrive%\Users\%~1\NTUSER.DAT" (      IF EXIST "%SystemDrive%\Users\%~1\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar" (         Del /F  "%SystemDrive%\Users\%~1\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\*.lnk"         xcopy %2\*.* "%SystemDrive%\Users\%~1\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\" /Y /I /E /R /H /Q /C         REG load HKU\TempHive "%SystemDrive%\Users\%~1\NTUSER.DAT"::       for /F "delims=*" %%i in ('dir /A /B ^"%~d0%~p0TempRegs\*.reg^"') do echo ..."%~d0%~p0TempRegs\%%i"         for /F "delims=*" %%i in ('dir /A /B ^"%~d0%~p0TempRegs\*.reg^"') do REG import "%~d0%~p0TempRegs\\%%i"         REG unload HKU\TempHive         Echo - %1 is done. >> %~3      )   ) ELSE (      Echo - %1 isn't a user. >> %~3   ))

If there is no error, run install. CMD in this directory to customize the quicklaunch icon for all users in any win7.

 

Automatic Retrieval:

Through the research and experience of your system, every administrator has an understanding of your system, what is basic configuration, such as we, MS word and Internet Explorer are essential icons for both systems, so I can make a BASIC icon template for others to add new icons to use later; you can also create a template with the largest icon as needed, so that others can delete unnecessary icons as long as they are based on their own circumstances. In short, templates are easy to handle.

As mentioned above, we should not only have templates but also try to avoid human errors. The above human errors are the human steps after the custom icons, we can easily solve this problem through the following command file and a vbs script.

Save the following command file in the quicklaunch_win7 directory, called make. cmd.

:: ---------------------------------------------------------------------------------------:::: Make.cmd for Quicklaunch Win7:: :: Description::: After admin make quick launch icons done in current user, this cmd will copy all the nessary info:: to correct folder to be ready for deployment.:: This cmd must be run on the user who make all the icons ready and map to local drive if it is saved:: on network share folder.:::: History:::    Oct 25, 2012:::: Copyright (c) 2012, Tony Liu':::: This program is free software; you can redistribute it and/or:: modify it under the terms of the GNU General Public License:: as published by the Free Software Foundation; either version 2:: of the License, or (at your option) any later version.:::: This program is distributed in the hope that it will be useful,:: but WITHOUT ANY WARRANTY; without even the implied warranty of:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the:: GNU General Public License for more details.:::: You should have received a copy of the GNU General Public License:: along with this program; if not, write to the Free Software:: Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.:::: Contact: Tonyliu2ca@gmail.com:: ---------------------------------------------------------------------------------------%~d0cd %~d0%~p0del Shortcuts\*.*del TempRegs\*.*xcopy "%USERPROFLIE%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\*.*" .\Shortcuts\ /Y /I /E /R /H /Q /Creg export HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband .\TempRegs\Taskband.reg /ycscript Replace.vbs .\TempRegs\Taskband.reg "[HKEY_CURRENT_USER\" "[HKEY_USERS\TempHive\"

Save the following file as replace. vbs (this VBScript is found online for free)

Const ForReading = 1    Const ForWriting = 2strFileName = Wscript.Arguments(0)strOldText = Wscript.Arguments(1)strNewText = Wscript.Arguments(2)Set objFSO = CreateObject("Scripting.FileSystemObject")Set objFile = objFSO.OpenTextFile(strFileName, ForReading)strText = objFile.ReadAllobjFile.ClosestrNewText = Replace(strText, strOldText, strNewText)Set objFile = objFSO.OpenTextFile(strFileName, ForWriting)objFile.Write strNewText  'WriteLine adds extra CR/LFobjFile.Close

After all the icons are customized by other technicians, you only need to run make. CMD to complete the manual copy and modification steps above.

 

Tony L.

2012

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.