cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
zhangweisjz
Level 3

Install for all users

Hi Everyone,
I am facing a difficulty and need your help. Here it is:
Using a administrator account I ran command Setup.exe /v"ALLUSERS=1" to install my product for all users, then I logged off and logged in as a normal user, I did see short cuts on the desktop. However, when I tried to run them, it asked me to find the temporary MSI to finish the install, and because this is a normal user account, I could not access administrator's directory where the temporary msi stays - c:\documents and settings\ABC\Local Settings\Temp. (Admin account is ABC)
I am using InstallShield to make my installer. Please help me how to do with this problem. Thank you very much!
Labels (1)
0 Kudos

(6) Replies
Christopher_Pai
Level 16

Per machine installs can still have Per user components. When another user logs in the component is missing for that user so the component needs to be reinstalled. If you take a look at the event log you'll see the Component Id that's involved.
0 Kudos
zhangweisjz
Level 3

Thank you Chris.
The thing is, when the normal user go direct to the folder, and run the application, the application started very well. But when that user click the desktop icon, as I have described, it will prompt to install from C:\documents and settings\ABC\Temp\{???-????.....}

I am new to installshield, I searched a lot about this -

I think we could do: 1, change the folder setup.exe put temporary msi, to a public folder, C:\Windows\Installers, but I don't know how.
2, I don't know the shortcut behavior is Advertised icon, maybe I should use a non-advertised icon, but I don't know how.

If I had a choice, I would prefer the first solution.
Could you please help?
0 Kudos
azad_khan
Level 4

Hi,

You can use the below code for giving permission to everyone

function UserPermission(hMSI)
string GrantPermission;
begin
GrantPermission = "ECHO Y| CACLS \""+ConFYFolder+"\" /T /G Everyone:F";
LaunchAppAndWait ("CMD.exe","/c"+""+GrantPermission,WAIT|LAAW_OPTION_HIDDEN);
end;

Call the above function in Custom action.

If still it is not working then check in the release wizard for cache option.

Hope you may get some help from this..
0 Kudos
Christopher_Pai
Level 16

The adevertised shortcut serves as the mechanism to tell MSI to check for missing components. It's not the root cause. Disabling the advertised shortcut ( it's just a property of the shortcut ) will possibly workaround the problem for now but you may eventually find other paths that cause the repair. ( COM activation for example ).

Look at the event log ( application log ) to find the problematic feature / component and see what the key of that component is and see if you can't get rid of it.

This isn't a permissions problem so the above IntallScript hack would only make things worse in several ways.
0 Kudos
zhangweisjz
Level 3

Thank you very much, every one.
I solved this by using 1) cache msi to a public folder 2) using run-time path to execute msi

Hope that one day I could help you in return. 🙂
0 Kudos
Christopher_Pai
Level 16

If you granted everyone full control to the MSI like the previous poster stated, what you have really done is punch a hole in security.

Windows Installer has the concept of a managed/elevated installation. By installing for All Users or by advertising for all users ( /jm ) you've told windows that the package in that location is trusted. Now all an unprivilged user has to do is tamper with that package and do a reinstall and his code will execute with elevated privs.
0 Kudos