PDA

View Full Version : Installation without Admin privileges



Katherine
11-07-2003, 04:55 PM
Hello,
I'm using IS DevStudio9. I created a project that installs software windows application with *.dlls and *.ocx self-registration.

My setup.exe isn't running on some machines when I'm testing it and I believe that these machines don’t have administration rights to install my application on it. It's giving me an error:
"1202: You do not have sufficient privileges to complete this installation for all users of the machine. Log on as administrator and then retry the installation"

But on some machine that doesn't have login as admin it's allowed me to run my setup.exe.

Another problem is self-registered files. On some machine setup process is generating error messages and can't register the *.dlls and *.ocx files. Some errors have code 1406.

Please let me know how it's possible to solve these problems as soon as possible.
Thanks,
Kate.

BigEHead
11-11-2003, 11:10 PM
i'm having the same problem. before i purchased devstudio, i asked installshield if it's possible with the installscript projects and i explicitly said "not installscript msi projects but installscript only" and they said yes it's possible. please let me know if you figure this out.

thanks,
jake

RichAquino
11-12-2003, 01:11 PM
Jake and Kate,

What project types do you have, and are you both using DevStudio 9.0?

Rich

Katherine
11-12-2003, 02:40 PM
To RichAquino:
Yes, I'm using DevStudio9.0

Its has been a week since I posted my question to IS community and only now I'm getting the response! Great support!!!

Anyway, thanks for reply.

To BigEHead (Jake)
I found the solution for my problem installation on NT machine. You can take a look on ALLUSERS Sample project in you Samples directory, that coming with DevStudio Installation. :)

But to add additional Registry Set I needed to convert my project from InstallScript MSI project into InstallScript Project. The price of it - I lost Summary Info and Add/Remove Info tabs and can't figure out how now to set my application icon in Add/Remove Control Panel :(

To anybody who can help:
So now I have a problem with self-registered files. If I'm not an Administrator user on the machine the installation will run but before Finish dialog will give me a MessageBox with error on files that I'm trying to set as self-registered. I tried an option to set them as shared as well but this doesn't help.

If somebody can help me with this problem, I'll be very appreciate. At least let me know that this is impossible to do.

One more question if somebody can explain me how to know if the user is regular user, power user or has administrative rights. I can only verify if I'm not and Administrator by selecting Users and Passwords from Control Panel window. Some machine will run my installation without these errors Message Box and will run it with it.

Thanks again for attention and please respond ASAP.To RichAquino: To RichAquino:

RichAquino
11-12-2003, 02:55 PM
Hi Kate,

Your original problem was probably coming up because you set ALLUSERS in your Property table. A better approach is to use the SdCustomerInformation dialog, which sets ALLUSERS.

We're currently working on getting the MSI Add/Remove Programs properties into Professional projects.

To help figure out the cause of the self-registering problems, you should try to manually self-register the files using regsvr32.exe for DLLs or OCXs, or the /REGSERVER command line parameter for your EXEs. I would assume that you get the same error. If that's the case, I'm guessing that the self-registration routines are trying to specifically write to HKCR (HKLM\Classes) instead of writing to the appropriate hive based on user-privileges (i.e. HKCU\Classes instead).

You can find out if a user is an administrator by calling the Is function with the USER_ADMINISTRATOR flag.

Rich

Katherine
11-12-2003, 07:44 PM
Dear Rich!

Thanks for a quick replay.
My problem persists when I'm running my installation on machine that I have any privileges, neither “admin” nor "power".
As soon as I'm login on machine as a power user the problem disappears and files getting to be registered on the machine.

I already contacted the dlls provider to verify if they are making any restriction on their dlls registrations. If so, then I can just conclude that my installation requires at least the "power" user to be login in the machine. The problem is that we need to run my setup in the lab on more than 300 machines and we can't switch them back and force to more rights.

