Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # adapt this if your windows directory is not C:\windows
- WINFOLDER="windows"
- rename_folder()
- {
- CORRUPT=$1
- CORRECTED=$2
- echo
- echo Checking for "$BASE"/"$CORRUPT"...
- if [ ! -d "$BASE"/"$CORRUPT" ]; then
- echo "$BASE"/"$CORRUPT" doesn\'t exist. No need to fix.
- else
- if [ -e "$BASE"/"$CORRECTED" ]; then
- echo Hmm, "$BASE"/"$CORRECTED" already exists.
- echo Renaming to "$BASE"/"$CORRECTED".weird...
- mv "$BASE"/"$CORRECTED" "$BASE"/"$CORRECTED".weird
- fi
- echo -n "Correcting "$BASE"/"$CORRUPT" to "$BASE"/"$CORRECTED"... "
- mv "$BASE"/"$CORRUPT" "$BASE"/"$CORRECTED"
- echo OK.
- fi
- echo Finished.
- sleep 1
- }
- cat << EOF
- This script intends to fix folder corruption caused by Windows Explorer
- either directly or by having been invoked by other programs such as
- Messenger or Internet Explorer.
- Affected folders are among others:
- C:\Program Files -> C:\!$!$!$!$.pfr
- C:\Program Files\Internet Explorer -> C:\!$!$!$!$.pfr\!$!$!$!$.ier
- C:\Program Files\Outlook Express -> C:\!$!$!$!$.pfr\!$!$!$!$.oer
- C:\Windows\Application Data -> C:\Windows\$!$!$!$!.app
- C:\Windows\Desktop -> C:\Windows\!$!$!$!$.dsk
- Note that this script makes some changes to your data.
- I tried to design it as secure as possible, but still: NO WARRANTY !!
- And note that in case you've got a localized version of Windows,
- this script will rename the corrupted folders to the international naming,
- *not* to the naming that your installation had before.
- If this is the case, then you might want to choose to not run this script.
- And DON'T try to boot into Windows before fixing the damage.
- I haven't tried it, but doing so might damage your Windows install
- irreparably.
- Andreas Mohr
- Do you want to execute this script [Y/N] ?
- EOF
- echo -n "> "
- read ans
- RES="`echo $ans|tr -d "\r"`"
- if [ "$RES" != "y" -a "$RES" != "Y" ]; then
- echo Hmm. Seems like you want to stay corrupted, then \;-\)
- echo Have a nice day !
- exit
- fi
- echo Please enter the directory location where your Windows partition is mounted:
- echo -n "> "
- read ans
- RES="`echo $ans|tr -d "\r"`"
- BASE=$RES
- if [ -z "`find "$BASE" -maxdepth 1 -iname "command.com"`" ]; then
- echo Sorry, "$BASE" is not the mount directory of a valid Windows partition. Aborting...
- exit
- fi
- rename_folder \!\$\!\$\!\$\!\$.pfr Program\ Files
- rename_folder Program\ Files/\!\$\!\$\!\$\!\$.acr Program\ Files/Accessories
- rename_folder Program\ Files/\!\$\!\$\!\$\!\$.cfr Program\ Files/Common\ Files
- rename_folder Program\ Files/\!\$\!\$\!\$\!\$.ier Program\ Files/Internet\ Explorer
- rename_folder Program\ Files/Internet\ Explorer/\!\$\!\$\!\$\!\$.cwr Program\ Files/Internet\ Explorer/Connection\ Wizard
- rename_folder Program\ Files/\!\$\!\$\!.me Program\ Files/Online\ Services
- rename_folder Program\ Files/Online\ Services/\!\$\!\$\!\$.cis Program\ Files/Online\ Services/CompuServe
- rename_folder Program\ Files/\!\$\!\$\!\$\!\$.mp2 Program\ Files/Windows\ Media\ Player
- rename_folder Program\ Files/\!\$\!\$\!\$\!\$.nmr Program\ Files/NetMeeting
- rename_folder Program\ Files/\!\$\!\$\!\$\!\$.oer Program\ Files/Outlook\ Express
- rename_folder $WINFOLDER/\$\!\$\!\$\!\$\!.app $WINFOLDER/Application\ Data
- rename_folder $WINFOLDER/Application\ Data/\$\!\$\!\$\!.ms $WINFOLDER/Application\ Data/Microsoft
- rename_folder $WINFOLDER/\!\$\!\$\!\$\!\$.\$\!\$ $WINFOLDER/Favorites
- # dunno what to rename this to
- #rename_folder $WINFOLDER/Favorites/\!\$\!\$\!\$\!\$.\$\!\$ $WINFOLDER/Favorites/XXXXX
- rename_folder $WINFOLDER/\!\$\!\$\!\$\!\$.dsk $WINFOLDER/Desktop
- rename_folder $WINFOLDER/web/\!\$\!\$wall.ie4 $WINFOLDER/web/Wallpaper
- rename_folder $WINFOLDER/web/Wallpaper/\!\$\!\$\!\$\!\$.wal $WINFOLDER/web/Wallpaper/Wallpapr.htm
- echo
- echo Yay, finished. Cross your fingers \! :-\)
- #PASTED FROM http://web.archive.org/web/20020211013822/http://home.arcor.de/andi.mohr/download/decorrupt_explorer
Advertisement
Add Comment
Please, Sign In to add comment