Skip to content
⌘ NSIS Forum Archive

Use of RunAs Dll in NSIS

3 posts

vighnesh#

Use of RunAs Dll in NSIS

Hello,

I need to install an exe for a normal user by passing admin uid n pwd to method of RunAs Dll. For this there is a plugin available : http://nsis.sourceforge.net/NSIS-RunAs

But I am not able to use the RunAs::RunAsW correctly. Everytime it returns 0. I found 1 - 2 similar examples here on discussion forum but its not useful. Can somebody give working example or any sort of source code?

Thanks.
vighnesh#
Please go through Solution of this problem

Hello,

Finally somehow I managed to found the solution and it does work on VISTA and XP! I am attaching the source code. please check it. To test it, you need RunAs.Dll in the same directory where nsis file is , second replace the adobe flash, shockwave and jre with "$WINDIR\System32\cmd.exe" . This will be the file that you want to run. in actual program i execute 3 exe files. Next replace the values of $1 and $2 with actual administrator id password.

Hope this works and helps to 1000s of others!

Thanks.