Old 2nd October 2009, 17:24   #1
vighnesh
Junior Member
 
Join Date: Oct 2009
Posts: 2
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 is offline   Reply With Quote
Old 11th October 2009, 07:58   #2
vighnesh
Junior Member
 
Join Date: Oct 2009
Posts: 2
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.
Attached Files
File Type: nsi nsisscript2.nsi (5.5 KB, 395 views)
vighnesh is offline   Reply With Quote
Old 6th August 2010, 15:27   #3
dbach
Member
 
Join Date: Apr 2006
Location: Somewhere in Germany
Posts: 81
Thanks, this helped me alot!
dbach is offline   Reply With Quote
Reply
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