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
- :
- Same issue in MSI project
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 29, 2010
09:51 AM
Create Windows User
We having problems creating a new windows account as part of the install. Here is what we do:
1. InstallScript MSI project type.
2. Included NetApiRT.obl (before isrt.obl) in build/settings.
3. Used the following as part of the script:
Dlg_SdLogon:
nResult = SdLogonUserInformation(szTitle, szMsg, szAccount, szPassword);
if (nResult = BACK) goto Dlg_SdAskDestPath;
OnLogonUserSetMsiProperties();
From what I can see, everything works properly, I can select a user or successfully fill in the information to create a new user. However, the new user doesn't get created.
Even more, further inversigation showed, that during the install process the user DOES get created and than quickly REMOVED again. Which makes me completely puzzled as to why would InstallShield remove the newly created account at the end of the installation...
Please, I need some guidance to allow users to successfully create (and use) a new windows account, belonging to user selected group...
As usual, the documentation is not very helpful, no practical information or working example found.
Thanks in advance
Konstantin
I understand that there are options to create a custom .NET dll, or call an external command line tool, but the IS build-in functionality should work, shouldn't it? Thus, I am really interested in how to get it to work using IS included functionality.
1. InstallScript MSI project type.
2. Included NetApiRT.obl (before isrt.obl) in build/settings.
3. Used the following as part of the script:
Dlg_SdLogon:
nResult = SdLogonUserInformation(szTitle, szMsg, szAccount, szPassword);
if (nResult = BACK) goto Dlg_SdAskDestPath;
OnLogonUserSetMsiProperties();
From what I can see, everything works properly, I can select a user or successfully fill in the information to create a new user. However, the new user doesn't get created.
Even more, further inversigation showed, that during the install process the user DOES get created and than quickly REMOVED again. Which makes me completely puzzled as to why would InstallShield remove the newly created account at the end of the installation...
Please, I need some guidance to allow users to successfully create (and use) a new windows account, belonging to user selected group...
As usual, the documentation is not very helpful, no practical information or working example found.
Thanks in advance
Konstantin
I understand that there are options to create a custom .NET dll, or call an external command line tool, but the IS build-in functionality should work, shouldn't it? Thus, I am really interested in how to get it to work using IS included functionality.
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 22, 2010
04:04 PM
We are experiencing an identical issue in an MSI project using the built-in LogonInformation dialog set. The frustrating thing is that it used to work (in 2010 and earlier versions), so I suspect that something has broken in NetAPI.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 19, 2011
04:30 PM
Did you ever find a way around this?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 20, 2011
02:55 AM
Hello,
we are still using Netapi functions to create user accounts.
It makes us free and we know exactly how it does work.
We are also free to set user information and flags.
Regards
Jan
we are still using Netapi functions to create user accounts.
It makes us free and we know exactly how it does work.
We are also free to set user information and flags.
Regards
Jan
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 21, 2011
07:41 AM
Hi Jan,
Yes, it seems that we also need a custom dialog. Could you kindly advise where to start? I created InstallScript msi and imported the sample dialog script and see all needed NetApi calls there, but not sure how to call that (or similar) dialog from my Setup.rul - the dialog is not declared, and if I declare it, it is not seen from Setup.rul anyway, and that script file is #included. I'm missing something. I worked with custom dialogs before, but never used loaded dlls.
Regards,
Wrun.
Yes, it seems that we also need a custom dialog. Could you kindly advise where to start? I created InstallScript msi and imported the sample dialog script and see all needed NetApi calls there, but not sure how to call that (or similar) dialog from my Setup.rul - the dialog is not declared, and if I declare it, it is not seen from Setup.rul anyway, and that script file is #included. I'm missing something. I worked with custom dialogs before, but never used loaded dlls.
Regards,
Wrun.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 21, 2011
02:07 PM
OK, found my answers here http://community.installshield.com/archive/index.php?t-142448.html
(1) Do not add the...\Script\ISRT\Lib\NetApiRT.obl
...statement in your Build->Settings->Link Libraries field.
(2) Take a copy of "NetApiRT.rul" file and insert it into your project. Make the necessary changes to the SdLogonUserInformation() function so that it doesn't call ISNetApiRT.ISNetValidateLogonName(...) under Win2K. Tip: you could also add a pop-up to confirm the password in Win2K, as it is not validated.
(3) Add #include\"NetApiRT.rul" to "Setup.rul".
(2) Add the #define statement... #define NETAPIRT_OBL to "Setup.rul"
...before your #include "ifx.h" statement and the #include "NetApiRT.rul".
(1) Do not add the...
...statement in your Build->Settings->Link Libraries field.
(2) Take a copy of "NetApiRT.rul" file and insert it into your project. Make the necessary changes to the SdLogonUserInformation() function so that it doesn't call ISNetApiRT.ISNetValidateLogonName(...) under Win2K. Tip: you could also add a pop-up to confirm the password in Win2K, as it is not validated.
(3) Add #include
(2) Add the #define statement... #define NETAPIRT_OBL to "Setup.rul"
...before your #include "ifx.h" statement and the #include "NetApiRT.rul".