/build/static/layout/Breadcrumb_cap_w.png

Problems during Unistall.

Hi,
During uninstall, i also have to remove some user data files saved in the windows user profile. I have achieved this by deleteing the files through a custom installer class. When the installation happens to be a per-machine installation, i have to delete the files from all the windows user's profile in the local machine. i can get the list of user profiles from registry. How can i get which type of installation occurs, from the Custom Installer class,ie., how can i get the value of [ALLUSERS] value from the custom installer class.

0 Comments   [ + ] Show comments

Answers (11)

Posted by: anonymous_9363 14 years ago
Red Belt
0
Do you mean that, during an uninstall, you want to detect how the package was installed, per-machine or per-user?

EDIT:
Actually, it's irrelevant. Just use the RemoveFile table. Leave the FileName cell empty and the folder will be deleted. If you add both the User profile and All Users profile folders, it'll be quite safe, in terms of uninstall since the entries will be ignored if the folder doesn't exist.
Posted by: maha2804 14 years ago
Senior Yellow Belt
0
Well.. let s take the worst case. I m a user with no admin privelages. I m trying to uninstall my per user installation. No wif i try to delete the folder from some other user, exception will be thrown. The deletion of user dat of all the user logged in the machine can be done only by a admin who has performed a per machine installation.
Posted by: guy.forum 14 years ago
Orange Belt
0
Hello....

As per your first post regarding the deletion of folders during uninstall , i would suggest that it can be an alternative if you call a vbscript during uninstall.
The Script functionality can be:
1.) Traversing the folders like
Set objShell = CreateObject("WScript.Shell")
Dim Syspath,SyspathFolder, sysroot
Syspath = objShell.ExpandEnvironmentStrings("%systemdrive%")
sysroot = objShell.ExpandEnvironmentStrings("%systemroot%")
SyspathFolder = Syspath & "\Documents and Settings"
Set objFolder=objFSO.GetFolder(SyspathFolder)
Set objFolders=objFolder.SubFolders
For Each folder In objFolders
' Your desired operations here.
Next

In This way you can delete all the required files/folders from Uninstallation from all the users profile.

Hope this will help you!!

Thanks[:)]
Posted by: maha2804 14 years ago
Senior Yellow Belt
0
Well my question is not how to delete the files. But how to know whether the installation is per machine installation or per user installation in the CustomInstaller class....
Posted by: anonymous_9363 14 years ago
Red Belt
0
Well my question is not how to delete the files. Really? You could have fooled me: During uninstall, i also have to remove some user data files saved in the windows user profile

- You already know that a non-admin user cannot remove any other user's data, so it's irrelevant whether or not the install was per-user or not. That user can delete his/her own data files (post #3)
- If you use an admin-level account to uninstall, it's equally irrelevant how it was installed. The contents of the RemoveFile table will take care of files which were installed either way.
Posted by: maha2804 14 years ago
Senior Yellow Belt
0
You already know that a non-admin user cannot remove any other user's data, so it's irrelevant whether or not the install was per-user or not. That user can delete his/her own data files (post #3)

For a non admin user it is obvious the installation is going to be per user.

If you use an admin-level account to uninstall, it's equally irrelevant how it was installed. The contents of the RemoveFile table will take care of files which were installed either way.

It is relevant how it is installed. An admin user can choose to install the application per-user. Then during uninstallation the installer shouldnt not be meddling with other user profiles just becouse it has admin privelages.

So the ambiguity of the situation can be solved by getting the type of installation in the custom installer class.
Posted by: dvdzonenz 14 years ago
Purple Belt
0
So you mean to say that several people may be using the same PC at different time?
Posted by: maha2804 14 years ago
Senior Yellow Belt
0
May be. The application can either be installed per-user or per-machine. So if the application is a per-machine, then during unistallation i hv to delete the setting files of alll users logged in to the computer.

How do i find whether the installation is per-user or per-machine from Installer class.??
Posted by: dvdzonenz 14 years ago
Purple Belt
0
To simplify it I would limit the machine to people who all use the same programs and nothing gets uninstalled.

As for your case I would check the local profile variable etc. Because If I install a certain program as per machine then it got installed in c:\windows... etc normally it is installed in the user's folder. The program is chrome and it gets installed in


"C:\Documents and Settings\Administrator\Local Settings\Application Data\Google\Chrome\Application\" PER USER base

and on the the final machine it got installed in

C:\WINDOWS\system32\config\systemprofile\Local Settings\Application Data\Google\ PER MACHINE.


I don't know much about msi internals. I told you what I know till now. I can see that the msi knows the current username when I install as per machine base. I am not sure where would it go if a user decided to install it per machine base.

HTH
Posted by: dvdzonenz 14 years ago
Purple Belt
0
Well i don't know any VC etc but does the function/method return a value or not?

I even tried to switch to low bandwidth (For people with not so sharp skills?) but still cannot understand if it will or not?
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