I made an Outlook Add-in in VS2015 using NetOffice and targeting .NET 2.0, now I need to package it for non-admin users to install (it cannot require admin rights). I typically use ClickOnce but it's missing (assume because I'm not using VSTO?), so I downloaded and installed the Visual Studio 2015 Installer Project (seemed easy to use).
This SO question/answer seems to be the solution I'm searching for but when I run the MSI file it still requires an admin password. After entering an admin password, all of the files are added to the user's AppData folder. So why is still requiring an admin password? What am I missing here??
9 steps outlined in the SO question:
- Use a Type 51 Custom Action in the InstallUISequence to always unset the ALLUSERS (the per-user option)
- Files must be written only to folders that Standard User has access to. Assuming the ALLUSERS is always set to the per-user setting, you can use the redirectable folder properties but not ProgramFilesFolder as it does not redirect on per-user.
- Install app to a location under LocalAppDataFolder.
- All registry settings should be written to HKCU which is 1 in the Registry Table’s Root column.
- Flip bit 3 of the word count property in the summary information stream to signal no credential prompt is required.
- If you have a bootstrapper (typically named setup.exe), manifest the requestedExecutionLevel to run asInvoker.
- Pass ICE Validation as the ICEs have checks for incorrectly mixing per-user and per-machine state.
- Test both from a Standard User account and from an elevated command prompt to confirm behavior.
- Provide your users’ documentation of the user specific nature of the package as this is atypical in today’s application installs.
Here's what I've done:
Step 1: Setup project -> View-> User Interface -> set "InstallAllUsersVisible" to False (per SO answer)
Step 2: In the setup file system I added "User's Application Data Folder", then "Local", then "ProjectName", and then added the Project Output -> Primary Output. I tried to remove the "Application Folder" but it says it's required and won't be deleted.
Step 3: I believe this is what I did above...
Step 4: I have not added any registry keys. Is this something that is required?
Step 5: Per the SO answer, I downloaded Orca and opened the MSI file. However, when I go to View -> Summary Information and look for the word count property it's not there. I've looked through all of tables and can't find it anywhere.
Step 6: After unchecking "Create setup program to install prerequisite components" in the Setup file properties I no longer have a setup.exe file.
Step 7: I read a couple of blurbs on ICE Validation, but not really sure what I need to do here.
Steps 8 and 9 skipped for now.
Other: While looking around in Orca I noticed in the CustomAction table that the DIRCA_TARGETDIR was still set to the Program Folder so I changed it to [AppDataFolder][Manufacturer][ProductName].