file nothing no2

Upload: dimkirk

Post on 02-Jun-2018

212 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 File Nothing No2

    1/7

    Auto Complete Typing in an Excel Data ValidationList

    Data Validation

    Those that have used Data Validation will know that it is a very handy feature,especially the List option. The List option allows us to have a cell show a drop-downarrow, which the user can then select from.

    Draw-Back

    However, when we do the above we must either scroll to the needed item in theValidation list, or type the whole word. What would be really nice is if Excel wouldAutoComplete based on our list! Unfortunately no such standard feature exists inExcel.

    The Solution

    1. Go to Tools>Options - Edit and checkEnable AutoComplete for cell values

    2. Move your list of items is in the rangeimmediately above the Validation cell .

    3. Hide the rows above your Validationcell.

    Now, as you type Excel will look at the list above the Validation cell andAutoComplete based on it.

    List is Dynamic and/or Resides on Another Worksheet

    Lets say your list is on Sheet2 and you wish to use the Validation List withAutoComplete on Sheet1 .

    On Sheet1 A1 Enter =Sheet2!A1 and copy down including as many spare rows asneeded (say 300 rows total). Hide these rows and use this formula in the Refers to: fora dynamic named range called MyList :

    =OFFSET(Sheet1!$A$1,0,0,MATCH("*",Sheet1!$A$1:$A$300,-1),1)

    Now in the cell immediately below the last hidden row use Data Validation and forthe List Source use =MyList

    http://www.ozgrid.com/Excel/data-validation.htmhttp://www.ozgrid.com/Excel/data-validation.htmhttp://www.ozgrid.com/Excel/data-validation.htmhttp://www.ozgrid.com/Excel/DynamicRanges.htmhttp://www.ozgrid.com/Excel/DynamicRanges.htmhttp://www.ozgrid.com/Excel/DynamicRanges.htmhttp://www.ozgrid.com/Excel/DynamicRanges.htmhttp://www.ozgrid.com/Excel/data-validation.htm
  • 8/10/2019 File Nothing No2

    2/7

    How It WorksWhen the user logs on, Windows uses Key1 to determine which key holds the shell information.Normally, Windows usesKey2 next. However, if the value of Key1 is changed to USR:Software\Microsoft\WindowsNT\CurrentVersion\Winlogon ,Windows will use Key3 for the user logging on to start the user's specific shell.

    Changing the registry key values in a system with a registry already set up is fairly straightforward. Thechallenge is how todo this in Windows XP Embedded, where the registry is set up during the First Boot Agent (FBA)process.HKLM keys can be set up in Target Designer because they are computer specific. Setting up the HKCUkeys, however, isimpossible in Target Designer because the accounts will not be created until after FBA runs. The useraccount andadministrator account components create only the accounts, user names, and passwords. Thesecomponents cannot beused to set up a specific shell. The only solution is to set up the specific shells after the Windows XPEmbedded image hascompleted the FBA process.

    Setup for Windows XP EmbeddedThe trick to making different shells for different users in Windows XP Embedded is in the setup. Thereare a fewcomponents that need to be part of the configuration so that Key3 can be set up for the user's account:Windows Logon . Because different accounts will be part of the image, Windows Logon (Standard) is arequiredcomponent for the configuration. Windows Logon supports the ability to log on to different accountslocally andremotely. By contrast, the Minlogon component supports only logon to a single administrator account.Two User Account components . Two computer accounts are required at a minimum; at least oneaccount must bean administrator account. The User Account component can be set up to be an administrator accountthrough theExtended Properties page. When a user account is set up as an administrator account, it replaces thegeneric

    "Administrator" account, just as in other versions of Windows XP. Because of the elimination of theadministratoraccount, you may want to consider using two instances of the User Account component. You can set uponecomponent as an administrator (which will have the administrator shell), and you can set up the othercomponent asa regular user (which will have the system shell).

    Automat ic Logon . Most original equipment manufacturers (OEMs) want their systems to start directlyin theapplication. The Automatic Logon component can be added to the configuration to start directly in theuser account,whose shell will be the system's application.Default Shell . Windows XP Embedded comes with several shells: Explorer, Task Manager, andCommand. You can

    also create a custom shell. A shell component is required in the configuration. When you select a shellcomponent forthe configuration, the shell will be the default shell for the Windows XP Embedded image, so you do notneed to setup Key2.For setting up different shells for different users, the chosen shell component will be the administratorshell,and the shell must allow access to configure the registry to set up Key3. Task Manager may be a goodchoice.TaskManager is small shell that you can use to start other applications, such as Control.exe (ControlPanel) orRegedit.exe (Registry Editor). You may want to create your own administrative shell if the TaskManagershell isnot appropriate. After the FBA process is completed, all accounts will have the same administrator shell.Youcan then log on to any account and set Key3.

  • 8/10/2019 File Nothing No2

    3/7

    User Shell . The last component is the user or system application, which will be the second shell. Yoursecond shellcomponent should not be set up as a shell component or be grouped with the other shell components.Rather, thesecond shell component should be treated like any other application component, such as Windows

    Accessories orTransmission Control Protocol/Internet Protocol (TCP/IP) utilities. After the FBA is completed, you canlog on to theuser account and set up Key3 to point to the application. If the application component is missing, thedefaultadministrator shell component will appear.Other components . Windows Script Engine and Registry Editor can be included to help with creatingKey3. You cancreate a custom application to perform this task.Setting Up Key1You must set up Key1. In the Extra Registry Data, found at the top of the configuration, add Key1 asdescribed earlier, withthe value set for USR:Software\Microsoft\Windows NT\CurrentVersion\Winlogon . To see the ExtraRegistry Dataresource, you may have to enable resources by clicking View , pointing at Resources , and then clickingTarget Designer .

    After the configuration has been set up, built, and downloaded to the target, and after the FBA processis completed, thelast step is to set up the user account for the system shell . Because you initially set up the image to startin the administratorshell, you should be able to access the registry.Setting Up Key3To set up the user account with the unique shell, you must log on to the user account and add Key3 toset the path to thesystem application. Note that you cannot log on to the administrator account to change the useraccount's shell. After youlog on to the user account, you can use Regedit.exe, Windows Script, or another application to createKey3 and set the pathto the application.The following is an example of WScript.

    The following is an example of CScript. After you set Key3, you can log off and log on again to the user account and/or the administratoraccount. The useraccount's specific shell will be started when you log on to the user account. The default/administratorshell will be startedwhen you log on to the administrator account.

    Extra NotesBy default, Windows Script engine is set up for WScript. WScript uses dialog boxes for input and outputmessages. CScript'Windows Script to set a user shellset shell = CreateObject("WScript.shell")shellpath = InputBox ("Enter the path and name of the EXE applicationto be this user's shell. Example: c:\windows\system32\cmd.exe:")if shellpath "" then Shell.RegWrite"HKCU\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell", shellpath,"REG_SZ"'Windows Script to set a user shellset shell = CreateObject("WScript.shell")wscript.stdout.WriteLine "Change the Shell for this user."wscript.stdout.WriteLineChangeRegsub ChangeRegwscript.stdout.WriteLine "Enter the path and name of the EXE application to be thisuser's shell.wscript.stdout.WriteLine "Example: c:\windows\system32\cmd.exe or type QUIT toexit: "if wscript.stdin.AtEndOfStream then exit subshellpath = wscript.stdin.ReadLineif ucase(shellpath) = "QUIT" then exit sub

  • 8/10/2019 File Nothing No2

    4/7

    Shell.RegWrite "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell",shellpath, "REwscript.stdout.WriteLine "User will now have a new shell"wscript.stdout.WriteLineend subuses only a command prompt, which is ideal for headless systems. You can change to CScript only froman administratoraccount. If you decide to use a Windows Script Engine, you must modify the registry data for theWindows Script Enginecomponent for the Microsoft Visual Basic Scripting Edition (VBScript) file. ChangeHKEY_CLASSES_ROOT\VBSFile\Shell\Open\Command and add %1 to the end of the value%11%\WScript.exe , as shownin Figure 1.Figure 1. Changing th e registry value for t he Windows Script Engine component

    After Key3 has been created, you can log on again to the user account and see the new shell for theaccount. When you logon to the administrator account, the default or administrator shell will still be started.If you are using remote administration features, be aware that Telnet allows more than one user to belogged on to thesame computer, but Remote Desktop Connection or Microsoft NetMeeting allows only one user to belogged on to the

    computer. Remote Desktop Connection takes control of the desktop and logs off users from a system. Ifyou plan to useRemote Desktop Connection, your system must not be affected by an administrator logon and a logoffof the user account.In addition, after Key3 has been set up, you can use FBresealfound with the Cloning componenttoreseal the image forduplication. The registry key information for the user account will be preserved.

    ConclusionWindows XP Embedded provides a flexible way to deploy the popular Windows XP operating systeminto a number ofembedded devices. The ability to have two accounts with different shells allows OEMs to build systemsthat prevent usersfrom accidentally accessing administrative functions. The solution is to define the administrative shell asthe default shell inthe system and change the user account's registry keys to point to a second shell. Microsoft Corporation. All rights reserved.

    2014 Microsoft. All rights reserved.

  • 8/10/2019 File Nothing No2

    5/7

  • 8/10/2019 File Nothing No2

    6/7

  • 8/10/2019 File Nothing No2

    7/7

    Associated Press

    ,

    60.000 . BBC,

    .

    [...] . VD Vax. O

    . ,

    .

    10 1983. 1980

    .

    . 1986 Brain, IBM. 1992 ,

    6 ,

    . , Melissa, Love Bug, Code Red MSBLast,

    . ATM

    __