Thursday, September 09, 2010
   
Text Size

Search

hits.

purpleender

Rep

Gamerscore34062

ZoneUnderground

Technical Log

VB - Lockdown a user using a script

  'Hide My Documents, My Computer, My Network Places and Internet Explorer icons on users desktop
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu\{208D2C60-3AEA-1069-A2D7-08002B30309D}", 1 , "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu\{20D04FE0-3AEA-1069-A2D8-08002B30309D}", 1 , "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu\{450D8FBA-AD25-11D0-98A8-0800361B1103}", 1 , "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu\{871C5380-42A0-1069-A2EA-08002B30309D}", 1 , "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel\{208D2C60-3AEA-1069-A2D7-08002B30309D}", 1 , "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel\{20D04FE0-3AEA-1069-A2D8-08002B30309D}", 1 , "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel\{450D8FBA-AD25-11D0-98A8-0800361B1103}", 1 , "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel\{871C5380-42A0-1069-A2EA-08002B30309D}", 1 , "REG_DWORD"

  'Apply Policies
  'MACHINE SETTINGS

  WshShell.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoWelcomeScreen", 1, "REG_DWORD"                        'Removes The Windows Welcome Screen
  WshShell.RegWrite "HKLM\Software\Policies\Microsoft\Windows\NetCache\NoConfigCache", 1, "REG_DWORD"                                         'Prevents Users from enabling/disabling Offline File configuration
  WshShell.RegWrite "HKLM\Software\Policies\Microsoft\Windows\NetCache\CustomGoOfflineActions\NoMakeAvailableOffline", 1, "REG_DWORD"         'Prevents Users from making network files and folders available offline.
  WshShell.RegWrite "HKLM\Software\Policies\Microsoft\Windows\NetCache\CustomGoOfflineActions\NoCacheViewer", 1, "REG_DWORD"                  'Disabled the Offline Files Folder
  WshShell.RegWrite "HKLM\Software\Policies\Microsoft\Windows\NetCache\AssignedOfflineFolders\NoReminders", 1, "REG_DWORD"                    'Hides Reminder Balloons and

  'CURRENT USER SETTINGS

  WshShell.RegWrite "HKCU\Software\Microsoft\Outlook Express\BlockExeAttachments", 1, "REG_DWORD"                                             'Block Outlook Express Attachments
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop\NoComponents", 1, "REG_DWORD"                      'Removes Active Desktop Content
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop\NoAddingComponents", 1, "REG_DWORD"                'Stops Users Adding Active Desktop Components
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop\NoDeletingComponents", 1, "REG_DWORD"              'Stops Users Deleteing Active Desktop Components
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop!NoEditingComponents", 1, "REG_DWORD"               'Stops Users Editing Active Desktop Components
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop\NoHTMLWallPaper", 1, "REG_DWORD"                   'Permits only BMP Images for Wallpaper
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop\NoChangingWallPaper", 1, "REG_DWORD"               'Stops User Chaning Desktop Wallpaper
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\comdlg32\Placesbar\NoPlacesBar", 1, "REG_DWORD"                  'Removes the Shortcut Bar from the Open Dialog Box
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\comdlg32\Placesbar\NoBackButton", 1, "REG_DWORD"                 'Removes The Back Button From The Open Dialog Box
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\comdlg32\Placesbar\NoFileMru", 1, "REG_DWORD"                    'Removes The List Of Most Recently Used Files From The Open Dialog Box
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoStartMenuSubFolders", 1, "REG_DWORD"                  'Hides all folders on the user specific section of the Start Menu
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoCommonGroups", 1, "REG_DWORD"                         'Removes Items in the All Users Profile from the Programs Menu
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoSMMyDocs", 1, "REG_DWORD"                             'Removes The My Documents icon from the Start Menu and It's Subfolders                            '
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoRecentDocsMenu", 1, "REG_DWORD"                       'Removes The Documents Menu from the Start Menu.
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoSetFolders", 1, "REG_DWORD"                           'Prevents Control Panel, Printers and Network Connections From Running
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoNetworkConnections", 1, "REG_DWORD"                   'Prevents Users from running Network Connections.
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoFavoritesMenu", 1, "REG_DWORD"                        'Removes the Favorites Menu from the Start Menu.
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoFind", 1, "REG_DWORD"                                 'Remove Find From the Start Menu
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoSMHelp", 1, "REG_DWORD"                               'Removes Help From The Start Menu
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoRun", 1, "REG_DWORD"                                  'Removes Run From The Start Menu
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoSMMyPictures", 1, "REG_DWORD"                         'Removes the My Pictures Icon From The Start Menu
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoStartMenuMyMusic", 1, "REG_DWORD"                     'Removes The My Music Icon From The Start Menu
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoStartMenuNetworkPlaces", 1, "REG_DWORD"               'Removes Network Places From The Start Menu
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\ForceStartMenuLogOff", 1, "REG_DWORD"                   'Adds Logoff To The Users Start Menu
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoChangeStartMenu", 1, "REG_DWORD"                      'Prevents The Users from changing item order in the Start Menu
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoSetTaskbar", 1, "REG_DWORD"                           'Removes the Taskbar and Start Menu item from Settings on the Start menu.
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoTrayContextMenu", 1, "REG_DWORD"                      'Hides the menus that appear when you right-click the taskbar
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoRecentDocsHistory", 1, "REG_DWORD"                    'Prevents the operating system and installed programs from creating and displaying shortcuts to recently opened documents.
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\ClearRecentDocsOnExit", 1, "REG_DWORD"                  'Clear history of recently opened documents on exit.
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Intellimenus", 1, "REG_DWORD"                           'Disables personalized menus.
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoInstrumentation", 1, "REG_DWORD"                      'Disables user tracking.
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoResolveSearch", 1, "REG_DWORD"                        'Prevents the system from conducting a comprehensive search of the target drive to resolve a shortcut.
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoResolveTrack", 1, "REG_DWORD"                         'Prevents the system from using NTFS tracking features to resolve a shortcut.
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoTaskGrouping", 1, "REG_DWORD"                         'It prevents the taskbar from grouping items that share the same program name.
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\LockTaskbar", 1, "REG_DWORD"                            'Stops the User moving or resizing the Start Bar
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoStartMenuPinnedList", 1, "REG_DWORD"                  'If you enable this setting, the Pinned Programs list is removed from the Start menu.
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoStartMenuMFUprogramsList", 1, "REG_DWORD"             'If you enable this setting, the frequently used programs list is removed from the Start menu.
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoStartMenuMorePrograms", 1, "REG_DWORD"                'If you enable this setting, the All Programs item is removed from the simple Start menu.
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoUserNameInStartMenu", 1, "REG_DWORD"                  'Remove user name from Start Menu
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoTrayItemsDisplay", 1, "REG_DWORD"                     'If this setting is enabled, the user’s entire notification area Is Hidden
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoToolbarsOnTaskbar", 1, "REG_DWORD"                    'If this setting is enabled, the taskbar does not display any custom toolbars
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDesktop", 1, "REG_DWORD"                              'Removes icons, shortcuts, and other default and user-defined items from the desktop
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoPropertiesMyDocuments", 1, "REG_DWORD"                'If you enable this setting, the Properties option will not be present when the user right-clicks My Documents
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoPropertiesMyComputer", 1, "REG_DWORD"                 'If you enable this setting, the Properties option will not be present when the user right-clicks My Computer
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoPropertiesRecycleBin", 1, "REG_DWORD"                 'If you enable this setting, the Properties option will not be present when the user right-clicks on Recycle Bin
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoNetHood", 1, "REG_DWORD"                              'Removes the My Network Places icon from the desktop
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoInternetIcon", 1, "REG_DWORD"                         'Removes the Internet Explorer icon from the desktop
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoRecentDocsNetHood", 1, "REG_DWORD"                    'Remote shared folders are not added to My Network Places
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisablePersonalDirChange", 1, "REG_DWORD"               'Prevents users from changing the path to the My Documents folder
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoCloseDragDropBands", 1, "REG_DWORD"                   'Prevents users from manipulating desktop toolbars
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoMovingBands", 1, "REG_DWORD"                          'Prevents users from adjusting the length of desktop toolbars
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoSaveSettings", 1, "REG_DWORD"                         'Prevents users from saving certain changes to the desktop
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDesktopCleanupWizard", 1, "REG_DWORD"                 'Prevents users from using the Desktop Cleanup Wizard
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\ForceActiveDesktopOn", 1, "REG_DWORD"                   'Enables Active Desktop and prevents users from disabling it
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoActiveDesktop", 1, "REG_DWORD"                        'Disables Active Desktop and prevents users from enabling it
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop\NoComponents", 1, "REG_DWORD"                      'Removes Active Desktop content and prevents users from adding Active Desktop content
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoActiveDesktopChanges", 1, "REG_DWORD"                 'Prevents the user from enabling or disabling Active Desktop
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoThemesTab", 1, "REG_DWORD"                            'This setting effects the Themes tab that controls the overall appearance of windows
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Windows NT\Printers\PointAndPrint\NoAddPrinter", 1, "REG_DWORD"                         'Prevents users from using familiar methods to add local and network printers
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Windows NT\Printers\PointAndPrint\NoDeletePrinter", 1, "REG_DWORD"                      'Prevents users from deleting local and network printers
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoAutoUpdate", 1, "REG_DWORD"                           'This setting controls automatic updates to a user's computer
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoToolbarCustomize", 1, "REG_DWORD"                     'Prevents Users From Custoizing The Toolbar
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Btn_Back", 0, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Btn_Forward", 0, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Btn_Stop", 0, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Btn_Refresh", 0, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Btn_Home", 0, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Btn_Search", 0, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Btn_Favorites", 0, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Btn_History", 0, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Btn_Folders", 0, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Btn_Fullscreen", 0, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Btn_Tools", 0, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Btn_MailNews", 0, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Btn_Size", 0, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Btn_Print", 0, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Btn_Edit", 0, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Btn_Discussions", 0, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Btn_Cut", 0, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Btn_Copy", 0, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Btn_Paste", 0, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Btn_Encoding", 0, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\ClassicShell", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoFolderOptions", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoFileMenu", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoNetConnectDisconnect", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoShellSearchButton", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoViewContextMenu", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoManageMyComputerVerb", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\EnforceShellExtensionSecurity", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\LinkResolveIgnoreLinkInfo", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDrives", 4, "REG_DWORD"
  WshShell.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDriveTypeAutoRun", 91, "REG_DWORD"                     'Turns CD Auto-Runs Off
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoViewOnDrive", 4, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoHardwareTab", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDFSTab", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoSecurityTab", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoChangeAnimation", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoChangeKeyboardNavigationIndicators", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoComputersNearMe", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Network\NoEntireNetwork", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Network\MaxRecentDocs", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Network\NoRunasInstallPrompt", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Network\PromptRunasInstallNetPath", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Network\NoCDBurning", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Network\NoRecycleFiles", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Network\ConfirmFileDelete", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Network\RecycleBinSize", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Network\NoSharedDocuments", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Network\NoThumbnailCache", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\NonEnum\{450D8FBA-AD25-11D0-98A8-0800361B1103}", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\NonEnum\{20D04FE0-3AEA-1069-A2D8-08002B30309D}", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\NonEnum\{645FF040-5081-101B-9F08-00AA002F954E}", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\Wallpaper", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\WallpaperStyle", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\NoDispCPL", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\NoDispBackgroundPage", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop\NoDispAppearancePage", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop\NoDispSettingsPage", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop\NoDispScrSavPage", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\NoVisualStyleChoice", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\NoSizeChoice", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\NoColorChoice", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableChangePassword", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Uninstall\NoAddRemovePrograms", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Uninstall\NoRemovePage", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Uninstall\NoAddPage", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Uninstall\NoWindowsSetupPage", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Uninstall\NoAddFromCDorFloppy", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Uninstall\NoAddFromInternet", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Uninstall\NoAddFromNetwork", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Uninstall\NoServices", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Uninstall\NoSupportInfo", 1, "REG_DWORD"
  WshShell.RegWrite "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\DisableWindowsUpdateAccess", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\DisableImportExportFavorites", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\AdvancedTab", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\HomePage", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Cache", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\History", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Colors", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\links", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Fonts", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Languages", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Accessibility", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Connwiz Admin Lock", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Connection Settings", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Proxy", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Autoconfig", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\New Windows\Allow\Ratings", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\New Windows\Allow\Certificates", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\New Windows\Allow\Profiles", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\New Windows\Allow\FormSuggest", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\New Windows\Allow\FormSuggest Passwords", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\New Windows\Allow\Messaging", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\New Windows\Allow\CalendarContact", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\New Windows\Allow\ResetWebSettings", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\New Windows\Allow\Check_If_Default", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\GeneralTab", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\SecurityTab", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\ContentTab", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\ConnectionsTab", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\ProgramsTab", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\PrivacyTab", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\AdvancedTab", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\Advanced", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\HomePage", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\FormSuggest", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\FormSuggest Passwords", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\NoSearchCustomization", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\NoAddingChannels", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\NoRemovingChannels", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\NoAddingSubscriptions", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\NoEditingSubscriptions", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\NoRemovingSubscriptions", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\NoChannelLogging", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\NoScheduledUpdates", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\NoChannelUI", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\NoSubscriptionContent", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\NoEditingScheduleGroups", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\MaxSubscriptionSize", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\MaxSubscriptionCount", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\MinUpdateInterval", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\UpdateExcludeBegin", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\UpdateExcludeEnd", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\MaxWebcrawlLevels", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\NoBrowserSaveWebComplete", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoBrowserSaveAs", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoFileNew", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoFavorites", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoBrowserOptions", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoHelpItemTipOfTheDay", 1, "REG_DWORD" 
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoHelpItemNetscapeHelp", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoHelpItemTutorial", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoHelpItemSendFeedback", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoBrowserContextMenu", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoFindFiles", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoExternalBranding", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoBrowserSaveAs", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoFileNew", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoFileOpen", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\NoBrowserClose", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\NoViewSource", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\NoTheaterMode", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\NoFavorites", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\NoBrowserOptions", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoHelpItemTipOfTheDay", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoHelpItemNetscapeHelp", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoHelpItemSendFeedback", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoBrowserContextMenu", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoOpeninNewWnd", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoSelectDownloadDir", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\MMC\RestrictAuthorMode", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Messenger\Client\PreventRun", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Messenger\Client\PreventAutoRun", 1, "REG_DWORD"
  WshShell.RegWrite "HKLM\Software\Policies\Microsoft\Windows\App Management\COMClassStore", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Windows\Directory UI\HideDirectoryFolder", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Windows\DriverSearching\DontSearchFloppies", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Windows\DriverSearching\DontSearchCD", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Windows\DriverSearching\DontSearchWindowsUpdate", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Windows\Installer\DisableMedia", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Windows\System\DisableCMD", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\WindowsMediaPlayer\HideNetworkTab", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\RestrictCpl", 1, "REG_DWORD"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\RestrictCpl\1", "Access.cpl"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\RestrictCpl\2", "Desk.cpl"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\RestrictCpl\3", "Main.cpl"
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\RestrictCpl\4", "MMSys.cpl"
  WshShell.RegWrite "HKCU\Software\Policies\Microsoft\Messenger\Client\PreventRun", 1, "REG_DWORD"
  ' Add so-update.co.uk to secure sites
  WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\so-update.co.uk\www\http", 2, "REG_DWORD"    

  'Remove User From Local Admins Group
  wshshell.run("c:\winnt\system32\net.exe" & " " & "localgroup" & " " & chr(34) & "Administrators" & chr(34) & " " & "/remove" & " " & "myuser")

 

 

