- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Admin only installs. Possible to create folder and files for users too?
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
Admin only installs. Possible to create folder and files for users too?
We are required to create our installers so that our product can only be installed by an administrator. I have set the flags correct to do this and it seems to be working.
The problem now is that I'd also like to create folders and files for the end-users who'll be using the software. Something like creating folders and files under "My Documents", etc. Is this possible?
I understand the problem that the admin account installing the software doesn't know who the end-users are. But I was curious as I have seen other software (Visual Studio, MATLAB, etc.) where I find a "Visual Studio 20xx" folder under My Documents with subfolders and files, even though it was installed by an admin.
Otherwise, what might be my options here, if any? Creating separate admin and user installs?...
Thanks,
- Tags:
- admin
- administrator
Hi @1Gunn1 ,
This required to be handled in your application may be through embedding application manifest with execution level setting to run your application in administrator mode.
For more info:
https://docs.microsoft.com/en-us/previous-versions/bb756929(v=msdn.10)
The application itself that I am installing can be run by -anyone-. That's not the problem. However, we only want it installed by an administrator (into the Program Files folder where it can't be modified).
So I don't think I need to do anything with execution level privileges on the application.
My real question is, is it possible for an admin to install our application to Program Files, but have the installer somehow add folders and files in a users Documents or AppData folders, where we could put files we don't care if the end user modifies or not.
We just need to protect some files...but not all of them.
Thanks,
Tom
Hi @1Gunn1 ,
You can ensure that your installer is installed by administrator by doing the below changes:
And InstallShield supports predefined folders for AppData folder to create files, below link provide more information about predefined folders:
https://helpnet.flexerasoftware.com/installshield25helplib/helplibrary/IHelpISXFilesDestinations.htm
Thank you for the additional information and the screenshot. I changed that setting to "Administrator" and now the installer icon has the shield on it and it immediately prompts me for the administrator UAC when I run it. That works perfectly, better than I had it set with the ALLUSERS flag, which would wait until I attempted to begin copying files to prompt the UAC dialog.
But on your other comment, I'm guessing those variables like the AppData folder will resolve to the administrator's AppData folder when it is being installed, right? What I ideally want is to use the user's AppData" folder to create folders and files...not the admin's. Is that possible?
Thanks!