Announcement

Collapse
No announcement yet.

Help me with my batch file

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help me with my batch file

    Hey guys (and gals).
    I am having some difficulty with my batch file.
    I am trying to make 1 batch file work on english and every other language out there, without having to have a billion lines for each and every language location.

    This is my first foray into batch files, and I know absolutely 0 code, in any language.
    I have searched and found a lot on what I am trying to, and I have this so far:

    REM Check Windows Version
    ver | findstr /i "5\.1\." > nul
    IF %ERRORLEVEL% EQU 0 goto ver_XP
    ver | findstr /i "6\.0\." > nul
    IF %ERRORLEVEL% EQU 0 goto ver_Vista
    ver | findstr /i "6\.1\." > nul
    IF %ERRORLEVEL% EQU 0 goto ver_Win7
    goto warn_and_exit

    :ver_Win7
    rd /s /q "%USERPROFILE%\my documents\norton"
    rd /s /q "%APPDATA%\documents\norton"
    rd /s /q "%ALLUSERSPROFILE%\Documents\norton"
    rd /s /q "%PROGRAMDATA%\Norton"
    rd /s /q "%PUBLIC%\Downloads\Norton"
    rd /s /q "%PROGRAMDATA%\NortonInstaller"
    del /q "%USERPROFILE%\Desktop\*.lnk"
    del /q "%USERPROFILE%\Desktop\*.exe"
    rd /s /q "%APPDATA%\nortoninstaller"
    rd /s /q "%HOMEPATH%\Start Menu\Programs\norton"
    rd /s /q "%APPDATA%\microsoft\windows\start menu\norton"
    rd /s /q "%HOMEPATH%\Local Settings\Temporary Internet Files"
    del /q /f "%HOMEPATH%\Local Settings\Temp\*.*"
    reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Run /va /f
    reg delete HKCU\Software\norton /f
    reg delete HKLM\Software\norton /f
    reg delete HKLM\Software\symantec /f
    reg delete HKCU\Software\wow6432node\norton /f
    reg delete HKLM\Software\wow6432node\norton /f
    reg delete HKLM\Software\wow6432node\symantec /f
    REM echo OS Version: Windows XP (debug line)
    goto end

    REM echo OS Version: Windows 7 (debug line)
    goto end

    :ver_Vista
    rd /s /q "%USERPROFILE%\my documents\norton"
    rd /s /q "%APPDATA%\documents\norton"
    rd /s /q "%ALLUSERSPROFILE%\Documents\norton"
    rd /s /q "%PROGRAMDATA%\Norton"
    rd /s /q "%PUBLIC%\Downloads\Norton"
    rd /s /q "%PROGRAMDATA%\NortonInstaller"
    del /q "%USERPROFILE%\Desktop\*.lnk"
    del /q "%USERPROFILE%\Desktop\*.exe"
    rd /s /q "%APPDATA%\nortoninstaller"
    rd /s /q "%HOMEPATH%\Start Menu\Programs\norton"
    rd /s /q "%HOMEPATH%\Local Settings\Temporary Internet Files"
    del /q /f "%HOMEPATH%\Local Settings\Temp\*.*"
    reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Run /va /f
    reg delete HKCU\Software\norton /f
    reg delete HKLM\Software\norton /f
    reg delete HKLM\Software\symantec /f
    reg delete HKCU\Software\wow6432node\norton /f
    reg delete HKLM\Software\wow6432node\norton /f
    reg delete HKLM\Software\wow6432node\symantec /f
    REM echo OS Version: Windows Vista (debug line)
    goto end

    :ver_XP
    rd /s /q "%USERPROFILE%\my documents\norton"
    rd /s /q "%APPDATA%\documents\norton"
    rd /s /q "%ALLUSERSPROFILE%\Documents\norton"
    rd /s /q "%ALLUSERSPROFILE%\Application Data\Norton"
    rd /s /q "%ALLUSERSPROFILE%\Application Data\NortonInstaller"
    del /q "%USERPROFILE%\Desktop\*.lnk"
    del /q "%USERPROFILE%\Desktop\*.exe"
    rd /s /q "%APPDATA%\nortoninstaller"
    rd /s /q "%HOMEPATH%\Start Menu\Programs\norton"
    rd /s /q "%HOMEPATH%\Local Settings\Temporary Internet Files"
    del /q /f "%HOMEPATH%\Local Settings\Temp\*.*"
    reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Run /va /f
    reg delete HKCU\Software\norton /f
    reg delete HKLM\Software\norton /f
    reg delete HKLM\Software\symantec /f
    REM echo OS Version: Windows XP (debug line)
    goto end

    :warn_and_exit
    echo Machine OS cannot be determined.

    :end
    This works fairly well on english (the temp dir wont delete directories).
    Everything else works great though.

    Except, I cant get the desktop shortcuts and the start menu shortcuts to delete on other languages than english.


    Any help would be appreciated.

    Dave
    ____________________________________________________________

    Every day I try to follow Gods will. Every day, I struggle immensely with my human nature.

  • #2
    Restart computer and use F6 key from keyboard. It shows different options, here you can 't use mouse, use up and down keys and for select use enter keys. There are language options, select English and use esc key, it ask you want to save or save without exit, select with enter key.

    Comment


    • #3
      I cant change the language.
      The tests must be run in the installed language.
      Thanks though.
      ____________________________________________________________

      Every day I try to follow Gods will. Every day, I struggle immensely with my human nature.

      Comment


      • #4
        Over my head Dave but here is a bump for you




        Snafu
        Profile - Webpage

        You can't live life without living - me

        Nothing is that important that it must be done today as long as you will wake up tomorrow - me

        Comment

        Working...
        X