My current problem is that I need to create new users with password that never expire. In order to do that, I use the "net user" command line, but it does not allow to specify that the password never expires.
To do this last point, I use WMI, through the WMIC command line tool (installed with WinXP).
The strange thing is: if I do it from a DOS command line window, it works great.
If I do the exact same thing from a NSIS installer, it returns a "Win32 Error: Access is Denied"
The code:
nsExec::ExecToLog 'net user NewUser "newpwd" /add /passwordreq:no /passwordchg:no /expires:never' $0
; ensure the password will never expire
nsExec::ExecToLog 'wmic useraccount where name="NewUser" set passwordexpires=false' Anyone has any idea why that happens?Cheers,
Wabiloo