So...I have a 2 part question:
1. Do you see anything wrong or ineffecient with my script?
2. What's the best way to package this up into a working program that I can distribute (freely).
I havnt done VB in a long time, and I'm only really familiar with batch scripting...so another language isn't really possible right now.
CLS @echo off TITLE AIM Backup set xcopy=false set choice=false IF NOT EXIST "%WINDIR%\system32\xcopy.exe" set xcopy=true IF NOT EXIST "%WINDIR%\system32\xcopy.exe" copy "%CD%\xcopy.exe" "%WINDIR%\system32\xcopy.exe" IF NOT EXIST "%WINDIR%\system32\choice.com" set choice=true IF NOT EXIST "%WINDIR%\system32\choice.com" copy "%CD%\choice.com" "%WINDIR%\system32\choice.com" CLS ECHO. ECHO Welcome to AIM Backup. This will back up your AIM profiles, Away messages, AIM downloads, and DeadAIM chat logs. ECHO. ECHO This works on 5.0-5.5. It has not been tested on anything higher yet. ECHO. ECHO If you have multiple accounts on the computer, you must this program on each one individually. ECHO Once the program runs, copy the AIMBACK directory to your new computer ECHO. ECHO Note: This only applies to the current logged-in user. ECHO Choose ECHO 1) Backup Your AIM Profiles ECHO 2) Restore Your AIM Profiles ECHO 3) Exit choice /c:123 /N if errorlevel 3 GOTO end if errorlevel 2 GOTO restore if errorlevel 1 GOTO backup :Backup ECHO. ECHO Backing up AIM profiles xcopy "%APPDATA%\AIM\*" "%CD%\AIMBACK\%USERNAME%\profiles\" /s /i /q IF %errorlevel% GEQ 1 ECHO AIM profiles were not properly backed up. IF errorlevel 0 ECHO AIM profiles Backed up ECHO. ECHO Backing up AIM filelib (only if there is data) xcopy "%userprofile%\My Documents\filelib\*" "%CD%\AIMBACK\%USERNAME%\filelib\" /s /i /q ECHO. ECHO. IF %errorlevel% GEQ 1 ECHO AIM filelib were not properly backed up. IF errorlevel 0 ECHO AIM filelib Backed up ECHO. ECHO Backing up Away messages and registry settings REG EXPORT "HKCU\Software\America Online\AOL Instant Messenger (TM)\CurrentVersion\Users" "%CD%\AIMBACK\%USERNAME%.reg" ECHO. IF errorlevel 1 ECHO Registry Export Failed. Must be done manually IF errorlevel 0 ECHO Registry export Succeeded. ECHO. ECHO Backing up DeadAim Logs (if they exist) xcopy "%userprofile%\My Documents\aim logs\*" "%CD%\AIMBACK\%USERNAME%\aim logs\" /s /i /q ECHO. IF %errorlevel% GEQ 1 ECHO DeadAIM chat logs were not properly backed up. IF errorlevel 0 ECHO DeadAIM chat logs Backed up ECHO. ECHO. ECHO. ECHO To back up other account's AIM settings, run this program from their account. PAUSE GOTO End :restore ECHO. ECHO. ECHO Avaialable usernames: DIR "%CD%\AIMBACK\" /A:D /B ECHO. ECHO. ECHO Please enter the username of the account you backed up AIM from. Set /P account= IF EXIST "%CD%\AIMBACK\%account%\" GOTO true ELSE GOTO false :false ECHO. ECHO The username, %account%, was not found, or is invalid. PAUSE GOTO restore :true ECHO. ECHO Terminating AIM process taskkill /F /IM AIM.EXE ECHO. ECHO Restoring AIM profiles xcopy "%CD%\AIMBACK\%account%\profiles\*" "%APPDATA%\AIM\" /s /i /q ECHO. IF %errorlevel% GEQ 1 ECHO AIM profiles were not properly restored. IF errorlevel 0 ECHO AIM profiles restored ECHO. ECHO Restoring AIM filelib xcopy "%CD%\AIMBACK\%account%\filelib\*" "%userprofile%\My Documents\filelib\*" /s /i /q ECHO. IF %errorlevel% GEQ 1 ECHO AIM filelib were not properly restored. IF errorlevel 0 ECHO AIM filelib restored ECHO. ECHO Restoring Away messages and registry settings REG IMPORT "%CD%\AIMBACK\%USERNAME%.reg" ECHO. IF errorlevel 1 ECHO Registry Export Failed. Must be done manually IF errorlevel 0 ECHO Registry export Succeeded. ECHO. ECHO Restoring DeadAIM chat logs xcopy "%CD%\AIMBACK\%USERNAME%\aim logs\*" "%userprofile%\My Documents\aim logs\" /s /i /q ECHO. IF %errorlevel% GEQ 1 ECHO AIM filelib were not properly restored. IF errorlevel 0 ECHO AIM filelib restored :end pause Exit
EDIT: CODE UPDATED

Sign In
Register
Help


MultiQuote