dinesh_redhawk
Pilgrim
- Mark as New
- Subscribe
- Mute
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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
MarkusLatz
Frequent contributor
- Mark as New
- Subscribe
- Mute
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎Aug 31, 2017
10:01 AM
Re: How to use Privileged property in Installshield - Suite Installer
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
dinesh_redhawk
Pilgrim
- Mark as New
- Subscribe
- Mute
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎Aug 31, 2017
10:18 AM
Re: How to use Privileged property in Installshield - Suite Installer
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?
MarkusLatz
Frequent contributor
- Mark as New
- Subscribe
- Mute
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎Aug 31, 2017
10:34 AM
Re: How to use Privileged property in Installshield - Suite Installer
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.
dinesh_redhawk
Pilgrim
- Mark as New
- Subscribe
- Mute
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎Aug 31, 2017
10:38 AM
Re: How to use Privileged property in Installshield - Suite Installer
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.
MarkusLatz
Frequent contributor
- Mark as New
- Subscribe
- Mute
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎Aug 31, 2017
11:13 AM
Re: How to use Privileged property in Installshield - Suite Installer
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