Old 2nd October 2009, 18:24   #1
Junior Member
Join Date: Oct 2009
Posts: 2
Use of RunAs Dll in NSIS


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?

vighnesh is offline   Reply With Quote
Old 11th October 2009, 08:58   #2
Junior Member
Join Date: Oct 2009
Posts: 2
Please go through Solution of this problem


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!

Attached Files
File Type: nsi nsisscript2.nsi (5.5 KB, 401 views)
vighnesh is offline   Reply With Quote
Old 6th August 2010, 16:27   #3
Join Date: Apr 2006
Location: Somewhere in Germany
Posts: 81
Thanks, this helped me alot!
dbach is offline   Reply With Quote
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump