This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: How to use Privileged property in Installshield - Suite Installer
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Aug 30, 2017
01:20 AM
How to use Privileged property in Installshield - Suite Installer
Hello Guys,
Can somebody provide a code snippet where it shows how to use "Privileged" property. What value needs to be checked and all?
Currently i am using SuiteGetProperty("Privileged", szAdmin);
Its returning me " "
I dont know how to use this property but i know that this is the property i need to use.
Please help.
thanks
Can somebody provide a code snippet where it shows how to use "Privileged" property. What value needs to be checked and all?
Currently i am using SuiteGetProperty("Privileged", szAdmin);
Its returning me " "
I dont know how to use this property but i know that this is the property i need to use.
Please help.
thanks
(5) Replies
‎Aug 31, 2017
10:01 AM
With SuiteGetProperty you can retrieve "suite properties".
But the "Privileged"-Property I know is a Windows Installer property.
We have to know from where you want to retrieve that value.
i.e. if you are inside an MSI you can just use the property.
regards
Markus
But the "Privileged"-Property I know is a Windows Installer property.
We have to know from where you want to retrieve that value.
i.e. if you are inside an MSI you can just use the property.
regards
Markus
‎Aug 31, 2017
10:18 AM
MarkusLatz wrote:
With SuiteGetProperty you can retrieve "suite properties".
But the "Privileged"-Property I know is a Windows Installer property.
We have to know from where you want to retrieve that value.
i.e. if you are inside an MSI you can just use the property.
regards
Markus
Thanks markus, I want to use this property in Suite installer. Can I do this? Or any alternative is there?
‎Aug 31, 2017
10:34 AM
Privileged is like AdminUser so you could also create an InstallScript action and call: Is(USER_ADMINISTRATOR,"") and set the result to a suite property.
‎Aug 31, 2017
10:38 AM
MarkusLatz wrote:
Privileged is like AdminUser so you could also create an InstallScript action and call: Is(USER_ADMINISTRATOR,"") and set the result to a suite property.
Is(USER_ADMINISTRATOR,"") anyways i am using but its not full proof, as i found and also read in lot of forums that its not capable of finding full admin privileges as compared to Privileged property. Privileged property is the ultimate property for knowing that you have all the privileges or not.
‎Aug 31, 2017
11:13 AM
What I know is from here:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa370852(v=vs.85).aspx
If setting the "Required execution level" to "Administrator" is also not sufficient you can write a custom dll in C/C++ or .NET. There you have access to all APIs from Microsoft ....
What I sometimes use:
public static bool checkElevatedPrivilege() {
WindowsIdentity winIdentity = WindowsIdentity.GetCurrent();
WindowsPrincipal winPrincipal = new WindowsPrincipal(winIdentity);
return winPrincipal.IsInRole(WindowsBuiltInRole.Administrator);
} /* end method */
regards
Markus
https://msdn.microsoft.com/en-us/library/windows/desktop/aa370852(v=vs.85).aspx
If setting the "Required execution level" to "Administrator" is also not sufficient you can write a custom dll in C/C++ or .NET. There you have access to all APIs from Microsoft ....
What I sometimes use:
public static bool checkElevatedPrivilege() {
WindowsIdentity winIdentity = WindowsIdentity.GetCurrent();
WindowsPrincipal winPrincipal = new WindowsPrincipal(winIdentity);
return winPrincipal.IsInRole(WindowsBuiltInRole.Administrator);
} /* end method */
regards
Markus