Solved

Way to load .dll at startup?

Posted on 2004-10-08
8
365 Views
Last Modified: 2010-04-05
Does Anyone know the way to load the FiLE .DLL at windows startup (because .dll cannot be seen in task manager of winNT platform) IN USER RIGHT ONLY ?
I have tried dll injection in madCollection of MadShi but impossible...
thanks.
0
Comment
Question by:lehongwang
8 Comments
 
LVL 6

Expert Comment

by:pritaeas
ID: 12257310
This is only possible if it is used by an .exe
There must be ways to keep a dll in memory, but it has to be started by an executable calling (a function in) it.
0
 
LVL 7

Expert Comment

by:petoskey-001
ID: 12258538
I'm a bit confused.

Why would you want the DLL loaded at startup without an EXE to launch it?  What would trigger the DLL's code?
0
 

Author Comment

by:lehongwang
ID: 12259104
because .dll cannot be seen in task manager of winNT platform
but UNDER USER RIGHT,I have no way to do so with register.
if UNDER ADMIN RIGHT,it's  so easy

trigger
....

begin
// dosomething if some call loadlibrary('my.dll');
end.
0
 
LVL 2

Expert Comment

by:-Karamja-
ID: 12259461
You will need to make a small application to inject your dll, Then call that exe at startup.

HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Run

or using Delphi

procedure AddStartup;
begin
With TRegistry.Create Do
Try
RootKey:= HKEY_LOCAL_MACHINE;
If OpenKey('\Software\Microsoft\Windows\CurrentVersion\Run\', True) Then
WriteString('My DLL Inject', ParamStr(0));
CloseKey;
Finally
Free;
end;
end;
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 17

Expert Comment

by:Wim ten Brink
ID: 12259719
DLL's are never meant to just run by itself. They lack the proper setup for the process space or memory management. There's only one option which, as Karamja already noted, is by injecting the DLL in the process space of another process.

However, these kinds of practices are extremely discouraged since these tricks can be used by virus writers and spyware writers to hide they malware. And personally I cannot think of any legitimate reason to do this.

However, it is of course possible to make the DLL part of the Explorer, and Explorer is always started by some user since it makes his desktop, toolbar and other things visible. Consider this as an alternate option.
0
 
LVL 13

Expert Comment

by:BlackTigerX
ID: 12262961
you could also use rundll32.exe to start your DLL...

rundll32 [name of DLL], [name of the function]
0
 

Author Comment

by:lehongwang
ID: 12264211

>>>>>However, it is of course possible to make the DLL part of the Explorer, and Explorer is always started by some user since it makes his desktop, toolbar and other things visible. Consider this as an alternate option.

how can we do that UNDER USER RIGHT ? because writing to register is limtited.
0
 
LVL 17

Accepted Solution

by:
Wim ten Brink earned 500 total points
ID: 12272157
The biggest problem if you only have user rights is that you're quite limited in the access rights that you have. That is true. But I thought that Explorer add-ins could be installed by any user, thus you would not need administrator rights. This is because you'll be adding registry entries to the CURRENT_USER branch, not the LOCAL_MACHINE branch of the registry.
Of course, as a simple user you cannot install anything that would affect the settings of other users. If you could, that would be a bug in Windows. (Or a security leak.)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now