+ Post New Thread
Results 1 to 9 of 9
Windows 7 Thread, File Associations - all changed to Adobe Reader! in Technical; My HT has a problem on his Windows 7 64 Bit workstation. Most of his file and programme associations have ...
  1. #1

    speckytecky's Avatar
    Join Date
    May 2006
    Location
    UK
    Posts
    2,623
    Thank Post
    3,557
    Thanked 300 Times in 228 Posts
    Blog Entries
    3
    Rep Power
    123

    File Associations - all changed to Adobe Reader!

    My HT has a problem on his Windows 7 64 Bit workstation. Most of his file and programme associations have suddenly changed to Adobe Reader.

    Logging him off and logging on myself my Associations are normal. How do I change his so they are as well? Anyone come across this before?

  2. #2

    speckytecky's Avatar
    Join Date
    May 2006
    Location
    UK
    Posts
    2,623
    Thank Post
    3,557
    Thanked 300 Times in 228 Posts
    Blog Entries
    3
    Rep Power
    123
    What I have tried - so far!

    In Users Created a New Folder where I copied his Desktop and Download Folders.

    Renamed his User Folder.

    Got him to log on - twice so far but Windows came up with a message both times saying it had provisioned a temporary desktop and despite Roaming Profile had not given direct access to his documents either. They were available through his mapped drives though.

    Created links on his current desktop to the old Desktop and Download folders and from there his documents and folders have the right associations again.

    I hope that after he logs off and logs on again the correct profile gets picked up again. Odd one isn't it. He did have an item of Malware on his PC which MalwareBytes has seen off.
    Last edited by speckytecky; 16th May 2012 at 02:01 PM.

  3. #3

    speckytecky's Avatar
    Join Date
    May 2006
    Location
    UK
    Posts
    2,623
    Thank Post
    3,557
    Thanked 300 Times in 228 Posts
    Blog Entries
    3
    Rep Power
    123
    Not an issue anyone else has encountered - yet then! Unfortunately the Head logging on again today and has a temporary desktop again.

  4. #4

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,372
    Thank Post
    906
    Thanked 1,811 Times in 1,559 Posts
    Blog Entries
    12
    Rep Power
    468
    If cant just do that with profile in Windows 7 so you have stuffed it. copy the favourites, desktop and other stuff to a folde rin the c drive.

    reboot login as a local admin and run this batch file. It will delete all existing profiles and reset the registry. Get the HT to log in again and then copy the stuff back manaully. It will resolve the temporary desktop issue.

    Code:
    @ECHO OFF
    
    :: --------------------------------------
    ::
    :: Windows 7 User Profile Cleaning Script
    :: Version 3.1
    ::
    :: Written by Mike Stone
    :: mikestone@gmail.com
    :: http://mstoneblog.wordpress.com
    ::
    :: --------------------------------------
    ::
    :: Welcome!  This script is designed to automate the process of flushing
    :: user profiles within Windows 7, while at the same time preserving
    :: profiles of your choosing, including domain users.
    ::
    :: This script is written as an example of wanting all domain users wiped
    :: except for the one called "pctest".
    ::
    :: Portions of the script that will require manual edits will be preceded
    :: by instructions with these "double colon" comment marks.
    ::
    :: Please let me know how well (or not well) this works for you or any
    :: features you can think of that could be added.
    ::
    :: --------------------------------------
    
    title Windows 7 User Profile Cleaning
    
    :: ----------
    :: Add any users you wish to exclude from the wipe to the "userpreserve"
    :: line below and separate them by commas.  Be careful - these are
    :: case-sensitive.
    :: ----------
    
    :USERPRESERVE
    set userpreserve="Administrator,All Users,UpdatusUser,Default,Default User,Public,pctest,netadmin,flemingz,rodakz,wadsworthh,suddephatts,shutdown,profile"
    
    FOR /f "tokens=*" %%a IN ('reg query "hklm\software\microsoft\windows nt\currentversion\profilelist"^|find /i "s-1-5-21"') DO CALL :REGCHECK "%%a"
    GOTO VERIFY
    
    :REGCHECK
    set SPACECHECK=
    FOR /f "tokens=3,4" %%b in ('reg query %1 /v ProfileImagePath') DO SET USERREGPATH=%%b %%c
    FOR /f "tokens=2" %%d in ('echo %USERREGPATH%') DO SET SPACECHECK=%%d
    IF ["%SPACECHECK%"]==[""] GOTO REGCHECK2
    GOTO USERCHECK
    
    :REGCHECK2
    FOR /f "tokens=3" %%g in ('reg query %1 /v ProfileImagePath') DO SET USERREGPATH=%%g
    GOTO USERCHECK
    
    :USERCHECK
    FOR /f "tokens=3 delims=\" %%e in ('echo %USERREGPATH%') DO SET USERREG=%%e
    FOR /f "tokens=1 delims=." %%f IN ('echo %USERREG%') DO SET USERREGPARSE=%%f
    ECHO %USERPRESERVE%|find /I "%USERREGPARSE%" > NUL
    IF ERRORLEVEL=1 GOTO CLEAN
    IF ERRORLEVEL=0 GOTO SKIP
    
    :SKIP
    ECHO Skipping user clean for %USERREG%
    GOTO :EOF
    
    :CLEAN
    ECHO Cleaning user profile for %USERREG%
    rmdir "C:\Users\%USERREG%" /s /q > NUL
    ECHO Cleaning user registry for %USERREG%
    reg delete %1 /f
    IF EXIST "C:\Users\%USERREG%" GOTO RETRYCLEAN1
    GOTO :EOF
    
    :RETRYCLEAN1
    ECHO Retrying clean of user profile %USERREG%
    rmdir "C:\Users\%USERREG%" /s /q > NUL
    IF EXIST "C:\Users\%USERREG%" GOTO RETRYCLEAN2
    GOTO :EOF
    
    :RETRYCLEAN2
    ECHO Retrying clean of user profile %USERREG%
    rmdir "C:\Users\%USERREG%" /s /q > NUL
    GOTO :EOF
    
    :VERIFY
    FOR /f "tokens=*" %%g IN ('reg query "hklm\software\microsoft\windows nt\currentversion\profilelist"^|find /i "s-1-5-21"') DO CALL :REGCHECKV "%%g"
    GOTO REPORT
    
    :REGCHECKV
    set SPACECHECKV=
    FOR /f "tokens=3,4" %%h in ('reg query %1 /v ProfileImagePath') DO SET USERREGPATHV=%%h %%i
    FOR /f "tokens=2" %%j in ('echo %USERREGPATHV%') DO SET SPACECHECKV=%%j
    IF ["%SPACECHECKV%"]==[""] GOTO REGCHECKV2
    GOTO USERCHECKV
    
    :REGCHECKV2
    FOR /f "tokens=3" %%k in ('reg query %1 /v ProfileImagePath') DO SET USERREGPATHV=%%k
    GOTO USERCHECKV
    
    :USERCHECKV
    FOR /f "tokens=3 delims=\" %%l in ('echo %USERREGPATHV%') DO SET USERREGV=%%l
    FOR /f "tokens=1 delims=." %%m IN ('echo %USERREGV%') DO SET USERREGPARSEV=%%m
    ECHO %USERPRESERVE%|find /I "%USERREGPARSEV%" > NUL
    IF ERRORLEVEL=1 GOTO VERIFYERROR
    IF ERRORLEVEL=0 GOTO :EOF
    
    :VERIFYERROR
    SET USERERROR=YES
    GOTO :EOF
    
    :REPORT
    IF [%USERERROR%]==[YES] (
    		set RESULT=FAILURE
    )		ELSE (
    		set RESULT=SUCCESS
    )
    
    :EXIT
    exit
    
    :EOF

  5. Thanks to FN-GM from:

    speckytecky (17th May 2012)

  6. #5

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    11,271
    Thank Post
    884
    Thanked 2,749 Times in 2,322 Posts
    Blog Entries
    11
    Rep Power
    785
    It's to do with Windows keeping a record in the registry that it has the profile locally, when it tries to logon it looks at the reg key and goes after the profile location stored there, when it can't find it the temp profile is used.

    You may not need to recreate the profile though, if you can restore the profile then delete this key:
    If this only happens on one user profile open Regedit and remove this key
    HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\FileExts.lnk
    A quick log out and log in and the user should be right as rain again.
    registry - How to reset shortcuts (.lnk file) in Windows 7? - Super User

    Had a simmilar issue at one point (with temp profiles) thanks to a rather nasty network issue and ended up using this Delprof2 – User Profile Deletion Tool | Helge Klein | Home of SetACL which I heard about on here as a startup and shutdown machine script. It does a clean up like the above script. With us it was cleaning out cached profiles though.

    Edit: Oh and for good measure, try Foxit Reader instead instead, much less corrupty
    Last edited by SYNACK; 17th May 2012 at 10:34 AM.

  7. Thanks to SYNACK from:

    speckytecky (17th May 2012)

  8. #6

    speckytecky's Avatar
    Join Date
    May 2006
    Location
    UK
    Posts
    2,623
    Thank Post
    3,557
    Thanked 300 Times in 228 Posts
    Blog Entries
    3
    Rep Power
    123
    Thanks for the replies FN and Synack. I incorrectly said earlier that we have Roaming Profiles - looking at AD I see there is nothing in the profile path it's all done by a login.bat file.

    I have got the HT to log on to another Win 7 64 Bit PC and the desktop hasn't pulled up on that one either - would that be because by renaming his local user file on his original PC that's locked it?

    Looking at his folder on the Domain I see his Documents and Desktop folders are there and the content looks normal. Would I be right in thinking I'm going to need to release his locked profile on the original PC before trying any of the above?

  9. #7

    X-13's Avatar
    Join Date
    Jan 2011
    Location
    /dev/null
    Posts
    9,833
    Thank Post
    667
    Thanked 2,186 Times in 1,492 Posts
    Blog Entries
    19
    Rep Power
    900
    Quote Originally Posted by FN-GM View Post
    If cant just do that with profile in Windows 7 so you have stuffed it. copy the favourites, desktop and other stuff to a folde rin the c drive.

    reboot login as a local admin and run this batch file. It will delete all existing profiles and reset the registry. Get the HT to log in again and then copy the stuff back manaully. It will resolve the temporary desktop issue.

    Code:
    GIANT WALL OF CODE!!!

    Damn, I need someone to teach me how to do that...

  10. #8

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    11,271
    Thank Post
    884
    Thanked 2,749 Times in 2,322 Posts
    Blog Entries
    11
    Rep Power
    785
    If there is no profile path it probably means that it is using local profiles and redirected folders through GPO. The policy path could also be set through GPO but this is rare and problematic.

    It may even all be local so what I would do is take a copy of the profile on the original machine into a folder outside the users folder then rename the original back so that it was the way it was/unlocked. Log in as the user and kill the user reg key as above in my post then log off and back on which should reset all the file assosiations to default fixing both problems.

  11. Thanks to SYNACK from:

    speckytecky (17th May 2012)

  12. #9

    speckytecky's Avatar
    Join Date
    May 2006
    Location
    UK
    Posts
    2,623
    Thank Post
    3,557
    Thanked 300 Times in 228 Posts
    Blog Entries
    3
    Rep Power
    123
    SYNACK you are not just a Mod you are a God! - no blasphemy intended.

    This worked a treat. thanks a huge heap mate.


    Quote Originally Posted by SYNACK View Post
    If there is no profile path it probably means that it is using local profiles and redirected folders through GPO. The policy path could also be set through GPO but this is rare and problematic.

    It may even all be local so what I would do is take a copy of the profile on the original machine into a folder outside the users folder then rename the original back so that it was the way it was/unlocked. Log in as the user and kill the user reg key as above in my post then log off and back on which should reset all the file assosiations to default fixing both problems.

  13. Thanks to speckytecky from:

    SYNACK (17th May 2012)



SHARE:
+ Post New Thread

Similar Threads

  1. easy way to change File Association
    By glennda in forum Windows
    Replies: 5
    Last Post: 12th January 2012, 10:45 PM
  2. Adobe Reader File Association Not Working
    By lmgtfy in forum Windows
    Replies: 0
    Last Post: 23rd September 2010, 02:21 PM
  3. Replies: 11
    Last Post: 6th May 2008, 03:36 PM
  4. Using assoc to change file associations
    By cookie_monster in forum Windows
    Replies: 4
    Last Post: 23rd April 2008, 03:59 PM
  5. Which file do I need to edit to change front page graphics?
    By reggiep in forum EduGeek Joomla 1.0 Package
    Replies: 2
    Last Post: 22nd April 2008, 03:18 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •