User Tools

Site Tools


faq:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
faq:start [2010/02/06 23:23]
77.37.11.151 TDvAtyXI
faq:start [2014/06/28 00:57] (current)
Line 1: Line 1:
-9OKIKr ​ <​a ​href="​http://​qhhtkpscpaoc.com/">​qhhtkpscpaoc</​a>, ​[url=http://horpqkzadzjs.com/]horpqkzadzjs[/url], [link=http://mzpkevubjxlt.com/]mzpkevubjxlt[/link], http://lignetpgzjkb.com/+====== Nano Tera Public Hints and Tips FAQ ====== 
 + 
 + 
 +A collection of useful tips  http://​www.nano-tera.com.au/​public/​dokuwiki/​doku.php?​id=faq:​start ​   - 
 + 
 +===== To turn off Automatic loading of MSN in windows XP ===== 
 +  
 +http://​support.microsoft.com/​default.aspx?​scid=kb;​en-us;​302089  
 + 
 +Start run **gpedit.msc** 
 + 
 +===== Problem with more than 128Gig disks ===== 
 +  
 +http://​support.microsoft.com/​default.aspx?​scid=kb;​en-us;​305098 
 + 
 + 
 + 
 +===== Question:​WPAD Automatic Proxy Discovery =====  
 + 
 + 
 +When automatic discovery is selected windows does a DNS query for "​wpad"​ - with no domain, the computer will lookup wpad in whatever the local domain is set to be in the TCPIP settings. ie. wpad.mydomain.local etc... When one is found it will then look for a file (using a html get) called wpad.dat - in that is a text script which returns the name of the proxy to use.  
 + 
 +<code> 
 + 
 +example wpad.dat 
 +function FindProxyForURL(url,​ host) 
 +  { 
 +    if ( (isPlainHostName(host) || dnsDomainIs(host,​ "​mail.domain-ltd.com.au"​) ​  || dnsDomainIs(host,​ "​server01.domain.domain-ltd.com.au"​) ​ || dnsDomainIs(host,​ "​server.ravxxxxx.domain-ltd.com.au"​) || isInNet(host,"​192.168.0.0","​255.255.0.0"​) ) ) 
 +      return "​DIRECT";​ 
 +    else 
 +      return "PROXY proxy:​8080;";​ 
 +  } 
 + 
 +</​code>​ 
 + 
 + 
 +Also need to make this mime type for iis, iis admin, properties of server, mime types need to add .dat as an "​application/​octet stream" ​  
 + 
 + 
 +===== How to test SMTP server ​===== 
 + 
 +Telnet to the server port 25 
 + 
 +<​code>​ 
 +EHLO test.com 
 +MAIL FROM: Admin@test.com 
 +RCPT TO: User@Domain.Com 
 +DATA 
 +Test email line 1 
 +test email line 2 
 + 
 +
 + 
 +quit</​code>​ 
 + 
 +OR  
 + 
 +<​code>​ 
 +HELO xxx.com.au 
 +MAIL FROM: <​xxx@xxx.com.au>​ 
 +RCPT TO: <​xxx@xxx.com.au>​ 
 +DATA 
 +Test email line 1 
 +test email line 2 
 + 
 +
 +</​code>​ 
 + 
 +<​code>​ 
 +set WshShell = WScript.CreateObject("WScript.Shell"​) 
 + 
 +'open and activate a "​safe"​ notepad in case it all goes wrong 
 +WshShell.Run "​notepad"​ 
 +WshShell.Run "​telnet 192.168.54.253 25" 
 + 
 +WshShell.AppActivate "​notepad"​ 
 +WshShell.AppActivate "​telnet"​ 
 + 
 +'​wscript.echo "​Hello"​ 
 +WScript.Sleep 1000 
 + 
 +WshShell.SendKeys "EHLO test.com{ENTER}"​ 
 +WScript.Sleep 1000 
 +WshShell.SendKeys "MAIL FROM: <​mailtest@test.com>​{ENTER}"​ 
 +WScript.Sleep 1000 
 +WshShell.SendKeys "RCPT TO: <​mailtest@recipient.domain.com>​{ENTER}"​ 
 +WScript.Sleep 1000 
 +WshShell.SendKeys "​DATA{ENTER}"​ 
 +WScript.Sleep 1000 
 +WshShell.SendKeys "Test email - line 1 {ENTER}"​ 
 +WshShell.SendKeys "Test email - line 2 {ENTER}"​ 
 +WshShell.SendKeys "Test email - line 3 {ENTER}"​ 
 +WshShell.SendKeys "Test email - line 4 {ENTER}"​ 
 +WScript.Sleep 1000 
 +WshShell.SendKeys "​.{ENTER}"​ 
 +' wait 10 seconds so you can see what happened 
 +WScript.Sleep 10000 
 +WshShell.SendKeys "​quit{ENTER}"​ 
 +WScript.Sleep 1000 
 + 
 +wscript.echo "​bye"​ 
 + 
 +</​code>​ 
 + 
 +===== https secure server setup. ===== 
 + 
 +Making a certificate and installing in exchange server 2003  
 + 
 +http://www.msexchange.org/​tutorials/​SSL_Enabling_OWA_2003.html 
 + 
 +http://​www.msexchange.org/​tutorials/​Securing-Exchange-Server-2003-Outlook-Web-Access-Chapter5.html 
 + 
 +Then how to allow user to accept certificate once it is published. Including copy of the script to upload the certificate. Need to make special **.cer** file from current certificate. 
 + 
 +example from www.elsxxx.xxx.xx ​ rootinstall.asp 
 + 
 +http://​www.elsxxx.xxx.xx/​rootinstall.asp 
 + 
 +<​code>​ 
 +<​HTML>​ 
 +<​HEAD>​ 
 +<​TITLE>​Installing A Root Certificate</​TITLE>​ 
 +<​BR>​Root Certificate Authority Installation 
 +<​BR>​ 
 +<​BR>​ 
 + 
 +<%@ LANGUAGE="​VBScript"​%>​ 
 +<% 
 +Set fs = CreateObject("​Scripting.FileSystemObject"​) 
 +Set MyFile = fs.OpenTextFile("​c:​\certificates\www.elsxxx.xxx.xx.cer",​ 1) 
 + 
 +Output = ""​ 
 + 
 +Do While MyFile.AtEndOfStream <> true 
 +  line = Chr(34) & MyFile.ReadLine & Chr(34) 
 +  If MyFile.AtEndOfStream <> true then 
 +    line = line & " & _" & Chr(10) 
 +  End If 
 +  Output = Output & line 
 +Loop 
 + 
 +MyFile.Close 
 + 
 +Set MyFile = Nothing 
 +Set fs = Nothing 
 +%> 
 + 
 +<SCRIPT language="​VBSCRIPT">​ 
 +on error resume next 
 +Dim Str, CEnroll 
 + 
 +Set CEnroll = CreateObject("​CEnroll.CEnroll.1"​) 
 +Str = <% Response.Write Output %> 
 + 
 +CEnroll.installPKCS7(Str) 
 + 
 +Set CEnroll = Nothing 
 +</​SCRIPT>​ 
 +</​HEAD>​ 
 +</​HTML>​ 
 +</​code>​ 
 + 
 +===== Excel code to convert to list of emails ===== 
 +To convert / strip out the email address portion of an exported GAL from exchange open the list in Excel. Assuming Column F has the email addresses then use the following formula. 
 + 
 +^G^H^I^ 
 +|=FIND("​SMTP:",​F5,​1)|=FIND("​%",​F5,​G5+5)|=MID(F5,​G5+5,​H5-G5-5)| 
 + 
 +Then copy / paste that formula for all rows, copy the Column with the addresses and past special as text into column J and you have the primary SMTP address for each user.  
 + 
 + 
 +===== Useful Command Line Scripts ===== 
 + 
 + 
 +==== Checking version of Operating system ==== 
 + 
 +<​code>​ 
 + 
 +REM Obtain OS version information 
 + 
 +FOR /F "​tokens=5 delims=] " %%C IN ('​ver'​) DO SET VER=%%C 
 + 
 +REM Windows 7 is 6.1.7600 
 +REM Vista and Windows Server 2008 is 6.0.6002 
 +REM Windows Server 2003 is 5.2.3790 
 +REM XP is 5.1.2600 
 +REM NT4 is 4.0 
 + 
 +IF %VER% EQU 4.0 GOTO NT4 
 +IF %VER% NEQ 5.1.2600 GOTO NOT_XP 
 + 
 +REM Check x86  
 +IF %PROCESSOR_ARCHITECTURE% == x86 
 + 
 +</​code>​ 
 + 
 +==== Make Users ==== 
 + 
 +domain for a mixture of NT and Active Directory  
 +<​code>​ 
 +net use v: \\mexxxr\d$ 
 +v: 
 + 
 +@echo MUST BE RUN FROM domain DOMAIN CONTROLLER ()  
 +@echo remember to make the domain account (for the email) 
 + 
 +@echo make the domain account 
 + 
 +net user %1 %1 /add /domain /​homedir:​\\server\%1$ /​profilepath:​\\server\ntprofiles$\%1 /​scriptpath:​users.bat 
 + 
 +@echo now make the home and profile folders 
 +cd \users 
 +mkdir %1 
 +cacls %1 /e /G domain\%1:​F ​  
 +rmtshare \\server\%1$=d:​\users\%1  
 +cd ntprofiles 
 +mkdir %1 
 +cacls %1 /e /G domain\%1:​F 
 +cd .. 
 + 
 +</​code>​ 
 + 
 +==== Active directory only ==== 
 +<​code>​ 
 +net use v: \\server\D$ 
 +@echo off 
 +if "​%1"​==""​ then goto error 
 + 
 +net user %1 %1 /add /​homedir:​\\server\%1$ /​profilepath:​\\server\ntprofiles$\%1 /​scriptpath:​users.bat /domain 
 +dsmod user "​cn=%1,​cn=users,​dc=ravxxxxx,​dc=domain-ltd,​dc=com,​dc=au"​ -hmdrv H: -company "Pty Ltd" -mustchpwd yes -pwdneverexpires no 
 + 
 +v: 
 +cd \users 
 +mkdir %1 
 +cacls %1 /e /G ravxxxxx\%1:​F ​  
 +rmtshare \\server\%1$=D:​\users\%1  
 +cd \users\ntprofiles 
 +mkdir %1 
 +cacls %1 /e /G ravxxxxx\%1:​F 
 +goto ok 
 +:error 
 +Echo No username specified - try again 
 +:ok 
 +cd \users 
 + 
 +</​code>​ 
 +==== Login batch files ==== 
 + 
 +domain Net Logon, users.bat  
 + 
 +<​code>​ 
 +@echo off 
 +ECHO Welcome to the domain Network 
 +ECHO You have successfully logged on to the network. %0 version 7.0 
 +NET USE  
 +NET USE H: /home 
 + 
 +net time \\pluto /set /y 
 + 
 +net use r: /delete /y > nul 
 +net use t: /delete /y > nul 
 +NET USE G: /delete /y > nul 
 +NET USE P: /delete /y > nul 
 +NET USE L: /delete /y > nul 
 + 
 +NET USE R: \\server\projects 
 + 
 +@rem connect to servers (was Venus) data if allowed to  
 +if exist \\server\data\*.* net use T: \\server\data  
 + 
 +@rem connect to server accounts if allowed to  
 +if exist \\server\accounts\*.* net use G: \\server\accounts 
 +  
 +@rem connect to purchasing if allowed to  
 +if exist \\server\purchasing\*.* net use p: \\server\purchasing  
 + 
 +@rem Now connect L drive to Kens legal folder if allowed to read it. 
 +if exist \\server\ken$\*.* net use L: \\server\ken$  
 + 
 +@rem drives all connected now do rest of stuff  
 +@rem  
 + 
 +@rem now move old flag files to subfolder on C:\ 
 +if not exist C:\flags\. mkdir c:\flags 
 +if exist c:\*.reg move c:\*.reg c:\flags 
 + 
 +@rem update templates folder to point to server 
 +if exist c:​\flags\templates2.reg goto regdone2 
 + copy %logonserver%\netlogon\templates2.reg C:\flags 
 + regedit /s c:​\flags\templates2.reg 
 + if exist "C:\program files\microsoft office\office\startup\Shortcut to KJGSupport.Dot.lnk"​ delete "​C:​\program files\microsoft office\office\startup\Shortcut to KJGSupport.Dot.lnk"​ 
 + if exist "​C:​\program files\microsoft office\office\startup\."​ copy "​\\server\templates\office\KJGSupport.Dot"​ "​C:​\program files\microsoft office\office\startup"​ 
 +:regdone2 
 + 
 +if exist c:​\flags\set_home2.reg goto regdone 
 + copy %logonserver%\netlogon\set_home2.reg C:\flags 
 + regedit /s c:​\flags\set_home2.reg 
 +:regdone 
 + 
 +rem Now set windows update to use our own SUS server 
 +if exist c:​\flags\set_sus.reg goto regdone1 
 + copy %logonserver%\netlogon\set_sus.reg C:\flags 
 + regedit /s c:​\flags\set_sus.reg 
 +:regdone1 
 + 
 +@rem update desktop to reflect computer - pipe errors to nul so no popup error  
 +%logonserver%\netlogon\bginfo.exe %logonserver%\netlogon\mysetup.bgi /timer:0 /log:nul 
 + 
 +rem fix registry to run VBS 
 +regedit /s %logonserver%\netlogon\vbs_run.reg 
 + 
 +rem now install printers  
 +start %logonserver%\netlogon\install_printers.vbs  
 + 
 +rem Now install antivirus  
 +call %logonserver%\netlogon\vpgriffin.bat 
 + 
 +:​slow_exit 
 +</code> 
 + 
 +==== Backup and eject tape ==== 
 + 
 +NOTE - replace % in here with X 
 +<file> 
 +rem @echo off 
 +rem  
 +rem Backup type A 
 +rem  
 +REM get remote storage manager to list the tape currently in the drive  
 +rsm refresh /​LF"​Sony AIT 35 GB LVD Drive"​ 
 +rem needs sleep.exe to be available - waits 30 seconds so tape can be read 
 +sleep 30 
 + 
 +rem now do tricky to get date/time available double % i replace with "\%\% i" 
 +for /f "​Tokens=1-4 Delims=/ " \%\% i in ('date /t') do set dt=\%\%i-\%\%j-\%\%k-\%\%l 
 +for /f "​Tokens=1"​ \%\%i in ('time /t') do set tm=-\%\%i 
 + 
 +set tm=%tm::​=-% 
 +set dtt=XdtXXtmXA 
 + 
 +echo "​%computername%-%dtt%"​ 
 + 
 +rem edit below to call backup program - giving tape fixed name including todays date.  
 + 
 +rem  
 +rem Now put the first part onto the tape (full backup of users, data and system state) 
 +C:​\WINNT\system32\ntbackup.exe backup "​@d:​\data\relxxxxx\administration\it\utility\daily_backup_a1.bks"​ /n "​%computername%-%dtt%"​ /d "daily %dtt%" /v:no /r:no /rs:no /hc:on /m normal /j "daily %dtt%" /l:F /p "8mm AIT1" /UM 
 +rem now append part 2 (an incremental of GIS and other) 
 +C:​\WINNT\system32\ntbackup.exe backup "​@d:​\data\relxxxxx\administration\it\utility\daily_backup_a2.bks" ​/a /t "​%computername%-%dtt%"​ /d "daily %dtt%" /v:no /r:no /rs:no /hc:on /m differential /j "daily %dtt%" /l:F  
 + 
 + 
 +rem now eject the tape !! 
 + 
 +rsm.exe eject /​PF"​%computername%-%dtt% - 1" /astart 
 + 
 +rem e 
 + 
 +</file> 
 + 
 +===== VBS to archive backup logs ===== 
 + 
 + 
 +vbs code to copy and rename log files - can be scheduled to run silently. 
 + 
 +backup01.log becomes 20_11_2004_22_31_backup.log 
 + 
 +using the date last modified (the end of the backup). 
 + 
 +sample batch file  
 + 
 +<​file>​ 
 +W:​\backuplogs\archivelogs.vbs "​E:​\Documents and Settings\corey\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data" ​ W:\logs 
 +</​file>​ 
 + 
 +vbs code  
 +  
 +<code qbasic>​ 
 +'##############################################################################​ 
 +'##############################################################################​ 
 + 
 +'##############################################################################​ 
 +'##############################################################################​ 
 + 
 +DIM objIntExplorer ​ '​Handle for Internet Explorer application manipulation 
 +DIM objWshShell ​    '​Handle for running system commands 
 + 
 +Set objWshShell = CreateObject("​WScript.Shell"​) 
 + 
 +' have args  "​path_to_logs"​ "​Path_to_archive"​ 
 +' then copy each file matching to the same name appended with the date/time created (if already their leave it)/ 
 +' if arguments given go to not verbose modejust do it.  
 + 
 +'​msgbox wscript.arguments.count 
 +'Set objArgs = WScript.Arguments 
 +'For I = 0 to objArgs.Count - 1 
 +' ​  ​WScript.Echo objArgs(I) 
 +'​Next 
 + 
 +if wscript.arguments.count < 2 then  
 +   ​pathtologs="​E:​\Documents and Settings\corey\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data"​ 
 +   ​pathtoarchive="​W:​\logs"​ 
 +   ​verbose=true 
 +else 
 + pathtologs=wscript.arguments(0) 
 + pathtoarchive=wscript.arguments(1) 
 +    verbose=false 
 +end if 
 + 
 +
 +'​create a display windows  
 +if verbose then  
 +   CALL SetupIE 
 +   '​Display welcome message 
 +   CALL UserPrompt("<​h3>​JETSOFT<​br>​Backup logs archiver</​h3>"​) 
 +   call userprompt ("​Looking for logs in<​br><​br>"​ & pathtologs & "<​br><​br>​will copy files to <​br><​br>"​ & pathtoarchive & "<​br>"​ ) 
 + 
 +end if 
 +    
 +   ​resultlog = ArchiveLogs(pathtologs,​pathtoarchive)  
 +    
 +if verbose then  
 +   call userprompt (  resultlog ) 
 +  ' kill the explorer window after 60 seconds 
 +  '​WScript.Sleep (60000) 
 +  'on error resume next 
 +  '​objIntExplorer.Quit() 
 +end if  
 +Set objIntExplorer = Nothing 
 +Set objWshShell = Nothing 
 + 
 +'Exit script 
 +Wscript.Quit() 
 + 
 + 
 + 
 +'##############################################################################​ 
 +'##############################################################################​ 
 +'##############################################################################​ 
 +'##############################################################################​ 
 +'####### ​  ​archivelogs - actually copy and rename to date base name  
 +'##############################################################################​ 
 +'##############################################################################​ 
 +'##############################################################################​ 
 + 
 +Function ArchiveLogs(pathtologs,​pathtoarchive) 
 +   Dim fso, f, f1, fc, s 
 +   Set fso = CreateObject("​Scripting.FileSystemObject"​) 
 +   Set f = fso.GetFolder(pathtologs) 
 +   Set fc = f.Files 
 +   s = s & "<​table border=""​1""><​br>"​ 
 +    
 +   s = s & "<​tr><​td><​b>​Name</​b></​td><​td><​b>​Copied to</​b></​td></​tr>"​ 
 + 
 +   For Each f1 in fc 
 + 
 +   '​ check for right filename backup99.log ​  
 +   Set regEx = New RegExp ​  '​ Create a regular expression. 
 +   ​regEx.Pattern = "​^backup\d\d.log$" ​  '​ Set pattern looking for backup99.log . 
 +   ​regEx.IgnoreCase = True   '​ Set case insensitivity. 
 +   ​regEx.Global = True   '​ Set global applicability. 
 +   Set Matches = regEx.Execute( f1.name )   '​ Execute search. 
 +  ' if it is one then copy it   
 +   ​if ​ ( matches.count > 0 )  then  
 +      ' cleanup name and make safe for filename ​  
 +      nname=replace(replace(cstr( FormatDateTime( f1.DateLastModified ,2) ) & "​_"​ & cstr( FormatDateTime( f1.DateLastModified ,4)  & "​_"​ & f1.name ​ ),"/","​_"​),":","​_"​) 
 +      nname=left(nname,​len(nname)-6) &"​.log"​ 
 +   'add archive folder path to name  
 +   tname= ​ pathtoarchive & "​\"​ & nname  
 +  
 +      s = s & "<​tr>"​ 
 +      s = s & "<​td><​b>"​ & f1.name & "</​b></​td>"​ 
 +   s = s & "<​td><​b>"​ &  tname &  "<​b></​td>"​  
 +   ' make the file copy here ! set to no overwrite but continue on error 
 +   on error resume next 
 +   f1.copy ​ tname , false 
 +   on error goto 0  
 +      
 +      s = s & "</​tr>"​ 
 +   ​else 
 +       '​msgbox f1.name & " ignored " 
 +    s = s & "<​td>"​ & f1.name & "</​td><​td>​Ignored</​td>"​ 
 +   end if  
 +     
 +   ​Next 
 +   s = s & "</​table>"​ 
 + 
 +   ​ArchiveLogs = s 
 +    
 +End Function 
 + 
 + 
 +'##############################################################################​ 
 +'##############################################################################​ 
 +' IE Window functions start - hm.. tak bez haseł? 
 +'##############################################################################​ 
 +'##############################################################################​ 
 + 
 + 
 +'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''​ 
 +
 +' Sub:      UserPrompt 
 +
 +' Purpose: ​ Use Internet Explorer as a status message window 
 +
 +' Input: ​   strPrompt 
 +
 +' Output: ​  ​Output is sent to the open Internet Explorer window 
 +
 +' Usage: 
 +
 +'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''​ 
 +Private SUB UserPrompt(strPrompt) 
 + 
 +  ON ERROR RESUME NEXT 
 + 
 +  objIntExplorer.Document.WriteLn (strPrompt & "<​br />"​) 
 + 
 +END SUB 
 + 
 + 
 +'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''​ 
 +
 +' Sub:      SetupIE 
 +
 +' Purpose: ​ Setup Internet Explorer for use as a status message window 
 +
 +' Usage: ​   Call SetupIE 
 +
 +'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''​ 
 +Private SUB SetupIE() 
 + 
 +  ON ERROR RESUME NEXT 
 + 
 +  DIM strTitle ​   'Title of IE window 
 +  DIM intCount ​   '​Counter used during AppActivate 
 + 
 +  strTitle = "​Backup logs archiver"​ 
 + 
 +  '​Create reference to objIntExplorer 
 +  'This will be used for the user messages. Also set IE display attributes 
 +  Set objIntExplorer = WScript.CreateObject("​InternetExplorer.Application"​) 
 +  With objIntExplorer 
 +    .Navigate "​about:​blank"​ 
 +    .ToolBar = 0 
 +    .Menubar = 0 
 +    .StatusBar = 0 
 +    .Width = 650 
 +    .Height = 430 
 +    .Left = 100 
 +    .Top = 100 
 +  END With 
 + 
 +  'Set some formating 
 +  With objIntExplorer.Document 
 +    .WriteLn ("<​!doctype html public>"​) 
 +    .WriteLn ("<​head>"​) 
 +    .WriteLn ("<​title>"​ & strTitle & "</​title>"​) 
 +    .WriteLn ("<​style type=""​text/​css"">"​) 
 +    .WriteLn ("body {text-align:​ left; font-family:​ arial; font-size: 10pt}"​) 
 +    .WriteLn ("</​style>"​) 
 +    .WriteLn ("</​head>"​) 
 +  END With 
 + 
 +  'Wait for IE to finish 
 +  DO WHILE (objIntExplorer.Busy) 
 +    WScript.Sleep 200 
 +  LOOP 
 + 
 +  'Show IE 
 +  objIntExplorer.Visible = 1 
 + 
 +  'Make IE the active window 
 +  FOR intCount = 1 TO 100 
 +    IF objWshShell.AppActivate(strTitle) THEN EXIT FOR 
 +    WScript.Sleep 50 
 +  NEXT 
 + 
 +END SUB 
 +
 +'##############################################################################​ 
 +'##############################################################################​ 
 +' IE Window finished 
 +'##############################################################################​ 
 +'##############################################################################</​code>​ 
 + 
 + 
 + 
 +===== Visual basic to install printers ===== 
 + 
 +<code qbasic>​ 
 +Dim objIntExplorer ​ '​Handle for Internet Explorer application manipulation 
 +Dim objWshNetwork ​  '​Handle for manipulating network connections 
 +Dim objWshShell ​    '​Handle for running system commands 
 + 
 +Set objWshShell = CreateObject("​WScript.Shell"​) 
 + 
 +Set WshNetwork = WScript.CreateObject("​WScript.Network"​) 
 + 
 +On Error Resume Next 
 + 
 +Set oPrinters = WshNetwork.EnumPrinterConnections 
 + 
 +badserverfound =false 
 +isdonealready = False 
 + 
 +For i = 0 To oPrinters.Count - 1 Step 2 
 +    '​WScript.Echo Left(oPrinters.Item(i + 1), 15)  
 +    If Left(oPrinters.Item(i + 1), 15) = "​\\server\Canon"​ Then isdonealready = True 
 +    If Left(oPrinters.Item(i + 1), 15) = "​\\server\HP Co" Then badserverfound = True 
 + 
 +Next 
 + 
 +if badserverfound then  
 +    '​WScript.Echo "Bad printer found"  
 +    Call SetupIE 
 + 
 +    '​Display welcome message 
 +    Call UserPrompt("<​h3>​Welcome to the domain<​br>​Perth Office Network Printer Installer V3.1</​h3>"​) 
 + 
 + 
 +    printer1 = "​\\server\HPCLJ5m"​ 
 +    
 +    WshNetwork.RemovePrinterConnection printer1 
 +   Call PrinterRemoveResult(printer1) 
 +      
 +    printer1 = "​\\server\HPLJ5"​ 
 +    WshNetwork.RemovePrinterConnection printer1 
 +   Call PrinterRemoveResult(printer1) 
 +  
 +    WScript.Sleep (10000) 
 +    objIntExplorer.Quit() 
 + 
 + 
 +end if 
 + 
 +If Not isdonealready Then 
 + 
 +    'Setup IE for use as a status message window 
 +    Call SetupIE 
 + 
 +    '​Display welcome message 
 +    Call UserPrompt("<​h3>​Welcome to the domain<​br>​Perth Office Network Printer Installer V3.1</​h3>"​) 
 + 
 +    saveme = GetDefaultPrinter() 
 +    winver = GetWindowsVersion() 
 + 
 +    Call UserPrompt ("​Default printer was " &​saveme&"​ <​br>"​) 
 + 
 +    '##############################################################​ 
 +    ' add new printers now on server 
 +    '##############################################################​ 
 +    printer1 = "​\\server\canon3200"​ 
 +    WshNetwork.AddWindowsPrinterConnection printer1 
 +    Call PrinterConnectResult(printer1) 
 + 
 +    printer1 = "​\\server\canon405"​ 
 +    WshNetwork.AddWindowsPrinterConnection printer1 
 +    Call PrinterConnectResult(printer1) 
 + 
 +    printer1 = "​\\server\hp2500a3"​ 
 +    WshNetwork.AddWindowsPrinterConnection printer1 
 +    Call PrinterConnectResult(printer1) 
 + 
 +    printer1 = "​\\server\2500plot"​ 
 +    WshNetwork.AddWindowsPrinterConnection printer1 
 +    Call PrinterConnectResult(printer1) 
 + 
 +    printer1 = "​\\server\755plot"​ 
 +    WshNetwork.AddWindowsPrinterConnection printer1 
 +    Call PrinterConnectResult(printer1) 
 + 
 +    printer1 = "​\\server\hp5si"​ 
 +    WshNetwork.AddWindowsPrinterConnection printer1 
 +    Call PrinterConnectResult(printer1) 
 +     
 +    printer1 = "​\\server\hplj2100"​ 
 +    WshNetwork.AddWindowsPrinterConnection printer1 
 +    Call PrinterConnectResult(printer1) 
 +     
 +     
 +    printer1 = "​\\server\SHARPAR-205"​ 
 +    WshNetwork.AddWindowsPrinterConnection printer1 
 +    Call PrinterConnectResult(printer1) 
 +     
 +    '##############################################################​ 
 +    ' now remove the old ones 
 +   
 +    printer1 = "​\\plotter\hp1600"​ 
 +    WshNetwork.RemovePrinterConnection printer1 
 +    Call PrinterRemoveResult(printer1) 
 +     
 +    printer1 = "​\\plotter\hp2100"​ 
 +    WshNetwork.RemovePrinterConnection printer1 
 +    Call PrinterRemoveResult(printer1) 
 +     
 +     
 +    printer1 = "​\\plotter\hp2500c"​ 
 +    WshNetwork.RemovePrinterConnection printer1 
 +    Call PrinterRemoveResult(printer1) 
 +     
 +    printer1 = "​\\plotter\hp2500cp"​ 
 +    WshNetwork.RemovePrinterConnection printer1 
 +    Call PrinterRemoveResult(printer1) 
 +     
 +    printer1 = "​\\plotter\hp5si"​ 
 +    WshNetwork.RemovePrinterConnection printer1 
 +    Call PrinterRemoveResult(printer1) 
 +     
 +    printer1 = "​\\plotter\hp7550c"​ 
 +    WshNetwork.RemovePrinterConnection printer1 
 +    Call PrinterRemoveResult(printer1) 
 +     
 +    printer1 = "​\\plotter\colorlaserjet5m"​ 
 +    WshNetwork.RemovePrinterConnection printer1 
 +    Call PrinterRemoveResult(printer1) 
 +     
 +    printer1 = "​\\plotter\laser5"​ 
 +    WshNetwork.RemovePrinterConnection printer1 
 +    Call PrinterRemoveResult(printer1) 
 +     
 +    printer1 = "​\\plotter\sharpar-205"​ 
 +    WshNetwork.RemovePrinterConnection printer1 
 +    Call PrinterRemoveResult(printer1) 
 +     
 +     
 +    '##############################################################​ 
 +    ' now set the default printer to the equivalent one 
 +    'Call UserPrompt ("​Default printer was -<​b>"​ &​saveme&"​-</​b><​br>"​) 
 +    Select Case saveme 
 +        case "​\\PLOTTER\HP LaserJet 2100 Series PS" ​    ​newdefault="​\\server\hplj2100"​ 
 +    ' 
 +        case "​\\PLOTTER\HP LaserJet 5Si" ​       newdefault="​\\server\hp5si"​ 
 +    ' 
 +        case "​\\PLOTTER\HP LaserJet 5" ​     newdefault="​\\server\HPLJ5"​ 
 +    ' 
 +        case "​\\PLOTTER\SHARP AR-205 PCL6" ​     newdefault="​\\server\SHARPAR-205"​ 
 +    ' 
 +        case else   ​newdefault=""​ 
 +    ' 
 +    End Select 
 +    ' 
 +    'Call UserPrompt ("​Default printer now set to <​b>"​ &​newdefault&"</​b><​br>"​) 
 +     
 +    If newdefault <> ""​ Then 
 +        WshNetwork.setdefaultPrinter newdefault 
 +        Call UserPrompt ("​Default printer now set to <​b>"​ &​newdefault&"</​b><​br>"​) 
 +     
 +    End If 
 +                               
 +    '##############################################################​ 
 +     
 +     
 +    ''''''​ 
 +    '​Inform user that logon process is done 
 +    Call UserPrompt("​Finished - all printers now hosted by server rather than plotter."​) 
 +     
 +    objWshShell.regwrite "​HKLM\Software\Microsoft\Windows script host\settings\remote",​ "​1",​ "​REG_SZ"​ 
 +     
 +    'Wait 10 seconds 
 +    WScript.Sleep (10000) 
 +    'Close Internet Explorer 
 +    objIntExplorer.Quit() 
 + 
 +End If 
 + 
 + 
 + 
 +Set objWshNetwork = Nothing 
 +Set objIntExplorer = Nothing 
 +Set objWshShell = Nothing 
 + 
 +  'Exit script 
 + 
 +Wscript.Quit() 
 + 
 + 
 +'##############################################################​ 
 + 
 +'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''​ 
 +
 +' Sub:      UserPrompt 
 +
 +' Purpose: ​ Use Internet Explorer as a status message window 
 +
 +' Input: ​   strPrompt 
 +
 +' Output: ​  ​Output is sent to the open Internet Explorer window 
 +
 +' Usage: 
 +
 +'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''​ 
 +Private Sub UserPrompt(strPrompt) 
 + 
 +  On Error Resume Next 
 + 
 +  objIntExplorer.Document.WriteLn (strPrompt & "<​br />"​) 
 + 
 +End Sub 
 + 
 + 
 +'##############################################################​ 
 + 
 +'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''​ 
 +
 +' Sub:      SetupIE 
 +
 +' Purpose: ​ Setup Internet Explorer for use as a status message window 
 +
 +' Usage: ​   Call SetupIE 
 +
 +'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''​ 
 +Private Sub SetupIE() 
 + 
 +  On Error Resume Next 
 + 
 +  Dim strTitle ​   'Title of IE window 
 +  Dim intCount ​   '​Counter used during AppActivate 
 + 
 +  strTitle = "​Automatic printer changeover script status"​ 
 + 
 +  '​Create reference to objIntExplorer 
 +  'This will be used for the user messages. Also set IE display attributes 
 +  Set objIntExplorer = WScript.CreateObject("​InternetExplorer.Application"​) 
 +  With objIntExplorer 
 +    .Navigate "​about:​blank"​ 
 +    .ToolBar = 0 
 +    .Menubar = 0 
 +    .StatusBar = 0 
 +    .Width = 650 
 +    .Height = 430 
 +    .Left = 100 
 +    .Top = 100 
 +  End With 
 + 
 +  'Set some formating 
 +  With objIntExplorer.Document 
 +    .WriteLn ("<​!doctype html public>"​) 
 +    .WriteLn ("<​head>"​) 
 +    .WriteLn ("<​title>"​ & strTitle & "</​title>"​) 
 +    .WriteLn ("<​style type=""​text/​css"">"​) 
 +    .WriteLn ("body {text-align:​ left; font-family:​ arial; font-size: 10pt}"​) 
 +    .WriteLn ("</​style>"​) 
 +    .WriteLn ("</​head>"​) 
 +  End With 
 + 
 +  'Wait for IE to finish 
 +  Do While (objIntExplorer.Busy) 
 +    WScript.Sleep 200 
 +  Loop 
 + 
 +  'Show IE 
 +  objIntExplorer.Visible = 1 
 + 
 +  'Make IE the active window 
 +  For intCount = 1 To 100 
 +    If objWshShell.AppActivate(strTitle) Then Exit For 
 +    WScript.Sleep 50 
 +  Next 
 + 
 +End Sub 
 +'##############################################################​ 
 + 
 + 
 +Sub PrinterConnectResult(strPrintShare) 
 + 
 +  'Check error condition and output appropriate user message 
 + 
 +  If Err <> 0 Then 
 +    strMsg = "​Unable to connect to network printer. " & vbCrLf & _ 
 +             "​Please contact the IT department " & vbCrLf & _ 
 +             "​Let them know that you are unable to connect to the '"​ _ 
 +             & strPrintShare & "'​ printer"​ 
 +    objWshShell.Popup strMsg, , "Add printer error !", 48 
 +  Else 
 +    Call UserPrompt("​Successfully added printer connection to " & strPrintShare) 
 +  End If 
 + 
 +  Err.Clear 
 + 
 +End Sub 
 +'##############################################################​ 
 + 
 +Sub PrinterRemoveResult(strPrintShare) 
 + 
 +  'Check error condition and output appropriate user message 
 + 
 +   
 +     Call UserPrompt("​Successfully removed printer connection to " & strPrintShare) 
 +  
 + 
 +  Err.Clear 
 + 
 +End Sub 
 + 
 +' ############################################################​ 
 + 
 +Function GetDefaultPrinter() 
 + 
 +t = objWshShell.regread("​HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device"​) 
 + 
 + 
 +GetDefaultPrinter = split(t, ",",​ -1, 1)(0) 
 + 
 + 
 +End Function 
 + 
 + 
 +' ################################################################​ 
 + 
 +Function GetWindowsVersion() 
 + 
 +t = objWshShell.regread("​HKLM\Software\microsoft\windows nt\currentversion\currentversion"​) 
 + 
 +Call UserPrompt("​Windows version " & t & " <​br>"​) 
 + 
 + 
 +GetWindowsVersion = t 
 + 
 + 
 +End Function 
 + 
 + 
 +</​code>​ 
 + 
 + 
 +===== Allowing symantec corporate to get updates from internet ===== 
 + 
 +remove c:/program files symantec liveupdate/​s32luhl1.dll then will use internet for updates 
 + 
 + 
 +===== ipconfig dns related switches ===== 
 + 
 + 
 +http://​www.microsoft.com/​resources/​documentation/​Windows/​XP/​all/​reskit/​en-us/​Default.asp?​url=/​resources/​documentation/​Windows/​XP/​all/​reskit/​en-us/​prjj_ipa_vitx.asp 
 + 
 + 
 +**ipconfig /​flushdns** 
 +<​code>​ 
 + 
 + 
 +   ​Welcome >  Part IV Networking >  Ch 20 Configuring IP Addressing and Name Resolution >  Configuring TCP/IP Name Resolution >  Configuring DNS to Resolve Host Names and Domain Names   
 +DNS Caching, Network Prioritization,​ and Security 
 +The default settings of DNS might need to be changed in order to optimize the performance and security of the Windows XP Professional DNS client. You can make configuration changes in order to: 
 + 
 +Configure caching and negative caching.  
 +Configure Subnet prioritization.  
 +Prevent the resolver from receiving responses from nonqueried servers. 
 +Configuring Caching and Negative Caching 
 +When the Windows XP Professional resolver receives a positive or negative response to a query, it adds that positive or negative response to its cache, thus creating a DNS resource record. The resolver always checks the cache before querying any DNS server, so if a DNS resource record is in the cache, the resolver uses the record from the cache rather than querying a server. This expedites queries and decreases network traffic for DNS queries. 
 + 
 +You can use the Ipconfig tool to view and to flush the DNS resolver cache. 
 + 
 +To view the DNS resolver cache 
 + 
 +At the command prompt, type:  
 +ipconfig /​displaydns 
 + 
 +Ipconfig displays the contents of the DNS resolver cache, including the DNS resource records preloaded from the Hosts file as well as any recently queried names that were resolved by the system. 
 + 
 +After a certain amount of time, specified in the Time to Live (TTL) associated with the DNS resource record, the resolver discards the record from the cache. You can also flush the cache manually. After you flush the cache, the computer must query DNS servers again for any DNS resource records previously resolved by the computer. 
 + 
 +To flush the cache manually by using Ipconfig 
 + 
 +At the command prompt, type:  
 +ipconfig /flushdns 
 + 
 +The local Hosts file is preloaded into the resolver'​s cache and reloaded into the cache whenever Hosts is updated. 
 + 
 +The length of time for which a positive or negative response is cached depends on the values of entries in the following registry subkey: 
 + 
 +HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DNSCache\Parameters 
 + 
 +The TTL for positive responses is the lesser of the following values: 
 + 
 +the number of seconds specified in the query response the resolver received  
 +the value of the registry entry MaxCacheEntryTtlLimit 
 +The default TTL for positive responses is 86,400 seconds (1 day). 
 + 
 +The TTL for negative responses is the number of seconds specified in the registry entry NegativeCacheTime. 
 + 
 +The default TTL for negative responses is 300 seconds. If you do not want negative responses to be cached at all, set the value of NegativeCacheTime to 0. 
 + 
 +Caution 
 + 
 +Do not edit the registry unless you have no alternative. The registry editor bypasses standard safeguards, allowing settings that can damage your system, or even require you to reinstall Windows. If you must edit the registry, back it up first and see the Registry Reference in the Microsoft Windows 2000 Server Resource Kit at http://www.microsoft.com/reskit. 
 +Configuring Subnet Prioritization 
 +Each DNS database consists of resource records. In general, resource records contain information related to a particular host computer, such as its IP address, owner of the host, or the type of services it provides. Table 20.4 lists some of the common types of resource records. 
 + 
 +Table 20.4   ​Common Types of Resource Records 
 + 
 +Resource Record Type Description Explanation  
 +SOA Start of Authority This record designates the start of a zone. It contains information such as the name of the zone, the e-mail address of the zone administrator,​ and settings that control how secondary DNS servers update the zone data files.  
 +A Address This record lists the IP address of a particular host name. This is the key record for name resolution.  
 +PTR Pointer This record designates a reverse mapping of a host IP address to a host DNS domain name.  
 +CNAME Canonical Name This record specifies an alias or nickname for the standard (canonical) host name.   
 +MX Mail Exchanger This record lists the host computer that is responsible for receiving e-mail sent to a domain.  
 +NS Name Server This record specifies the name server responsible for a given zone.  
 + 
 +If the resolver receives multiple IP address mappings (A resource records) from a DNS server, and some of the records have IP addresses from networks to which the computer is directly connected, the resolver places those resource records first. This reduces network traffic across subnets by forcing computers to connect to network resources that are closer to them. 
 + 
 +For example, suppose there are three Web servers that all host the Web page for www.reskit.com,​ and they are all located on different subnets. The DNS name server for the network contains the following resource records: 
 + 
 +www.reskit.com.IN ​ A172.16.64.11 
 +www.reskit.com.IN ​ A172.17.64.22 
 +www.reskit.com.IN ​ A172.18.64.33 
 + 
 +When a Windows XP Professional&#​65533;​ based computer'​s DNS resolver (client) receives a response to the query for the A record of www.reskit.com,​ it returns A records in order starting with the IP addresses from subnets to which the computer is directly connected. For example, if a computer with the IP address 172.17.64.93 is queried for www.reskit.com,​ the resolver returns the resource records in the following order: 
 + 
 +www.reskit.com.IN ​ A172.17.64.22 
 +www.reskit.com.IN ​ A172.16.64.11 
 +www.reskit.com.IN ​ A172.18.64.33 
 + 
 +Subnet prioritization prevents the resolver from choosing the first IP address returned in the DNS query and using the DNS server'​s round robin feature (defined in RFC 1794.) With round robin enabled, the server rotates the order of resource records returned when multiple A resource records exist for a queried DNS domain name. Thus, in the example described earlier, if a user queried for www.reskit.com,​ the name server replies to the first client request by ordering the addresses as follows: 
 + 
 +172.16.64.11 
 +172.17.64.22 
 +172.18.64.33 
 + 
 +It replies to the second client request by ordering the addresses as follows: 
 + 
 +172.17.64.22 
 +172.18.64.33 
 +172.16.64.11 
 + 
 +It replies to the third client request by ordering the addresses as follows: 
 + 
 +172.18.64.33 
 +172.16.64.11 
 +172.17.64.22 
 + 
 +With round robin enabled, if clients are configured to use the first IP address in the list that they receive, different clients will use different IP addresses, thus balancing the load among multiple network resources with the same name. However, if the resolvers are configured for subnet prioritization,​ the resolvers reorder the list to favor IP addresses from networks to which they are directly connected, reducing the effectiveness of the round robin feature. 
 + 
 +Although subnet prioritization does reduce network traffic across subnets, in some cases you might prefer to have the round robin feature work as described in RFC 1794. If so, you can disable the subnet prioritization feature on your clients by adding the registry entry PrioritizeRecordData with a value of 0 (REG_DWORD data type) in the following registry subkey: 
 + 
 +HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DnsCache\Parameters 
 + 
 +Preventing the Resolver from Accepting Responses from Nonqueried Servers 
 +By default, the resolver accepts responses from servers that it did not query, as well as from those it did. This presents a possible security liability, in that unauthorized DNS servers might pass along invalid A resource records for the purpose of misdirecting subsequent DNS queries. If you want to disable this feature, add the registry entry QueryIpMatching with a value of 1 (REG_DWORD data type) to the following registry subkey: 
 + 
 +HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DnsCache\Parameters 
 + 
 + 
 + 
 +</​code>​ 
 + 
 +===== exchange server - mailbox move issue ===== 
 + 
 + 
 +http://​blogs.msdn.com/​evand/​archive/​2004/​09/​05/​225918.aspx 
 + 
 +===== Question:​TCPIP Ports List =====  
 + 
 +Answer: http://​www.iana.org/​assignments/​port-numbers 
 + 
 + 
 +===== Question:​Symantec Antivirus Problems =====  
 + 
 +Answer: http://​helpdesk.its.uiowa.edu/​virus/​troubleshooting/​default.htm 
 + 
 + 
 + 
 +===== Question:​Howto dump all CAL for a drive =====  
 + 
 +Answer: Use cacls 
 + 
 +This will dump all the cacls for a subfolder and all children  
 + 
 +  for /r . %a  in (.) do cacls  %a >> \t0.txt 
 + 
 + 
 +===== Question:​Exchange server 2003 monitoring notification doesnt work =====  
 + 
 +Answer: use cmd.exe /c to call the script 
 + 
 +Even though the help says you can call a script .cmd file it doesnt work, to call a cmd file you must put  
 + 
 +for the program c:​\windows\system32\cmd.exe  
 + 
 +for the argument /c C:​\mypath\myscript.cmd myarguments 
 + 
 +then the monitor will trigger the event and actually run the script. 
 + 
 +Also all emails from the event are sent from the address wmi@servername with no domain etc...  
 + 
 +to get this forwarded externally you must have a server that wont reject this bodgy from address ! or use a script and a SMTP program to send the email directly to an external server (a better idea anyway). 
 + 
 +If you want the email to come from the monitored server the only way I could get it to work was to use a server side rule to FORWARD the message, that way the from address is fixed up. 
 + 
 +===== Question:​internet explorer loading third party addons` =====  
 + 
 + 
 +Answer: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects 
 + 
 + 
 +Annoying toolbar spyware adware search toolbar that links to a page with this copyright  
 + 
 +  Copyright © 2003, Search Web Now., All rights reserved 
 + 
 +also links to image saying 
 + 
 +lop.com  
 + 
 +live-online portal  
 + 
 +L i v e - O n l i n e - P o r t a l 
 + 
 +  <​TITLE>​L i v e - O n l i n e - P o r t a l</​TITLE>​ 
 +  http://​www.lop.com/​ 
 +  portal.gif 
 + 
 +Addaware and all the other scanners didnt remove it - microsoft anti spyware  
 + 
 + 
 +Windows Registry Editor Version 5.00 
 + 
 +  [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects] 
 + 
 + 
 +just remove anything in here and the annoying popups seem to go away  
 + 
 +there were also programs running at boot that kept putting it back, deleting them eventuall fixed it. 
 + 
 +===== Question:​exchange server make your own certificate ​ =====  
 + 
 +http://​www.msexchange.org/​tutorials/​SSL_Enabling_OWA_2003.html 
 + 
 +===== Question:​How to remove an Active Directory Controller after a failure =====  
 + 
 +Answer: http://​www.petri.co.il/​delete_failed_dcs_from_ad.htm 
 + 
 +http://​www.petri.co.il/​delete_failed_dcs_from_ad.htm 
 + 
 +If an ADC has a disk failure and you dont have any backups how do you remove the server from the system (and then reinstall it). 
 + 
 +  * Recover system to a bootable state (ghost to another drive) 
 +  * Boot in Active directory recover Safe mode. 
 +  * Change computer domain as dcpromo wont run.  
 +  * promote to adc in new "​temporary"​ domain. 
 +  * demote as ADC (that removes all ADC stuff from system). Tick box that this is the last adc in this domain. 
 +  * Delete meta data from real AD (see http://​www.petri.co.il/​delete_failed_dcs_from_ad.htm) 
 +  * Then promote AD back up (can use the same name it had before), using dcpromo 
 +  * Then do that backup that should have been done before and put it in a safe place this time !!! 
 + 
 +  
 + 
 +===== Question:​HOWTO save outlook sent items into a different folder =====  
 + 
 +Answer: Use forms editor 
 + 
 +If you want to save the sent items from outlook into a "​special"​ folder there isnt a simple way within the standard outlook GUI, you would have to manually move them or send a copy to a public folder etc... 
 + 
 +You can however do it by using the forms editor.  
 + 
 +  * Design a form based on the message template 
 +  * create a user defined field "​SentFolder"​  
 +  * Add a combo box control, call it sentfolder  
 +  * edit the forms code and enter the following code,  
 +    * The item_Open code will populate the sentitem combo with a list of folders (in this example sub folders of the sent items folder but they can be public folders (change the 5 to 16 for all public folders and then you would probably need to look in one particular folder within the public folder).  
 +   * Then when the item is going to be sent the item_Send code changes the sent item location to be the one you have picked.  
 + 
 +<​code>​ 
 +Function Item_Open() 
 + 
 +Set FormPage = application.activeInspector.currentitem.getinspector.modifiedformpages(1) 
 + 
 +' populate the pull down list with the sub folders of the sent items folder 
 +formpage.controls("​sentfolder"​).possiblevalues =""​ 
 +Set myNameSpace = Application.GetNameSpace("​MAPI"​)  
 +Set myFolder = myNameSpace.GetDefaultFolder(5)  
 +'​msgbox (myfolder.name) 
 +for j = 1 to myfolder.folders.count 
 +set mysubfolder=myfolder.folders(j) 
 +'​msgbox(mysubfolder.name) 
 +formpage.controls("​sentfolder"​).additem(mysubfolder.name) 
 + 
 +next 
 + 
 +End Function 
 +     
 + 
 + 
 +Function Item_Send() 
 +Set FormPage = application.activeInspector.currentitem.getinspector.modifiedformpages(1) 
 + 
 +if (formpage.controls("​sentfolder"​).value) <> ""​ then  
 + set myNameSpace = Application.GetNameSpace("​MAPI"​)  
 + Set myFolder = myNameSpace.GetDefaultFolder(5) 
 + set mysentfolder=myfolder.folders(formpage.controls("​sentfolder"​).value) 
 + set me.SaveSentMessageFolder=mysentfolder 
 +end if 
 + 
 +End Function 
 +     
 +</​code>​ 
 + 
 + 
 +This is just one example but in the real world you may want to not change the sentitem location but instead bcc the message to a public folder and/or add some codeword to the subject. I havent forced the user to select the item but you could by using the validation properties of the field to demand that a folder is selected (this might be a problem if you send the email to someone outside and they reply as they wouldnt have the public folders available, and of course when someone sends a "​private"​ message a copy might not be wanted). 
 + 
 + 
 +===== Question:​Microsoft keyboard flock is on by default =====  
 + 
 +Answer: http://​www.microsoft.com/​hwdev/​tech/​input/​w2kscan-map.asp 
 + 
 +The reg files in this zip reverse the default so the flock is off normally (like it should have always been) ! http://​www.microsoft.com/​hwdev/​tech/​input/​w2kscan-map.asp 
 + 
 +{{faq:​micorosoft_keyboard_flock_fix_2gflockflip.zip}} 
 + 
 +this is the README.TXT from the zip file 
 + 
 + 
 +Preamble 
 +No guarantee is made of the overall effect of the registry files contained in this zip file. You only my assurance that these have worked for me and for many others, and that I do not personally know of any problems. Running them is your own responsibility. If problems result, use the provided undo.reg file or restore your registry from the a backup that you have you made. 
 + 
 + 
 +Purpose: ​  
 +This registry file takes advantage of the scan code mapper which is found in Windows 2000, Windows XP (and most likely going forward). ​ While the F Lock key is a hardware switch on the keyboard that cannot be programmatically controlled by the OS, we can use the above scan code mapper to essentially remap certain keys of our choosing. 
 + 
 + 
 +Contents: 
 +There are two registry files included in this zip file. 
 + 
 +2gfl-f.reg - This registry file will essentially flip the F Lock state of your either your Natural Multimedia Keyboard, Multimedia Keyboard, Wireless Optical Desktop Keyboard, Wireless Optical Desktop Pro Keyboard or Wireless Optical Desktop for Bluetooth Keyboard. ​ Therefore, when F Lock is OFF (not lit), the function keys will function like normal (i.e. F1 will be F1, F2 will be F2 and so on).  When F Lock is ON (lit), the function keys will function as "​enhanced"​ function keys (i.e. F1 will be Help, F2 will be Undo, F3 will be Redo and so on).  Note that this registry file will not work properly with the Office Keyboard. 
 + 
 +undo.reg - This registry file will undo the changes caused by 2GFL-F.reg 
 + 
 + 
 +Caveats: ​   
 +A system reboot is required to activate these key mappings.  
 + 
 +The mappings stored in the registry work at system level and apply to all users. These mappings cannot be set to work differently depending on the current user.  
 + 
 +The current implementation restricts the functionality of the map such that mappings always apply to all keyboards connected to the system. It is not currently possible to create a map on a per-keyboard basis. 
 + 
 +More info can be found here: 
 +http://​www.microsoft.com/​hwdev/​tech/​input/​w2kscan-map.asp 
 + 
 +Tech Info: 
 +(The following information in this section is courtesy of Doug Harrison) 
 + 
 +For the Natural Multimedia Keyboard, Multimedia Keyboard, Wireless Optical Desktop Keyboard, Wireless Optical Desktop Pro Keyboard or Wireless Optical Desktop for Bluetooth Keyboard, the scan codes are determined in the following manner. 
 + 
 +<​code>​ 
 +F Lock Off (not lit) 
 + 
 +Key Make Flag Scancode 
 + Code 
 +F1 0x3B 2 0xE03B  
 +F2 0x08 2 0xE008  
 +F3 0x07 2 0xE007  
 +F4 0x3E 2 0xE03E  
 +F5 0x3F 2 0xE03F  
 +F6 0x40 2 0xE040  
 +F7 0x41 2 0xE041  
 +F8 0x42 2 0xE042  
 +F9 0x43 2 0xE043  
 +F10 0x23 2 0xE023  
 +F11 0x57 2 0xE057  
 +F12 0x58 2 0xE058  
 + 
 + 
 +F Lock On (lit) 
 + 
 +Key Make Flag Scancode 
 + Code 
 +F1 0x3B 0 0x003B 
 +F2 0x3C 0 0x003C 
 +F3 0x3D 0 0x003D 
 +F4 0x3E 0 0x003E 
 +F5 0x3F 0 0x003F 
 +F6 0x40 0 0x0040 
 +F7 0x41 0 0x0041 
 +F8 0x42 0 0x0042 
 +F9 0x43 0 0x0043 
 +F10 0x44 0 0x0044 
 +F11 0x57 0 0x0057 
 +F12 0x58 0 0x0058 
 + 
 + 
 +Notes: Flags is a driver-level concept. It maps to scan codes like this: 
 +If Make Code is 0x3b and Flags is 2, then the scan code is 0xE03B. 
 +Otherwise, if Flags is 0, then the scan code is 0x003B. 
 + 
 +The mskey program reports scan codes of 0xFF3B when the Scancode Mapper needs 0xE03B. 
 +</​code>​ 
 + 
 + 
 +Thanks to Doug Harrison for the technical explanation of how the scan codes are derived for the keyboards when F Lock is off as well as verifcation of the provided registry files. 
 + 
 + 
 +== Quick note for when you upgrade your keyboard == 
 +I've been using this f-lock fix for several years, it works a treat. Last week I upgraded to a Logitech keyboard and found all my F-keys were doing odd things. Then I remembered the f-lock fix (that'​s how good it is, I'd forgotten about it). Simple solution, run the undo.reg that is included in the zip file, reboot, F-keys are back to normal. (added 19/02/2008 Blair Wilson.) 
 + 
 +===== Question:​SBS 2003 behind a router =====  
 + 
 +Answer: Ports that need to be forwarded are: 
 + 
 + 
 +From your router, need to forward ports 80 and 443 to 192.168.0.50 
 + 
 +then from outside in web browser go to external address 
 + 
 +click on remote web workspace, logon etc.... 
 + 
 + 
 + 
 + 
 +logon and will be able to get email.  
 + 
 + 
 +For remote desktop redirection port 4125  
 + 
 +===== Question:​Driversguide logon =====  
 + 
 +Answer: got a passwod 
 + 
 + 
 +http://​members.driverguide.com/​ums 
 +Your Login is: jeff.turner@resolute-ltd.com.au Your Password is:  
 + 
 +===== Question:​Command completion in Windows XP =====  
 + 
 +Answer: Registry entry 09 is TAB key 
 + 
 +File and Directory name completion is NOT enabled by default. ​ You can 
 +enable or disable file name completion for a particular invocation of 
 +CMD.EXE with the /F:ON or /F:OFF switch. ​ You can enable or disable 
 +completion for all invocations of CMD.EXE on a machine and/or user logon 
 +session by setting either or both of the following REG_DWORD values in 
 +the registry using REGEDT32.EXE:​ 
 + 
 +    HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\CompletionChar 
 +    HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\PathCompletionChar 
 + 
 +        and/or 
 + 
 +    HKEY_CURRENT_USER\Software\Microsoft\Command Processor\CompletionChar 
 +    HKEY_CURRENT_USER\Software\Microsoft\Command Processor\PathCompletionChar 
 + 
 +with the hex value of a control character to use for a particular 
 + 
 +===== Question:​Windows XP Offline files, can't synchronize some files =====  
 + 
 +    * Check extensions not on list, can alter via group policy 
 +    * Check full file+path name is not greater than 256 characters else it won't synchronize! 
 + 
 + 
 +===== Question:​Windows XP Offline files, force offline on slow link =====  
 + 
 +Answer: Registry setting and group policy 
 + 
 +GOOFFLINEONSLOWLINK Registry file 
 + 
 +<​file>​ 
 +REGEDIT4 
 + 
 +[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\NetCache] 
 +"​GoOfflineOnSlowLink"​=dword:​00000001 
 +</file> 
 + 
 + 
 + 
 +===== Question:​Popup an alert dialog from a command prompt =====  
 + 
 +Answer: message.vbs - pops up the command line arguments.  
 + 
 +Used to use net send %computername% but cant now so instead call message.vbs 
 + 
 +<​code>​ 
 +'​---------------------------------------------------------------------- 
 + ​kMessage1 = ""​ 
 + ​kMessage2 = "You must specify a message to display !"  
 + ​kMessage3 = ""​ 
 + ​kMessage4 = Wscript.ScriptFullName 
 + 
 +if wscript.arguments.count > 0 then 
 + ​kMessage2 = ""​ 
 + for icnt = 0 to ( wscript.arguments.count-1 ) 
 +   ​kMessage2 = kmessage2 ​ & wscript.arguments.item(icnt) & " "  
 + ​next 
 +end if  
 + 
 +' kMessage2 = wscript.arguments.item(1)  
 +' if wscript.arguments.count > 1 then 
 +' end if 
 +' end if  
 +  
 +  call wscript.echo(now & vbcrlf & kMessage1 & vbCRLF & kMessage2 & vbCRLF & _ 
 +                          kMessage3 & vbCRLF & kMessage4 ) 
 + 
 +'​CurrentDate = Now 
 +'​Wscript.Echo "Year: " & VbTab & VbTab & Year(CurrentDate) 
 +'​Wscript.Echo "​Month:​ " & VbTab & VbTab & Month(CurrentDate) 
 +'​Wscript.Echo "Day: " & VbTab & VbTab & Day(CurrentDate) 
 +'​Wscript.Echo "​Weekday:​ " & VbTab & Weekday(CurrentDate) 
 +'​Wscript.Echo "Hour: " & VbTab & VbTab & Hour(CurrentDate) 
 +'​Wscript.Echo "​Minute:​ " & VbTab & Minute(CurrentDate) 
 +'​Wscript.Echo "​Second:​ " & VbTab & Second(CurrentDate) 
 +        wscript.quit 
 + 
 + 
 +</​code>​ 
 + 
 +===== Question:​Western Australia WA  Daylight Savings =====  
 + 
 +Answer: Windows update for daylight savings time 
 + 
 + 
 + 
 + 
 + 
 +I rang Microsoft and got this: 
 + 
 +http://​www.microsoft.com/​downloads/​details.aspx?​FamilyID=c6a2c8fe-abda-4051-a24f-3ec933089747&​DisplayLang=en 
 + 
 +No word on whether it will be rolled into an automatic update in time or whether we 
 +wll have to patch everything manually. 
 + 
 +KB928939 is the knowledge base article but that hasn't made it to the web site yet. 
 + 
 +They said call back Monday or Tuesday (132058) to check. 
 + 
 + 
 +  
 +  
 +  
 + 
 +===== Question:​FTP link opened with Internet explorer cannot upload files =====  
 + 
 +Answer: Need to open link in windows explorer rather than internet explorer 
 + 
 +With the introduction of IE7 FTP uploading has become a little bit more complicated. When you click on the link  provided the page opens correctly in IE7. You can then browse to any of the private folders that the supplied username and password can access. However you cannot upload with IE7. So of course you do the logical thing and read the helpful text provided by Microsoft:​ 
 +  
 +To view this FTP site in Windows Explorer, click Page, and then click Open FTP Site in Windows Explorer 
 +  
 +Sure enough the page then appears in Windows Explorer and you can now upload. 
 +  
 +HOWEVER 
 +  
 +When you open the page in Windows Explorer it doesn'​t pass the credentials of the page currently opened in IE7, it just logs in anonymously. If you don't have privilege to upload anonymously then the upload will fail. If you don't have the privilege to even view the current folder then you'll get an error instead of seeing the folder in Windows Explorer.  
 + 
 +for example.  
 + 
 + ​ftp://​yourusername:​yourpassword@ftp.xyz.com.au/​yourfolder/​ 
 +  
 +Now click Page and then click "Open FTP Site in Windows Explorer"​ 
 +  
 +Instead of getting the correct page you get a message box with a 550 error. 
 +  
 +To work around this: 
 +  
 +Once you have opened (or attempted to open) the page in Windows Explorer go to the File menu and select "Login As". Now enter the correct login credentials.  
 + 
 +===== Question:XP system restore command prompt start=====  
 + 
 +on my  compaq hp  laptop the help and support options seem "​customised"​ 
 + 
 +I need to tell someone how to launch the system restore programs easily - running the following will help 
 + 
 + 
 + 
 +%systemroot%\system32\restore\rstrui.exe  
 + 
 +"​c:​\windows\system32\restore\rstrui.exe"​  
 + 
 +See http://​support.microsoft.com/​kb/​304449/​en-us ​  
 + 
 +search KB304449 
 + 
 +===== Question:​Lost password for Server =====  
 + 
 +Answer: Recover it or reformat and reinstall 
 + 
 + 
 +Password recovery tips  
 +  * http://​home.eunet.no/​~pnordahl/​ntpasswd/​ 
 +  * http://​www.petri.co.il/​reset_domain_admin_password_in_windows_server_2003_ad.htm 
 +  * http://​www.nobodix.org/​seb/​win2003_adminpass.html 
 + 
 +===== Question:​Exchange server 2003 IMF spam filter updates =====  
 + 
 +When the IMF filter is used in Exchange server 2003 - if automatic updates are enabled for the IMF it makes a new sub directory and installs them into there BUT it doesn'​t copy the  custom XML you may have made. That needs to be copied over and the SMTP service restarted. The risk is that sometimes the SMTP doesnt restart and an iisreset is needed to fix it.  
 + 
 +This set of scripts will copy the xml and restart the smtp service automatically. if it is scheduled to run after the auto update it should pick up the new folder and do its stuff. 
 + 
 +these scripts are stored in \Program Files\Exchsrvr\bin\MSCFV2,​ they require sleep.exe to do a wait and postie.exe for sending an smtp alert 
 + 
 +Schedule a job to call xmlupdate.cmd first 
 + 
 +WARNING the double % symbols needed cause dokuwiki to hiccup so I have had to alter those in these cmd file examples - the zip contains the full one. 
 + 
 +xmlupdate.cmd 
 +<​file>​ 
 +@echo on  
 +cd /d %ProgramFiles%\exchsrvr\bin\mscfv2 
 +if not exist MSExchange.UceContentFilter.xml goto NOXML 
 + 
 +call xmlupdateall.cmd > xmlupdateall.log 
 + 
 + 
 + 
 +@if not exist dorestart.flag goto NORESTART 
 +@del dorestart.flag 
 + 
 + 
 +type xmlupdateall.log | postie.exe ​  ​-s:"​%computername% IMF Update"​ -host:​jetsoft.no-ip.com ​ -from:​sms@nano-tera.com.au -to:​jeff@jetsoft.no-ip.com ​ -subject:"​IMF update occured"​  
 + 
 +:NOXML 
 +:​NORESTART 
 +</​file>​ 
 + 
 +xmlupdateall.cmd 
 +<​file>​ 
 +@echo on 
 +@cd /d %ProgramFiles%\exchsrvr\bin\mscfv2 
 +@if not exist MSExchange.UceContentFilter.xml goto NOXML 
 +@if exist dorestart.flag del dorestart.flag 
 +rem replace XX with %% 
 +for /R . XXa in (.) do if not exist XXa\*.xml call xmlupdateme.cmd "​XXa"​ 
 + 
 +@if not exist dorestart.flag goto NORESTART 
 +@sc query smtpsvc | findstr RUNNING  
 +sc stop smtpsvc 
 +@sleep 60  
 +@sc query smtpsvc | findstr STOPPED 
 +@if errorlevel 1 goto NOTSTOPPED 
 + 
 +sc start smtpsvc 
 +@sleep 60 
 +@sc query smtpsvc | findstr RUNNING  
 +@if errorlevel 1 goto NOTSTARTED 
 + 
 +@goto OK 
 + 
 +@:​NOTSTARTED 
 +@:​NOTSTOPPED  
 + 
 + 
 +iisreset /restart 
 + 
 +:OK 
 + 
 +rem @del dorestart.flag 
 + 
 +:​NORESTART 
 +:NOXML 
 +</​file>​ 
 + 
 + 
 +xmlupdateme.cmd 
 +<​file>​ 
 +copy MSExchange.UceContentFilter.xml %1 
 +@echo Yes > dorestart.flag 
 +</​file>​ 
 + 
 +All these CMD files are in this zip 
 + 
 +{{faq:​xmlupdate.zip}} 
 + 
 +{{faq:​xmlupdate.zip}} 
 + 
 +===== Question:​Windows Vista and logon sciptys =====  
 + 
 +Answer: Read and understand this 
 + 
 +http://​technet.microsoft.com/​en-us/​windowsvista/​aa905117.aspx 
 + 
 +===== Question:XP Offline files and folders issues =====  
 + 
 +Answer: Registry entry to force offline on slow link  
 + 
 +Overview of the "​Configure Slow Link Speed" feature 
 + 
 +In Windows XP and Windows 2000, there is a Configure Slow Link Speed Group Policy setting to define a slow link speed for use with Offline Files. You can configure a threshold value that Offline Files recognizes as a "​slow"​ network connection. Offline Files then recognizes any network connection speed that is slower than this value as a slow link. This policy prevents Offline Files from automatically reconnecting to the server when the server is detected. 
 + 
 +However, the behavior of this policy in Windows XP Service Pack (SP) 1 and Windows 2000 SP4 is applicable only after you are already offline. That is, on a Windows XP or Windows XP SP1-based computer, this policy does not force Offline Files to offline mode when a slow link is detected. You must first use the Csccmd /disconnect command-line option to manually force Offline Files into offline mode. 
 + 
 +The new behavior of Offline Files (after you install this update) permits Offline Files to automatically go offline if a slow link is detected. When Offline Files starts, it checks the SlowLinkSpeed setting that is configured either in the registry or in Group Policy. It compares each server that is in its database to the specified threshold value, and it individually marks each server that meets the criteria for a slow link to go into Offline Mode. You do not have to already be offline (or manually run the Csccmd /disconnect command-line option to go offline) for the Configure Slow Link Speed policy to apply on a Windows XP or Windows 2000-based computer that has this update installed. 
 + 
 +Additionally,​ the new functionality of Offline Files permits Offline Files to detect the actual speed of the network connection to the server (instead of the speed of the network adapter of the client) as the connection speed. 
 + 
 + 
 +Back to the top 
 + 
 +<​code>​ 
 +How to use the "Go Offline on Slow Link" feature 
 +To use this feature, follow these steps. 1. Enable and configure the Configure Slow Link Speed Group Policy setting by using the Group Policy snap-in.  
 +2. Add the following REG_DWORD entry to the Windows registry and assign it a value of 1:  
 +HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\NetCache\GoOfflineOnSlowLink 
 +To do so: a.  Click Start, and then click Run.  
 +b.  Type regedit, and then click OK.  
 +c.  Locate, and then click the following registry key: 
 +HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\NetCache  
 +d.  On the Edit menu, point to New, and then click DWORD Value.  
 +e.  Type GoOfflineOnSlowLink,​ and then press ENTER.  
 +f.  In the right pane, double-click the GoOfflineOnSlowLink value that you created in step 2e.  
 +g.  In the Value data box, type 1, and then click OK.  
 +h.  Quit Registry Editor.  
 +  
 +3. Restart the computer. 
 +</​code>​ 
 +  
 +If a slow link to the server is detected, Offline Files automatically goes offline.  
 +Note To modify the value that defines a slow link, use the Group Policy snap-in to configure the Configure Slow Link Speed Group Policy setting with the value that you want, and then restart the computer. 
 + 
 + 
 +csccmd 
 + 
 +Microsoft(R) Windows(TM) CSC Utility Version 1.0 
 +Copyright (C) Microsoft Corporation 1991-2003. All Rights Reserved. 
 + 
 +Usage: csccmd [/OPTIONS] 
 + 
 +    /ENABLE 
 +    /DISABLE 
 +    /RESID 
 +    /​DISCONNECT:<​\\server\share>​ 
 +    /​MOVESHARE:<​\\server\share>​ <​\\server\share>​ 
 + 
 +The command completed successfully. 
 + 
 + 
 + 
 +===== Question:​How to open control panel options quickly =====  
 + 
 +Answer: Run the .cpl file  directly  
 + 
 +Either by doing start run "​xxxx.cpl"​ or start run "​control xxx.cpl"​. Some of these .cpl files are in unusual folders so may not be found automatically. 
 + 
 +   ​Control panel tool             ​Command 
 +   ​----------------------------------------------------------------- 
 +   ​Accessibility Options ​         control access.cpl 
 +   Add New Hardware ​              ​control sysdm.cpl add new hardware 
 +   ​Add/​Remove Programs ​           control appwiz.cpl 
 +   ​Date/​Time Properties ​          ​control timedate.cpl 
 +   ​Display Properties ​            ​control desk.cpl 
 +   ​FindFast ​                      ​control findfast.cpl 
 +   Fonts Folder ​                  ​control fonts 
 +   ​Internet Properties ​           control inetcpl.cpl 
 +   ​Joystick Properties ​           control joy.cpl 
 +   ​Keyboard Properties ​           control main.cpl keyboard 
 +   ​Microsoft Exchange ​            ​control mlcfg32.cpl 
 +      (or Windows Messaging) 
 +   ​Microsoft Mail Post Office ​    ​control wgpocpl.cpl 
 +   Modem Properties ​              ​control modem.cpl 
 +   Mouse Properties ​              ​control main.cpl 
 +   ​Multimedia Properties ​         control mmsys.cpl 
 +   ​Network Properties ​            ​control netcpl.cpl 
 +                                  NOTE: In Windows NT 4.0Network 
 +                                  properties is Ncpa.cpl, not Netcpl.cpl 
 +   ​Password Properties ​           control password.cpl 
 +   PC Card                        control main.cpl pc card (PCMCIA) 
 +   Power Management (Windows 95)  control main.cpl power 
 +   Power Management (Windows 98)  control powercfg.cpl 
 +   ​Printers Folder ​               control printers 
 +   ​Regional Settings ​             control intl.cpl 
 +   ​Scanners and Cameras ​          ​control sticpl.cpl 
 +   Sound Properties ​              ​control mmsys.cpl sounds 
 +   ​System Properties ​             control sysdm.cpl 
 +  
 + 
 +===== Question:​DHCP Server command line edit of settings =====  
 + 
 +Answer: Use netsh command line tools to dump to text file. Then edit and redo to recreate etc... 
 + 
 +<​file>​ 
 +netsh>​help dhcp 
 + 
 +The following commands are available:​ 
 + 
 +Commands in this context: 
 +..             - Goes up one context level. 
 +?              - Displays a list of commands. 
 +aaaa           - Changes to the `netsh aaaa' context. 
 +abort          - Discards changes made while in offline mode. 
 +add            - Adds a configuration entry to a list of entries. 
 +alias          - Adds an alias. 
 +bridge ​        - Changes to the `netsh bridge'​ context. 
 +bye            - Exits the program. 
 +commit ​        - Commits changes made while in offline mode. 
 +delete ​        - Deletes a configuration entry from a list of entries. 
 +dhcp           - Changes to the `netsh dhcp' context. 
 +diag           - Changes to the `netsh diag' context. 
 +dump           - Displays a configuration script. 
 +exec           - Runs a script file. 
 +exit           - Exits the program. 
 +firewall ​      - Changes to the `netsh firewall'​ context. 
 +help           - Displays a list of commands. 
 +interface ​     - Changes to the `netsh interface'​ context. 
 +ipsec          - Changes to the `netsh ipsec' context. 
 +offline ​       - Sets the current mode to offline. 
 +online ​        - Sets the current mode to online. 
 +popd           - Pops a context from the stack. 
 +pushd          - Pushes current context on stack. 
 +quit           - Exits the program. 
 +ras            - Changes to the `netsh ras' context. 
 +routing ​       - Changes to the `netsh routing'​ context. 
 +rpc            - Changes to the `netsh rpc' context. 
 +set            - Updates configuration settings. 
 +show           - Displays information. 
 +unalias ​       - Deletes an alias. 
 +wins           - Changes to the `netsh wins' context. 
 +winsock ​       - Changes to the `netsh winsock'​ context. 
 + 
 +The following sub-contexts are available:​ 
 + aaaa bridge dhcp diag firewall interface ipsec ras routing rpc wins winsock 
 +</​file>​ 
 + 
 +<​code>​ 
 + 
 +   # ====================================================================== 
 +   # ​ Start Add Excluderanges to the Scope : 192.168.85.0,​ Server : 192.168.85.10 ​         
 +   # ====================================================================== 
 + 
 + 
 +Dhcp Server 192.168.85.10 Scope 192.168.85.0 add excluderange 192.168.85.199 192.168.85.199 
 +Dhcp Server 192.168.85.10 Scope 192.168.85.0 add excluderange 192.168.85.99 192.168.85.99 
 +Dhcp Server 192.168.85.10 Scope 192.168.85.0 add excluderange 192.168.85.201 192.168.85.204 
 + 
 +   # ====================================================================== 
 +   # ​ End   Add Excluderanges to the Scope : 192.168.85.0,​ Server : 192.168.85.10 ​         
 +   # ====================================================================== 
 + 
 + 
 +   # ====================================================================== 
 +   # ​ Start Add OptionValues to the Scope : 192.168.85.0,​ Server : 192.168.85.10 ​          
 +   # ====================================================================== 
 + 
 + 
 +Dhcp Server 192.168.85.10 Scope 192.168.85.0 set optionvalue 44 IPADDRESS "​192.168.85.10"​  
 +Dhcp Server 192.168.85.10 Scope 192.168.85.0 set optionvalue 6 IPADDRESS "​192.168.85.12"​ "​192.168.85.10"​  
 +Dhcp Server 192.168.85.10 Scope 192.168.85.0 set optionvalue 51 DWORD "​691200"​  
 +Dhcp Server 192.168.85.10 Scope 192.168.85.0 set optionvalue 3 IPADDRESS "​192.168.85.254"​  
 +Dhcp Server 192.168.85.10 Scope 192.168.85.0 set optionvalue 15 STRING "​syama.resolute-ltd.com.au"​  
 +Dhcp Server 192.168.85.10 Scope 192.168.85.0 set optionvalue 46 BYTE "​8"​  
 + 
 + 
 + 
 +   # ====================================================================== 
 +   # ​ Start Add ReservedIp to the Scope : 192.168.85.0,​ Server : 192.168.85.10 ​            
 +   # ====================================================================== 
 + 
 + 
 +Dhcp Server 192.168.85.10 Scope 192.168.85.0 Add reservedip 192.168.85.199 000074856a81 "Ricoh Printer"​ "Ricoh Aficio AP400" "​BOTH"​ 
 + 
 + 
 +</​code>​ 
 + 
 + 
 + 
 +===== Windows Desktop Search default ===== 
 + 
 + 
 +How To Default To Search Companion With Windows Desktop Search 3 
 + 
 +from http://​www.johnsadventures.com/​archives/​2006/​11/​how_to_default_to_search_companion_with_windows_de.html 
 + 
 +HKEY_CURRENT_USER\Software\Microsoft\Windows Desktop Search\DS 
 + 
 +Then double-click on '​ShowStartSearchBand'​ and set the value to '​0'​.  
 + 
 +===== reset your LAN settings to default DHCP ===== 
 + 
 +<​code>​ 
 +netsh interface ip set address name="​Local Area Connection"​ source=dhcp  
 +netsh interface ip set dns name="​Local Area Connection"​ source=dhcp register=BOTH 
 +netsh interface ip set wins name="​Local Area Connection"​ source=dhcp 
 +</​code>​ 
 + 
 + 
 +<​code>​ 
 +netsh interface ip set address name="​Wireless Network Connection"​ source=dhcp  
 +netsh interface ip set dns name="​Wireless Network Connection"​ source=dhcp register=BOTH 
 +netsh interface ip set wins name="​Wireless Network Connection"​ source=dhcp 
 +</​code>​ 
 + 
 +===== Unattended setup to move program files and documents and settings ===== 
 + 
 + 
 +For those people out there who like to put their OS install on a small partition, I have a tip you may find useful: ​ automate your install with an unattended answer file.  You can set answers in this file to cover various useful locations and in almost all cases it works correctly afterwards. ​ For example, I use: 
 + 
 +   ​ProgramFilesDir="​D:​\Apps"​ 
 + 
 +   ​CommonProgramFilesDir="​D:​\Apps\Common"​ 
 + 
 +   ​ProfilesDir="​D:​\Profiles"​ 
 + 
 +(The last one actually goes in the GuiUnattended section, the first two just in Unattended). 
 + 
 +This keeps the system (C:) partition extremely lean, and it's easy to blow away the system for a fresh install without risking any of your data (except possibly in the case of some very-badly-behaved software). 
 + 
 +In 99.9% of cases, software installers will provide D:\Apps as the default root instead of C:\Program Files. 
 + 
 +Note that some partitioning and formatting should really be done before the installation,​ but once you've done that work, it pays off in the end.  This method beats my old method (after install, use registry search and replace to find "​program files" and "​progra~1"​) hands down.  Everything is set correctly, from start menu shortcuts to registry keys. 
 + 
 +==== Issue with RTVSCAN using 25 % or more of CPU ==== 
 + 
 +Version 9 and up - Those who run into a 100% utilization is having a problem with a corrupt definition file - The rtvscan gets hung on it and causes the CPU to peg. Go to the c:​\documents and settings\all users\application data\symantec\[which ever version name]\7.5 - Now delete all .VXD and .WDB files and empty the I2_LDVP.VDB folder - Now do a live update and reboot - rtvscan will take very little CPU as it should 
 +Local Profile - New User 
 +The user logs on. 
 +===== Moving profile ===== 
 + 
 +http://technet.microsoft.com/en-us/​library/​cc775560.aspx 
 + 
 +The operating system checks the list of user profiles located in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList to  
 +determine if a local profile exists for the user. 
 + 
 +===== Outlook recover deleted items from Any folder ===== 
 + 
 +Paste text below into a dumpsteralwayson.adm file in \windows\inf 
 + 
 +add template using gpedit and enable setting. 
 + 
 + 
 +<​code>​ 
 +CLASS MACHINE 
 + 
 + 
 + ​CATEGORY !!CAT_OfficeComponents 
 +    CATEGORY !!CAT_Office2003 
 +    POLICY !!Outlook_Dump 
 +    EXPLAIN !!Outlook_Dump_Explain 
 +          KEYNAME "​SOFTWARE\Microsoft\Exchange\Client\Options"​ 
 +          VALUENAME "​DumpsterAlwaysOn"​ 
 +          VALUEON ​ NUMERIC 1 
 +          VALUEOFF NUMERIC 0 
 +    END POLICY 
 +  END CATEGORY 
 + END CATEGORY 
 + 
 + 
 + 
 +[strings] 
 +CAT_OfficeComponents="​Custom Office Components"​ 
 +CAT_Office2003="​Office 2003"​ 
 +Outlook_Dump="​DumpsterAlwaysOn"​ 
 +Outlook_Dump_Explain="​Enables recover deleted items option on all folders in the users mailbox."​ 
 +</​code>​ 
 + 
 + 
 + 
 +===== Uninstall and reinstall WSUS 3 Fails ===== 
 + 
 +If you have removed the windows internal database and want to recreate it for WSUS removing WSUS and reinstalling will install the database BUT WSUS wont uninstall if the database isnt there - this regedit tells wsus setup not to look for the database. 
 + 
 +From google http://​www.eggheadcafe.com/​software/​aspnet/​30250492/​uninstall-and-reinstall-w.aspx 
 +<​code>​ 
 +Uninstall and reinstall WSUS 3 Fails - Fei Cao \(MSFT\) ​  
 +09-Jul-07 03:13:30 
 +  
 +It appears you installed WSUS 3.0 using Windows Internal Database, but the 
 +regkey for Windows Internal Database somehow is gone or Windows Internal 
 +Database could be unexpectedly removed already in your box. Either way, one 
 +workaround I can think of is to go to the regkey 
 +[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Update Services\Server\Setup],​ change 
 +the value for "​wYukonInstalled"​ from 1 to 0, then run the unstall --you need 
 +to  choose to leave Database behind on the first page of uninstall wizard. 
 + 
 +</code> 
 +  
 + 
 +===== Email on windows mobile ===== 
 + 
 +brief setup guide here: http://​www.amset.info/​exchange/​mobile-setup.asp 
 + 
 +===== Default to Old Search Companion after Windows Search Installed ===== 
 + 
 +Click on the show search companion ​link at least once then regedit  
 + 
 +HKEY_CURRENT_USER\Software\Microsoft\Windows Desktop Search\DS 
 + 
 +Then double-click on '​ShowStartSearchBand'​ and set the value to '​0'​. 
 + 
 +===== Add route "​automatically"​ in a script ===== 
 + 
 +If you vpn and dont want it to be default gateway but DO want it to have routes to subnets added this script finds out the address you have been assigned and then adds the routes via that address. 
 + 
 +<​code>​ 
 +route print | findstr "​127"​ | findstr "​192.168.10"​ > %temp%/t0 
 +for /f %%f in (%temp%\t0) do route add 192.168.16.0 mask 255.255.240.0 %%f 
 +</​code>​ 
 + 
 +===== WSUS 3 windows update ===== 
 + 
 +Even though the technet notes say the selfupdate should be on the default web site (port 80) the windowsupdate log shows it actually looks for it on the wsus servers admin port 8530 if that is what your active directory group policy setts the proxy server to. So save the selfupdate config and then create a new virtual directory from that file on the wsusadmin web site. and Hey it works !!! These were the errors in the windowsupdate log. 
 +WSUS01:8530 would be replaced with your wsus servers name. This was a server running Exchange 2007 OWA on port 80 and 443. The wsus client diagnostic looks for selfupdate on 80 so I wasted time fixing that as ssl was forced and that had to be disabled (not forced) for selfupdate to get the diagnostic to pass. Bit it still didnt work. 
 + 
 + 
 + 
 + 880 c88 Misc WARNING:​ WinHttp: SendRequestToServerForFileInformation failed with 0x80190194 
 + 880 c88 Misc WARNING:​ WinHttp: ShouldFileBeDownloaded failed with 0x80190194 
 + 880 c88 Misc WARNING:​ DownloadFileInternal failed for http://​wsus01:​8530/​selfupdate/​wuident.cab:​ error 0x80190194 
 + 880 c88 Setup FATAL:​ IsUpdateRequired failed with error 0x80244019 
 + 880 c88 Setup WARNING:​ SelfUpdate: Default Service: IsUpdateRequired failed: 0x80244019 
 + 880 c88 Setup WARNING:​ SelfUpdate: Default Service: IsUpdateRequired failed, error = 0x80244019 
 + 880 c88 Agent  ​ * WARNING: Skipping scan, self-update check returned 0x80244019 
 + 880 c88 Agent  ​ * WARNING: Exit code = 0x80244019 
 + 
 + 
 + 
 +===== Reset Registry Security ===== 
 + 
 +http://​support.microsoft.com/​kb/​873148 
 + 
 +<​code>​ 
 + 
 +Method 2: Reset your operating system back to the default settings 
 + 
 +To reset your operating system back to original installation default security settings, follow these steps: 
 +Click Start, click Run, type cmd, and then press ENTER. 
 +Type secedit /configure /cfg %windir%\repair\secsetup.inf /db secsetup.sdb /verbose, and then press ENTER.  
 +You receive a "Task is completed"​ message, and a warning message that something could not be done.  
 +You can safely ignore this message.  
 +For more information about this message, view the %windir%\Security\Logs\Scesrv.log file.  
 + 
 +For more information about how to reset security settings back to the defaults, click the following  
 +article number to view the article in the Microsoft Knowledge Base:  
 + 
 +313222 ​ (http://​support.microsoft.com/​kb/​313222/​ ) How to reset security settings back to the defaults  
 + 
 +</​code>​ 
 + 
 +===== To copy all VPN connections between machines, take this file ===== 
 + 
 +%SystemDrive%\Documents and Settings\All Users\Application Data\Microsoft\Network\Connections\Pbk\rasphone.pbk  
 + 
 +and in Windows 7 put it here 
 + 
 +c:​\ProgramData\Microsoft\Network\Connections\Pbk 
 + 
 +or where %username% is your username  
 + 
 +c:​\Users\%username%\AppData\Roaming\Microsoft\Network\Connections\Pbk 
 + 
 +===== Excel locks when creating link ===== 
 + 
 +Excel Locks and crashes with Error in excel.exe module excel.exe eventid 1001 event id 1001 when clicking to create a link between two worksheets or even between two worksheets within one workbook. Asks you to recover spreadsheet and report error.  
 + 
 +If you start excel in safe mode it works OK (excel.exe /s) or (excel.exe /​safemode) 
 + 
 +a registry setting in excel (hkcu\Software\Microsoft\Office\11.0\Excel\Options) called options5 ​ (in this case with a value of 0000885) is the cause. 
 +  
 +Removing the key or changing the value to 0 "​fixed"​ it 
 + 
 +Related to excel "edit in cell" option, having frozen panes in the spreadsheet and a microsoft security "​Fix"​ KB_973475 - see  http://​www.mrexcel.com/​forum/​showthread.php?​p=2130838 
 + 
 +===== RPC over HTTP Proxy in Server 2008  ===== 
 + 
 +For Outlook Anywhere to work correctly, the Windows RPC over HTTP Proxy component must be installed on your Microsoft Exchange Server 2010 Client Access server that's running Windows Server 2008. If the component isn't installed, follow these steps to install it before you enable Outlook Anywhere. You can install the Windows RPC over HTTP Proxy component using Server Manager or the command line. 
 + 
 +Looking for other management tasks related to Outlook Anywhere? Check out Managing Outlook Anywhere. 
 + 
 +  Install the RPC over HTTP Proxy component using Server Manager  
 + 
 +You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "RPC over HTTP Proxy component"​ entry in the Client Access Permissions topic. 
 + 
 +1.Click Start > Administrative Tools > Server Manager. 
 + 
 +2.Under Server Manager, right-click Features, and then click Add Features.  
 + 
 +3.In the Add Features Wizard, on the Features page, select the check box for RPC over HTTP Proxy, and then click Next. 
 + 
 +4.On the Confirmation page, click Install. 
 + 
 +5.On the Results page, click Close. 
 + 
 +Test Outlook Anywhere Connectivity  
 + 
 +https://​www.testexchangeconnectivity.com/​Default.aspx 
 + 
 + 
 +===== External DNS check ===== 
 + 
 +The zoneedit web site lets you do tests and lookups 
 + 
 +http://​www.zoneedit.com/​lookup.html 
 + 
 +If you are on the allowed IP list then you can also use 
 + 
 +http://​mail.nanotera.com.au:​10010/​dnsreport 
 + 
 +===== Office 2007 Outlook Security Warnings ===== 
 + 
 +every time you try to open an "​office"​ document as an attachment in outlook 2007 you are warned that it might be dangerous. To disable them the following registry entries must be altered 
 + 
 +<​code>​ 
 +Windows Registry Editor Version 5.00 
 + 
 +[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Excel.CSV] 
 +"​EditFlags"​=hex:​00,00,01,00 
 + 
 +[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Excel.Sheet.5] 
 +"​EditFlags"​=hex:​00,​00,​01,​00 
 + 
 +[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Excel.Sheet.8] 
 +"​EditFlags"​=hex:​00,​00,​01,​00 
 + 
 +[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Excel.Sheet.12] 
 +"​EditFlags"​=hex:​00,​00,​01,​00 
 + 
 +[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Excel.Sheet.12] 
 +"​EditFlags"​=hex:​00,​00,​01,​00 
 + 
 +[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Word.Document.5] 
 +"​EditFlags"​=hex:​00,​00,​01,​00 
 + 
 +[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Word.Document.8] 
 +"​EditFlags"​=hex:​00,​00,​01,​00 
 + 
 +[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Word.Document.12] 
 +"​EditFlags"​=hex:​00,​00,​01,​00 
 + 
 +[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\PowerPoint.Show.11] 
 +"​EditFlags"​=hex:​00,​00,​01,​00 
 + 
 +[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\PowerPoint.Show.12] 
 +"​EditFlags"​=hex:​00,​00,​01,​00 
 + 
 +[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CompressedFolder] 
 +"​EditFlags"​=hex:​00,​00,​01,​00 
 + 
 +[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TIFImage.Document] 
 +"​EditFlags"​=hex:​00,​00,​01,​00 
 + 
 +[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\PowerPointViewer.Show.11] 
 +"​EditFlags"​=hex:​00,​00,​01,​00 
 + 
 +[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\PowerPointViewer.Show.12] 
 +"​EditFlags"​=hex:​00,​00,​01,​00 
 +</​code>​ 
 + 
 +==== Clock synchronise in server 2003  ==== 
 + 
 +from  ​http://support.microsoft.com/kb/816042 
 + 
 + 
 +For Perth set it to time.uwa.edu.au 
 + 
 + 
 +Specify the time sources. To do this, follow these steps: 
 +Locate and then click the following registry subkey: 
 +HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters 
 +In the right pane, right-click NtpServer, and then click Modify. 
 +In Edit Value, type Peers in the Value data box, and then click OK. 
 + 
 +Note Peers is a placeholder for a space-delimited list of peers from which your computer obtains time stamps. Each DNS name that is listed must be unique. You must append ,0x1 to the end of each DNS name. If you do not append ,0x1 to the end of each DNS name, the changes made in step 5 will not take effect. 
 + 
 + 
 +http://​support.microsoft.com/​kb/​816042 
faq/start.txt · Last modified: 2014/06/28 00:57 (external edit)