Is InstallShield has any solution to this problem? I tried to use ALLUSERS Sample Project code implemented in my project, but it helped me only with NT situation, not with the problem that I mention above.

Thanks again,
Kate.

BigEHead
11-12-2003, 10:07 PM
rich, yes i have an installscript project and yes i am using dev studio.

kate, the allusers sample really doesn't help me at all because i dont' want it to be optional for all users or not. i want to install my setup for all users and i want to be able to do that without administrative privileges (very similar to how it's possible with msi projects). i was under the impression that this is possible with installscript projects.

rich can you please shed some light? i know for msi projects (whether basic or installscript msi) it is possible to install without admin privileges because you can set a policy on the machine to allow windows installer to run with elevated privileges. is this possible with installscript projects?

thanks,
jake

Katherine
11-13-2003, 02:27 PM
Jake,

Can you please tell me what is MSI project and what is the difference between InstallShield InstallScript project.

Thanks, Kate.

BigEHead
11-13-2003, 02:50 PM
anything with MSI uses the windows installer. this was only introduced with installshield with developer 7 and 8. in developer 7 and 8, there was no option to do just installscript, it required installscript msi. devstudio is a combination of installshield professional and installshield developer. i know there's a way to do elevated installs with MSI (windows installer) setups, but i want to know if it is possible with installscript projects. that's what the salesperson implied when i purchased the software.

thanks,
jake

Katherine
11-13-2003, 03:12 PM
Jake,

Can you plese tel me how are you making this elevated installs with MSI (windows installer) setups?
May be it'll help me in my installation as well.

Thanks, Kate.

BigEHead
11-13-2003, 03:21 PM
there's not really anything you do in the setup besides check for the elevated property. that's something you can do on the workstation whether it's a group policy or an active directory policy.

Nick71
11-25-2003, 07:24 AM
If any of you are still struggling with these issues you may be interested in my experiences over the last two weeks. I had an Installscript MSI project, which users needed to be able to install and update or patch as non-administrators. I spent two weeks with a support task open and eventually got the install working on one windows 2000 machine as non-administrator. However, it didn't work on others and updates and patches didn't work, despite me setting the appropriate policies for the domain.


Eventually, this morning, I re-built the package as a basic MSI project and everything works fine. This is my point. Microsoft gives the administrator the flexibility to allow or disallow almost any combination of installations, upgrades and patching as non-administrator with the appropriate policy settings and an appropriate package. See the MS knowledge base 227181 (http://support.microsoft.com/default.aspx?scid=kb;en-us;227181&Product=win2000) for details. However as soon as you start introducing an installscript aspect to your project, be it a complete installscript or and installscript MSI project, things get more difficult. I'm not saying it is impossible to get these working, maybe Rich can tell us more about this, but you will run into problems, endless problems if my experience is anything to go by.

So my advice is, if you want a project to be flexible in terms of allowing non-admin users to install, upgrade or patch, stick with a basic MSI project if at all possible. Also, make sure you follow each step in the installshield KB q106556 (http://support.installshield.com/kb/view.asp?articleid=q106556).

RichAquino
11-25-2003, 02:12 PM
Hi All,

It is true that one will need to use MSI (Basic MSI or InstallScript MSI) to allow a non-admin to install with elevated privileges.

InstallScript MSI will work for this, but only in certain parts of the installation. The only part of the MSI that can install with elevated privileges is the execute sequence. So, even in a basic MSI project, you won't be able to run your UISequence actions as an elevated user. Only the execute sequence will work.

In an InstallScript MSI project, this means that the only part of the script that'll work with elevated privileges is the events that are fired between and including OnMoving and OnMoved. Anything before OnMoving or after OnMoved won't run with elevated privileges.

And, I'm pretty sure that this only includes in-process items. If you launched something out of process, I'm pretty sure that it won't run elevated. This would be an argument for using the COM tables (COM extraction makes this easier) for registering your EXE files.

Rich