Don’t you hate it when Tab Complition does not work?

Here is a VBScript that will solve that problem for you;
‘<——— VBScript Starts here —————————————->
Dim strComputer
Dim objWMIService
Dim SWBemlocator
Dim UserName
Dim Password
Dim Title, Text1, Text2
Dim Message, result
Title = "Add Tab Complition"
Text1 = "User Input Cancelled"
Text2 = "You Entered: " & vbTab
‘ Define Msg Box Var
Message = "PLease Enter Server Name"
result = InputBox(Message, Title, "Type Server Name Here", 100, 100)
‘ Evaluate the user input.
If result = "" Then
 WScript.Echo Text1
 WScript.Quit
Else
 WScript.Echo Text2 & result & " Please wait"
End If
strComputer = result
‘ Add Tab Compition
Set WshShell = WScript.CreateObject("WScript.Shell")
SetTabComplet(strComputer)

 Sub SetTabComplet(strComputer)
  ‘ Use to configure Tab Complition
  ‘ provide system name
  Dim sPath, oReg
  Const HKLM = &H80000002
  sPath = "SOFTWAREMicrosoftCommand Processor"
Set oReg = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\" _
   & strComputer & "rootdefault:StdRegProv")
 oReg.SetStringValue HKLM, sPath,"AutoRun"=""
 oReg.SetStringValue HKLM, sPath,"CompletionChar",9
 oReg.SetStringValue HKLM, sPath,"DefaultColor",0
 oReg.SetStringValue HKLM, sPath,"EnableExtensions",1
 oReg.SetStringValue HKLM, sPath,"PathCompletionChar",40
 End Sub
 
‘< End Script ———————————————————->
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s