/build/static/layout/Breadcrumb_cap_w.png

Self Repair - Doesn't work for Admins

Hello,

I have a problem with self repair of a simple MSI, hopefully it's simple for someone to answer too. The MSI is just a test to prove the self repair function, hence the directory names.

The MSI delivers two files to [AppDataFolder]SelfRepair (C:\Documents and Settings\%username%\Application Data\SelfRepair) on installation. One of these files is a key path. I have an advertised shortcut on the desktop.

When I log on as a different user (non-admin) the self repair works, and the files are created in the non-admin's profile. However, when I log on as another Administrator, the self repair doesnt work. Event viewer shows that Windows Installer looks for the files in the original administrator's profile (ie the admin who installed the app) and sees that they are present so doesnt self repair.

Why am I seeing different behaviour for Admins and non-Admins?

0 Comments   [ + ] Show comments

Answers (16)

Posted by: AngelD 16 years ago
Red Belt
0
Use a HKCU registry entry as keypath!
Posted by: p4ntb0y 16 years ago
Orange Belt
0
I can see now why you guys get a bit touchy :-)
Posted by: EddySmiley 16 years ago
Senior Yellow Belt
0
ORIGINAL: p4ntb0y

I can see now why you guys get a bit touchy :-)


Why's that then?
Posted by: p4ntb0y 16 years ago
Orange Belt
0
Maybe the 293 hits in the search button for the forum.

And prob that these guys have answered this maybe 100 times allready :-)
Posted by: AngelD 16 years ago
Red Belt
0
Why am I seeing different behaviour for Admins and non-Admins?

While a self-check takes place when an admin user is logged in this user is able to access every file in other user's profile directory (as "local" admins has read permissions on non-admin users profile) and therefore will Windows Installer find the keypath for the previous user a repair performed for and not find the component broken while a keypath is a file under a userprofile. This is not true for a non-admin user as they only have read permissions on their own profile directory.

Users registry hive (HKCU) is only loaded while the user is logged in and therefore not found for another user, so that's why a HKCU registry entry is used instead.

Hope that helps
Posted by: EddySmiley 16 years ago
Senior Yellow Belt
0
That's great thanks. I'm now using a dummy HKCU key and it's working.

I now have a proplem with the desktop shortcut not being delivered when I make it advertised (start menu shortcut is there though). I'll do some searching though to find the answer

Cheers,
Eddy
Posted by: AngelD 16 years ago
Red Belt
0
Only advertised Desktop and Start-Menu shortcuts will be installed when you advertise the MSI, so make sure they are.
Posted by: anks_09 16 years ago
Orange Senior Belt
0
Hi,

I think when we install the application in admin profile we get all the HKCU and user related files which are going in AppData gets installs.Hence when we lauch the shortcut and it is advertise it does not self-repair the application whereas the behaviour in User profile is different when you log in to new User Profile and if we lauch the advertise shortcut it will self-repair the application for the first time so that all User related files and registry gets installed and hence if we lauch the shortcut again in same user profile it will not self-repair again.
Posted by: jmcfadyen 16 years ago
5th Degree Black Belt
0
p4ntb0y

and thats the only ones it found. if i had a $1 for every time that question was posted and answered I would be loaded.
Posted by: EddySmiley 16 years ago
Senior Yellow Belt
0
Sorry if this is again a highly covered topic (I have searched) but, the self repair works fine if a shortcut is used to launch the app. However, what happens if the user doesnt use the shortcut, rather the application is launched via a file association (.jpg)? Is there any way to get the app to self repair this way, or is it just tough luck?

Cheers,
Eddy
Posted by: AngelD 16 years ago
Red Belt
0
You need to make sure the file association isn't written from the Registry table but in the Extension, Verb (ans sometimes in the MIME) table instead.
So when a user double-click on ex. .jpg file the entrypoint to the .jpg file association will be triggered and therefore a self-check will occur.
Posted by: Inabus 16 years ago
Second Degree Green Belt
0
Agreed, there are various different entry points into an MSI, verb, typelib, shortcut, mime , extension yada yada. Anyone of these, if properly authored will allow self repair. Something to be aware of, however, is users breaking something then just double clicking on an EXE that your app installed as there is the potential this wont instigate a self repair. The easiest method to avoid this is read only permissions on the program files installation directory so that users cant delete files in the first place.

P
Posted by: AngelD 16 years ago
Red Belt
0
The easiest method to avoid this is read only permissions on the program files installation directory so that users cant delete files in the first place.

The best would of course be if the user wasn't an admin in the first place, right?
If they are local admins it's up to them to break their software or not. If a user deletes a program file (not userdata) then shame on them [;)]

The self-check should take in place whenever an entrypoint is called and when a broken component with missing or corrupted keypath is found a self-repair will be triggered.
Posted by: EddySmiley 16 years ago
Senior Yellow Belt
0
Thanks guys, I wasn't aware that file extensions could be entry points [&:]

Now to figure out how to configure them properly.

Cheers
Posted by: EddySmiley 16 years ago
Senior Yellow Belt
0
After searching the forum and the net, i'm non the wiser!

Could anyone point me in the direction of a decent how-to, with regard to making advertised file extensions? I need to make the following file types open with Paint Shop Pro XI and also force a self repair if necessary.

JPG
JPEG
TIFF
GIF
BMP

The vendor MSI already associates the above file extensions, but using direct registry entries, so they are not entry points for a self repair.

Thanks [sm=rolleyes.gif]
Posted by: AngelD 16 years ago
Red Belt
0
Have a look at http://www.myitforum.com/inc/upload/7840ProgIdEntryPoint.pdf
It should provide you with the information to relate/connect the different needed tables.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