inno-setuppascalscript

Inno Setup to create a user in Windows


I´m start user in inno Setup, but I need to create an user in Windows with a password that need input during installation.

Like in CheckSerial where is needed input a name, I need someway to cap this name and other field to insert a password.

On DOS I can create a user with:

net user USER PWD /add /fullname:"USER" /comment:"TEST" /expires:never /passwordchg:no

I got it in

[Run]
Filename: net.exe; parameters: "user USER PWD /add /fullname:""USER"" /comment:""TEST"" /expires:never /passwordchg:no"

But I need input name and password of this user. I think it's possible in [Code].


Solution

  • There is a great example on how to get user data from a custom page and use it with {code:FunctionName|Argument} in other sections: https://github.com/jrsoftware/issrc/blob/master/Examples/CodeDlg.iss

    Short overview: