?
Solved

Way to load .dll at startup?

Posted on 2004-10-08
8
Medium Priority
?
381 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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
 
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 1500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month15 days, 2 hours left to enroll

771 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