ConFetchConFetch

TreeWalk 8.21 Vista Helper

Download this batch file in .zip format here: TW_Vista_Helper.zip (May 14, 2008)

Please review "Vista, UAC, TreeWalk and ConFetch" first. You can also print a shortened text version of instructions or download the instructions in .zip format for reference.

            
:: TreeWalk Installer/Uninstaller Helper for Vista x86 [32-bit] and x64 [64-bit] - May 14, 2008

@echo off
  title TreeWalk "Hawk" 8.21 Vista Helper
    :: // Check to see if Vista is installed here //
      ver | find "Version 6">nul
        if not errorlevel 1 goto yvsix
        if errorlevel 1 goto nvsix

      :yvsix :: // It's Vista, so check for service configuration //
        sc query twdns | find "1060">nul
        if not errorlevel 1 goto install
        if errorlevel 1 goto uninstall

      :install :: // TreeWalk service is not installed, so install it //
        echo/
        echo  Supply credentials for your current Administrator profile
        echo/
        echo  Provide current Administrator Username, then press Enter:
        set /p twusr=
        echo  Provide current Administrator Password, then press Enter:
        set /p twpwd=
        echo/
        echo  Please type the number for a selection, then press Enter:
        echo/
        echo  [1] Information is correct. Submit.
        echo  [2] There is an error. Try again...
        set selected=
        set /p selected=  
        if not '%selected%'=='' set selected=%selected:~0,1%
        if '%selected%'=='1' goto proceed
        if '%selected%'=='2' goto yvsix
        cls
        echo/
        echo "%selected%": Invalid input. Please try again . . .
        echo/
        goto yvsix

      :proceed :: // Determine if Vista is 32-bit or 64-bit //
        cls
        if not exist %windir%\syswow64 goto lowbit
        sc create twdns binPath= %windir%\syswow64\dns\bin\named.exe
        goto twserv

      :lowbit :: // If Vista is 32-bit then we do this instead //
        sc create twdns binPath= %windir%\system32\dns\bin\named.exe
      
      :twserv :: // Using your credentials to configure the service //
        sc config twdns obj= .\%twusr% password= %twpwd% start= auto DisplayName= TreeWalk
        sc description twdns "TreeWalk DNS Personal Server"

      net start twdns
        set twusr=
        set twpwd=
        echo  The twdns service should now indicate a successful start.
        echo  To exit here, just do this:
        pause
        goto end

      :nvsix :: // Oops! This is not Vista! //
        echo/
        echo  Sorry^! You need Vista to use this script^!
        pause

      :end
        exit

      :uninstall :: // Does the user wish to remove TreeWalk? //
        echo/
        echo  The TreeWalk Uninstaller will be invoked if you continue^!
        echo  The "twdns" Service will also be deleted if you continue^!
        echo  You must run this again when you re-install TreeWalk DNS.
        echo  Press the "X" now to decline [in the red box, top right].
        pause
        cls
        echo/
        net stop twdns
        sc delete twdns
        echo/

      echo  You can now uninstall TreeWalk from this computer^!
    if exist %windir%\syswow64 %windir%\syswow64\dns\unins000.exe
  if not exist %windir%\syswow64 %windir%\system32\dns\unins000.exe
exit

Download this batch file in .zip format here: TW_Vista_Helper.zip (May 14, 2008)



Trademarks are the property of their respective owners.

TOP
Copyright © 2000-2008 by TreeWalkDNS.com All rights are reserved