VB- Check if a user is a member of a domain group

ISMEMber ("userlockdownpolicyg sup")

Function IsMember(groupname)
 'Set WshNetwork = CreateObject("WScript.Network")
 domain = WshNetwork.UserDomain
 user = WshNetwork.UserName
 Workwised = False
 Set userObj = GetObject("WinNT://" & domain & "/" & user & ",user")
 For Each grp In userObj.Groups
  If lcase(grp.Name) = groupName Then
   Workwised = true
   Exit For
  End If
 Next
End Function

 

 

XP - Change IE History Location

strRegURLHistory = "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\URL History"
HKEY_CURRENT_USER = &H80000001
strCacheLimit = 512000

strHistoryFolder = "c:\Winnt\IE\History"
strTempIntFilesFolder = "c:\winnt\IE\TempInt"

Call UsersID()
Call Check_Folder_Structure()
Call Set_History_Retention()
Call Set_IE_Temp_Files_Folder()
Call Set_Temp_Disk_Space()
Call Set_History_Folder()

MSGBOX ("COMPLETE")

Sub UsersID()
 Do While UserID = ""
  UserID = WshNetwork.UserName
 Loop
End Sub 

Sub Check_Folder_Structure()
 If FSO.FolderExists ("c:\winnt\IE") Then
 Else
  FSO.CreateFolder ("c:\winnt\IE")
 End If

 If FSO.FolderExists ("c:\winnt\IE\History") Then
 Else
  FSO.CreateFolder ("c:\winnt\IE\History")
 End If

 If FSO.FolderExists ("c:\winnt\IE\History\" & USERID) Then
 Else
  FSO.CreateFolder ("c:\winnt\IE\History\" & USERID)
 End If

 If FSO.FolderExists ("c:\winnt\IE\TempInt") Then
 Else
  FSO.CreateFolder ("c:\winnt\IE\TempInt")
 End If

 If FSO.FolderExists ("c:\winnt\IE\TempInt\" & USERID) Then
 Else
  FSO.CreateFolder ("c:\winnt\IE\TempInt\" & USERID)
 End If
End Sub

Sub Set_History_Retention()
 WshShell.RegWrite "HKCU\SOFTWARe\Microsoft\Windows\CurrentVersion\Internet Settings\URL History\DaysToKeep", 99 ,"REG_DWORD"
End Sub

Sub Set_IE_Temp_Files_Folder()
 WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\History", strHistoryFolder & "\" & USERID,"REG_EXPAND_SZ"
 WshShell.RegWrite "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\History", strHistoryFolder & "\" & USERID, "REG_SZ"

 Const HKEY_CURRENT_USER = &H80000001

 strComputer = "."
 strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Extensible Cache"

 Set objRegistry = GetObject("winmgmts:\\" & _
     strComputer & "\root\default:StdRegProv")

 DeleteSubkeys HKEY_CURRENT_USER, strKeypath

End Sub

Sub DeleteSubkeys(HKEY_CURRENT_USER, strKeyPath)
    objRegistry.EnumKey HKEY_CURRENT_USER, strKeyPath, arrSubkeys

    If IsArray(arrSubkeys) Then
        For Each strSubkey In arrSubkeys
            DeleteSubkeys HKEY_CURRENT_USER, strKeyPath & "\" & strSubkey
        Next
    End If

    objRegistry.DeleteKey HKEY_CURRENT_USER, strKeyPath
End Sub

Sub Set_Temp_Disk_Space()
 WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Content\CacheLimit",strCacheLimit,"REG_DWORD"
 WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache\Content\CacheLimit",strCacheLimit,"REG_DWORD"
End Sub

Sub Set_History_Folder()
 WshShell.RegWrite "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Cache",strTempIntFilesFolder & "\" & USERID, "REG_EXPAND_SZ"
End Sub

   

XP - Return DHCP Domain Details

 DHCP_DNS = WshShell.RegRead ("HKLM\SYSTEM\CurrentControlSet\Services\TCPIP\Parameters\DHCPDomain")
 

W2K - Unattend.txt

; Windows 2000 Professional - Unattended Installation File
; Created By Andy Henderson
;
; This file contains information about how to automate the installation
; or upgrade of Windows 2000 Professional.

[Data]
AutoPartition=0
MsDosInitiated="1"
UnattendedInstall="Yes"

[Unattended]
UnattendMode = FullUnattended
fileSystem = ConvertNTFS
TargetPath = \WINNT
OemPreinstall = Yes
OemSkipEula = Yes
OemPNPDriversPath = "PNP\Nic;Pnp\Modem;PNP\ATI;PNP\AUDIO;PNP\HDD;PNP\ICH;PNP\ICH2;PNP\ICH2M;PNP\ICH3M;PNP\USB2;PNP\CBUS;PNP\ICH4;PNP\IRDA;PNP\D505"

[GuiUnattended]
TimeZone = 85
AdminPassword = passw0rd
AutoLogon = Yes
AutoLogonCount = 4
OemSkipWelcome = 1
OemSkipRegional = 1

[UserData]
FullName = "AH"
OrgName = "andrew-henderson"
ComputerName = *

[Display]
XResolution = 800
YResolution = 600
VRefresh = 60

[RegionalSettings]
LanguageGroup=1
SystemLocale=00000809
UserLocale=00000809
InputLocale=0809:00000809

[systemFileProtection]
SFCDllCacheDir = "%systemroot%\System32\Dllcache"
SFCShowProgress = 1
SFCQuota = 0x32h

[Components]
iis_common = Off
iis_inetmgr = Off
iis_www = Off
iis_ftp = Off
iis_htmla = Off
iis_doc = Off
iis_pwmgr = Off
iis_smtp = Off
iis_smtp_docs = Off
Mts_core = Off
Fp = Off
Msmq = Off
TSEnable = Off
TSClients = Off
TSPrinterDrivers = Off
TSKeyboardDrivers = Off
Netoc = On
Reminst = Off
Certsrv = Off
Rstorage = Off
Indexsrv_system = Off
Certsrv_client = Off
Certsrv_server = Off
Certsrv_doc = Off
Accessopt = On
Calc = On
Cdplayer = On
Charmap = On
Chat = Off
Clipbook = On
Deskpaper = on
Dialer = On
Freecell = On
Hypertrm = On
LicenseServer = off
Media_blindnoisy = Off
Media_blindquiet = Off
Media_clips = Off
Media_jungle = Off
Media_musica = Off
Media_robotz = Off
Media_utopia = Off
Minesweeper = On
Mousepoint = On
mplay = on
Mswordpad = On
netcis = off
Objectpkg = On
Paint = On
Pinball = On
Rec = On
Reminst = off
Rstorage = off
Solitaire = On
Templates = On
Vol = On

[TapiLocation]
CountryCode = "44"
Dialing = Tone
LongDistanceAccess = 9

[Networking]
InstallDefaultComponents = No
JoinWorkgroup=AH-BUILD
ProcessPageSections=Yes

[NetAdapters]
Adapter1 = params.AutoDetected1

[params.AutoDetected1]
InfId = *

[NetProtocols]
MS_TCPIP=params.MS_TCPIP

[params.MS_TCPIP]
; transport: TC (TCP/IP Protocol)
InfID=MS_TCPIP
DHCP=Yes

[NetClients]
MS_MSClient=params.MS_MSClient

[params.MS_MSClient]
InfID=MS_MSClient

[NetServices]
MS_Server=params.MS_Server

[params.MS_Server]
; service: SRV (Server)
InfID=MS_Server
BroadcastsToLanman2Clients = No

[NetBindings]
Enable = "MS_Server MS_TCPIP Adapter1"
NetClients = MS_MSCLient
NetServices = MS_Server
NetProtocols = MS_TCPIP
NetAdapters = Adapter1

[NetOptionalComponents]
Wins = Off
Dns = Off
Dhcpserver = Off
ils = Off
Snmp = On
Lpdsvc = Off
Simptcp = Off
Netmontools = Off
Dsmigrat = Off

[Branding]
BrandIEUsingUnattended = Yes

[URL]
Home_Page = "http://www.andrew-henderson.me.uk"
Search_Page = www.yahoo.co.uk

[GuiRunOnce]
; Disable Welcome Screen
"c:\winnt\regedit.exe /s c:\startup\nowelc.reg"
; Copy i386 and Point Windows 2000 Install Path to correct drive
"c:\startup\spath.bat"
;Apply Network Printing Patch
"c:\startup\printing.bat"
;Change Boot Time To 5 Seconds and copy explorer icon to Start > Programs
"c:\startup\bootini.bat"
; Set Screensaver and Password Protect for current and default profiles
"c:\winnt\regedit.exe /s c:\startup\scrnsave.reg"
; Disable APIPA
"c:\winnt\regedit.exe /s c:\startup\apipa.reg"
; Stop Network Auto Disconnects
"c:\winnt\regedit.exe /s c:\startup\kb893.reg"
;Set Page File to Twice Amount Of RAM
"c:\winnt\system32\setpage.vbs"
; Set Explorer View Settings
"c:\winnt\regedit.exe /s c:\startup\explorer.reg"
;Install command console
"d:\i386\winnt32 /cmdcons /unattend"
; Set Apps to install on next administrator logon
"c:\winnt\regedit.exe /s c:\startup\runonce.reg"
; Convert D to NTFS
"c:\startup\conv.bat"
;Apply patches post SP3
; Install Windows Media Player 9 and Reboot
"d:\apps\MediaPlayer9\mpsetup.exe /Q"
"c:\winnt\system32\shutdown.exe /r /t 0"

   

Page 3 of 12