Hello,
Check if the entered SQL instance name is allready used. I know where to look up in registry, but how can I read a registry value in dialog? Or is there a bettwer way than searching in registry?
This can be done through a registry search. For more information about this, please see the following articles:
-
"Search Page"
-
"Extended Search Properties"
Check if Windows Group Policy is configured that 'passwords must meet the complexity requirements'. If yes, check if the entered password is valid. Is something like that possible?
From what I know, the "Password must meet the complexity requirements" does not have a registry key assigned to it, so checking if that option is enabled can turn out to be pretty troublesome and unfortunately I am not aware of any way in which you can check that. In what regards the password check, I think that it can be done through a PowerShell script. From what I know, the things that you should look after are:
1- the password must contain at least one lower case character (e.g. a-z)
2- the password must contain at least one upper case character (e.g. A-Z)
3- the password must contain at least one numerical character (e.g. 0-9)
4- the password must contain at least one special character (e.g. !@#$%)
5- the password must be at least 8 characters long
Every dialog field has a property assigned to it that stores its value. This applies to the SQL password field from the SQL Dialog as well. The property that stores the password is:
In order to retrieve a property value in a custom action (e.g. PowerShell script), you can use the following line:
Code: Select all
$var = AI_GetMsiProperty PASSWORD_PROP
This way, the $var variable will have the value of the password inserted by the user. For more information about this, you can have a look on the following articles:
-
"Windows Installer Custom Actions"
-
"Custom Actions Page"
-
"Run Inline PowerShell Script"
-
"How to set an installer property using custom actions"
Hope this helps.
All the best,
Catalin
FOLLOW US
Get the latest news in Application Packaging