BREAK OFF $ = SETTITLE("Domain Login") BIG COLOR G/N ?@DOMAIN ? SMALL COLOR W/N ?@TIME " - " @WKSTA " - " @USERID ?"Do not close this window, it will automatically close" ? ; Sync the time to the Server SetTime "\\SERVER1" ; Map the User's Personal Drive USE P: "\\SERVER1\" + @USERID ; Map all network drives depending upon if the User is in the Group IF InGroup( "SAMBADOMAIN\Accounting", "SERVER1\Accounting" ) USE F: "\\SERVER1\Accounting" ENDIF IF InGroup( "SAMBADOMAIN\Company", "SERVER1\Company" ) USE F: "\\SERVER1\Company" ENDIF IF InGroup( "SAMBADOMAIN\Office", "SERVER1\Office" ) USE O: "\\SERVER1\Office" ENDIF ; Check to See if Workstation is Running Windows Vista, if so apply settings and Policies $ntversion = READVALUE("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\", "CurrentVersion") IF $ntversion = "6.0" $FolderRedirect = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" $ = WriteValue($FolderRedirect, "Personal", "P:\Documents", "REG_SZ") $ = WriteValue($FolderRedirect, "AppData", "P:\.winsettings\appdata", "REG_SZ") $ = WriteValue($FolderRedirect, "Desktop", "P:\WinDesktop", "REG_SZ") $ = WriteValue($FolderRedirect, "My Music", "P:\Music", "REG_SZ") $ = WriteValue($FolderRedirect, "My Pictures", "P:\Pictures", "REG_SZ") $ = WriteValue($FolderRedirect, "My Video", "P:\Videos", "REG_SZ") $ = WriteValue($FolderRedirect, "{374DE290-123F-4565-9164-39C4925E467B}", "P:\Downloads", "REG_SZ") ; ----------------------------------------------------- ; ; User Editable Registry Settings (no need to be Admin) ; ; ----------------------------------------------------- ; ; Remove Welcome Center from User's Startup $ = DelValue ("Software\Microsoft\Windows\CurrentVersion\Run", "WindowsWelcomeCenter") ; Remove Windows Sidebar from User's Startup $ = DelValue ("Software\Microsoft\Windows\CurrentVersion\Run", "Sidebar") ; Disable Tool Tips $ = WriteValue("Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ShowInfoTip", "0", "REG_SZ") ; Disable Desktop Cleanup Wizard $ = WriteValue("Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\CleanupWiz", "NoRun", "1", "REG_DWORD") ; Disable Thumbnail Cache $ = WriteValue("Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "DisableThumbnailCache", "1", "REG_SZ") ; Always Show File Extension $ = WriteValue("Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "HideFileExt", "0", "REG_DWORD") ; Do not Automatically Search for Network Shares and printers $ = WriteValue("Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "NoNetCrawling", "1", "REG_SZ") ; Turn off Personalized Menus $ = WriteValue("Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "IntelliMenus", "No", "REG_SZ") ; Turn off New Program Highlighting $ = WriteValue("Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "Start_NotifyNewApps", "0", "REG_SZ") ; Turn off Balloon Notifications $ = WriteValue("Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "EnableBalloonTips", "0", "REG_DWORD") ; Disable the Language Bar $ = WriteValue("Software\Microsoft\CTF\LangBar", "ShowStatus", "3", "REG_DWORD") ; Hide the Control Panel icon on the Desktop $ = WriteValue("Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu", "{5399E694-6CE5-4D6C-8FCE-1D8870FDCBA0}", "1", "REG_DWORD") ;-------------------------------; ; Internet Explorer Preferences ; ;-------------------------------; ; Set Google as the Default Search Box $ = WriteValue("Software\Microsoft\Internet Explorer\SearchScopes", "DefaultScope", "{2D16E5B6-2F07-4341-934E-118468986E78}", "REG_SZ") $ = WriteValue("Software\Microsoft\Internet Explorer\SearchScopes\{2D16E5B6-2F07-4341-934E-118468986E78}", "DisplayName", "Google", "REG_SZ") $ = WriteValue("Software\Microsoft\Internet Explorer\SearchScopes\{2D16E5B6-2F07-4341-934E-118468986E78}", "URL", "http://www.google.com/search?q={searchTerms}&rls=com.microsoft:{language}&ie={inputEncoding}&oe={outputEncoding}&startIndex={startIndex?}&startPage={startPage}", "REG_SZ") ; Make Internet Explorer Flush Cache on Exit $ = WriteValue("Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache", "Persistent", "0", "REG_SZ") ; Disable Personalized Favorite Menu $ = WriteValue("Software\Microsoft\Internet Explorer\Main", "FavIntelliMenus", "No", "REG_SZ") ; ------------------------------------- ; ; Settings for an enjoyable workstation ; ; ------------------------------------- ; ; Set Visual Effects to best performance $ = WriteValue("Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects", "VisualFXSetting", "2", "REG_DWORD") ; Now let's (re)set important policies if the user is an Administrator IF InGroup( "SAMBADOMAIN\Domain Admins", "SERVER1\Domain Admins", "Administrators" ) ; -------------------------------------------------; ; Administrator Registry Keys (User Must Be Admin) ; ; -------------------------------------------------; ; Ensure that Network is functioning before loading Explorer $ = WriteValue("HKLM\Software\Policies\Microsoft\Windows NT\CurrentVersion\Winlogon", "SyncForegroundPolicy", "1", "REG_DWORD") $ = WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System", "RunLogonScriptSync", "1", "REG_DWORD") ; Shut off UAC $ = WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System", "EnableLUA", "0", "REG_DWORD") ; Disable Roaming Profiles $ = WriteValue("HKLM\Software\Policies\Microsoft\Windows\System", "LocalProfile", "1", "REG_DWORD") $ = WriteValue("HKLM\Software\Policies\Microsoft\Windows\System", "ReadOnlyProfile", "1", "REG_DWORD") ; Fix the Logon Screen $ = WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System", "LogonType", "1", "REG_DWORD") $ = WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System", "dontdisplaylastusername", "1", "REG_DWORD") ;--------------------------; ; Disable Various Services ; ;--------------------------; $ = WriteValue("HKLM\System\CurrentControlSet\Services\EMDMgmt", "DisplayName", "ReadyBoost", "REG_SZ") $ = WriteValue("HKLM\System\CurrentControlSet\Services\EMDMgmt", "Start", "3", "REG_DWORD") $ = WriteValue("HKLM\System\CurrentControlSet\Services\SysMain", "DisplayName", "Superfetch", "REG_SZ") $ = WriteValue("HKLM\System\CurrentControlSet\Services\SysMain", "Start", "3", "REG_DWORD") $ = WriteValue("HKLM\System\CurrentControlSet\Services\WerSvc", "DisplayName", "Windows Error Reporting Service", "REG_SZ") $ = WriteValue("HKLM\System\CurrentControlSet\Services\WerSvc", "Start", "3", "REG_DWORD") $ = WriteValue("HKLM\System\CurrentControlSet\Services\WSearch", "DisplayName", "Windows Search", "REG_SZ") $ = WriteValue("HKLM\System\CurrentControlSet\Services\WSearch", "Start", "3", "REG_DWORD") ;------------------------------------------; ; Disable Certain Security Center Features ; ;------------------------------------------; $ = WriteValue("HKLM\Software\Microsoft\Security Center", "AntiVirusOverride", "1", "REG_DWORD") $ = WriteValue("HKLM\Software\Microsoft\Security Center", "AntiVirusDisableNotify", "1", "REG_DWORD") $ = WriteValue("HKLM\Software\Microsoft\Security Center", "FirewallOverride", "1", "REG_DWORD") $ = WriteValue("HKLM\Software\Microsoft\Security Center", "FirewallDisableNotify", "1", "REG_DWORD") $ = WriteValue("HKLM\Software\Microsoft\Security Center", "UpdatesDisableNotify", "1", "REG_DWORD") $ = WriteValue("HKLM\Software\Policies\Microsoft\WindowsFirewall\DomainProfile", "EnableFirewall", "0", "REG_DWORD") $ = WriteValue("HKLM\Software\Policies\Microsoft\WindowsFirewall\StandardProfile", "EnableFirewall", "0", "REG_DWORD") ;------------------------; ; Enable Remote Registry ; ;------------------------; $ = WriteValue("HKLM\System\CurrentControlSet\Services\RemoteRegistry", "DisplayName", "Remote Registry", "REG_SZ") $ = WriteValue("HKLM\System\CurrentControlSet\Services\RemoteRegistry", "Start", "2", "REG_DWORD") ; -------------------------- ; ; Disable Certain Annoyances ; ; -------------------------- ; ; Disable Fast User Switching $ = WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System", "HideFastUserSwitching", "1", "REG_DWORD") ; Turn off Sleep from Shutdown Menu $ = WriteValue("HKLM\Software\Policies\Microsoft\Power\PowerSettings\abfc2519-3608-4c2a-94ea-171b0ed546ab", "ACSettingIndex", "0", "REG_DWORD") ; Turn off Windows Sidebar Altogether (below you can just remove it from starting at Windows Startup, which may be better) ; $ = WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Windows\Sidebar", "TurnOffSidebar", "1", "REG_DWORD") ; Disable Web Search for File Extension $ = WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoInternetOpenWith", "1", "REG_SZ") ; Remove Networking Icon from Taskbar $ = WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "HideSCANetwork", "1", "REG_DWORD") ; Remove Set Default Programs from the Start Menu $ = WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoSMConfigurePrograms", "1", "REG_DWORD") ; Disable Start Menu "Drag and Drop" $ = WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoChangeStartMenu", "1", "REG_DWORD") ; Disable User Tracking $ = WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoInstrumentation", "1", "REG_DWORD") ; Disable Notification Area Cleanup $ = WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoAutoTrayNotify", "1", "REG_DWORD") ; Don't Save Settings on Logout $ = WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoSaveSettings", "1", "REG_SZ") ; Disable AutoPlay $ = WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoDriveTypeAutoRun", "1", "REG_SZ") ; ---------------------------------------- ; ; Internet Explorer Preferences & Policies ; ; ---------------------------------------- ; ; Always Show Menubar $ = WriteValue("HKLM\Software\Policies\Microsoft\Internet Explorer\Main", "AlwaysShowMenus", "1", "REG_DWORD") ; Set Menubar above the Nav Bar $ = WriteValue("HKLM\Software\Policies\Microsoft\Internet Explorer\Toolbar\WebBrowser", "ITBar7Position", "1", "REG_DWORD") ; Remove the Command Bar $ = WriteValue("HKLM\Software\Policies\Microsoft\Internet Explorer\Restrictions", "NoCommandBar", "1", "REG_DWORD") ; Remove the Search Box ; $ = WriteValue("HKLM\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions", "NoSearchBox", "1", "REG_DWORD") ; Disable the Phishing Filter $ = WriteValue("HKLM\Software\Policies\Microsoft\Internet Explorer\PhishingFilter", "Enabled", "0", "REG_DWORD") ; Always Prompt when Downloading Files $ = WriteValue("HKLM\Software\Policies\Microsoft\Internet Explorer\Restrictions", "AlwaysPromptDownload", "1", "REG_SZ") ; ------------------------------------------- ; ; Windows Media Player Preferences & Policies ; ; ------------------------------------------- ; ; Do Not Show First Use Dialog $ = WriteValue("HKLM\Software\Policies\Microsoft\WindowsMediaPlayer", "GroupPrivacyAcceptance", "1", "REG_DWORD") ; Disable Media Player Automatic Updates $ = WriteValue("HKLM\Software\Policies\Microsoft\WindowsMediaPlayer", "DisableAutoUpdate", "1", "REG_DWORD") ; Prevent Windows DRM Internet Access $ = WriteValue("HKLM\Software\Policies\Microsoft\WMDRM", "DisableOnline", "1", "REG_DWORD") ; Prevent Windows Media Player Media Sharing $ = WriteValue("HKLM\Software\Policies\Microsoft\WindowsMediaPlayer", "PreventLibrarySharing", "1", "REG_DWORD") ; ----------------------------------------------------- ; ; Good Preferences & Policies for a network workstation ; ; ----------------------------------------------------- ; ; Force Classic Start Menu $ = WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoSimpleStartMenu", "1", "REG_SZ") ; Force Classic Control Panel $ = WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "ForceClassicControlPanel", "1", "REG_DWORD") ; Remove Network Locations Icon on Desktop $ = WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoNetHood", "1", "REG_DWORD") ; Always Display the Menubar with Windows Explorer $ = WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "AlwaysShowClassicMenu", "1", "REG_DWORD") ; Turn on Classic Shell in Windows Explorer ; $ = WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "ClassicShell", "1", "REG_DWORD") ; Remove Documents Submenu from Start Menu $ = WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoRecentDocsMenu", "1", "REG_DWORD") ; Disable Quicklaunch & other Toolbars on the Taskbar $ = WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoToolbarsonTaskbar", "1", "REG_DWORD") ENDIF ENDIF