I think NSIS is missing a command...
From NSIS Wiki
There are a lot of commands that could have been added into NSIS, but most of them will just make NSIS huge, and no one wants that. You will be surprised what you can do with the NSIS scripting language. Search the forum, and the Wiki, there is a pretty good chance someone has already made what you are looking for.
NSIS can also fire up DLLs to do the job for it. Search the Wiki for such, or try writing your own (have a look at ExDLL in the contrib directory).
If you think the command that is missing should be in NSIS, and it can't possibly be done with NSIS scripting, or it takes 3000 lines of script, post a message in the forum or request a feature.