Solved

launching applications via registry

Posted on 2000-04-14
32
201 Views
Last Modified: 2010-04-04
i think there are several paths where i can put keys of my application in the registry, that it will launch automatically when the win start screen appears.
where are these ???
0
Comment
Question by:geoka
  • 12
  • 5
  • 4
  • +5
32 Comments
 
LVL 10

Expert Comment

by:Lischke
Comment Utility
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

Ciao, Mike
0
 
LVL 6

Expert Comment

by:Jaymol
Comment Utility
Don't for get....

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

if you don't want all users to get it.

John.

(RunOnce if you only want it to run once!)
0
 

Author Comment

by:geoka
Comment Utility
thx, but i think there are 7 possibilities, can you give me any others, because that shouldn't be an coulloqual reg-adress, which erverybody knows.
 it should be hard to find. altough thx for the coment, i'll give you the points if nobody can give me any other position.
by the way: how do i use this key, what should the name and the content of the key i create in the app be.
0
 

Author Comment

by:geoka
Comment Utility
thx, but i think there are 7 possibilities, can you give me any others, because that shouldn't be an coulloqual reg-adress, which erverybody knows.
 it should be hard to find. altough thx for the coment, i'll give you the points if nobody can give me any other position.
by the way: how do i use this key, what should the name and the content of the key i create in the app be.
0
 

Author Comment

by:geoka
Comment Utility
uuuh, why is this comment posted 2 times ??
0
 
LVL 10

Expert Comment

by:Lischke
Comment Utility
The key entry is very easy. Just create a string key and set its value to the application you want to start (full path).

I don't know where you get your idea there are 7 pathes. What we listed here (including the RunOnce key) are the only ones. Additionally, you shouldn't need to hide the start of your application unless there's something dishonest to hide...

Ciao, Mike
0
 
LVL 10

Expert Comment

by:Lischke
Comment Utility
geoka, your last comment is posted twice because you refreshed the page with your browser after you sent your comment, which means to resend the comment again. There's a link in the upper right corner lableled "Reload Question".

Ciao, Mike
0
 
LVL 4

Expert Comment

by:Radler
Comment Utility
Like is a obsolete way, let's g

Open your Win.ini
[win]
run="your app path"
or
load="you app path"


T++, Radler.
0
 
LVL 6

Accepted Solution

by:
Jaymol earned 70 total points
Comment Utility
I don't know if you need this level of help, and I'm sorry to seem patronising if you don't, but here you go anyway.....

Var
  WinReg : TRegistry;
Begin
  WinReg:=TRegistry.Create;
  WinReg.RootKey:=HKEY_LOCAL_MACHINE
  WinReg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Run', False);
  WinReg.WriteString('ThisWillRun', 'notepad.exe');
  WinReg.Free;
end;

That would create a Registry entry that runs notepad every time you run Windows.  The 'ThisWillRun' bit is something that you just call it so you know what it is in the Registry (if you ever look at the registry!)

Hope this helps.

John.
0
 
LVL 6

Expert Comment

by:Jaymol
Comment Utility
Doh!!!  To do the above, you need to put Registry in the Uses clause.

John.
0
 
LVL 1

Expert Comment

by:flooder
Comment Utility
As far as I am aware there is not any hiden places from which to run applications in the registry. If you want that kind of security you should consider NT which can be set so users cant run regedit
Gerhardus

PS If you have enterprise edition you can also make/create services for NT which can be started under the \\currentversion\runservices
0
 
LVL 17

Expert Comment

by:geobul
Comment Utility
Hi,
Like 'run' key there are :
- RunEx
- RunOnce
- RunOnceEx
- RunServices
- RunServicesOnce
- RunServicesOnceEx.
You need 'Run' or 'RunServices' only.
If a key does not exist on the registry, your program can create it.
If you want the program to be launched before windows login procedure you have to use 'RunServices' instead of 'Run'.

Regards, Geo
0
 

Expert Comment

by:Psylord
Comment Utility
Sounds like a Trojan/Virus to me. :)
0
 

Author Comment

by:geoka
Comment Utility
okay guys, thx for all you help.
i think i read it in a very serious magazin that there are 7 ways to launch your app vai registry. whatever.
psylord ist pretty good in guessing.
i'm writting a trojan for my school, that contains all nasty funktions like switching the screen off, cutting the area of the mousemovement,....
it's only written for nerving other people and of course to communicate with them without recognition of the teacher.
okay, so far to that.

does it really work to write keys into the win.ini so that the will be proceded, i mean, isn't the win.ini replaced by the registry ? (win 98)

i gonna have a go. thx.
by the way: can you think about other nasty funktions ???

yours,
geoka
0
 
LVL 1

Expert Comment

by:flooder
Comment Utility
All windows ini files is only for backwards compatibility. ini sucks

how about disabling ctrl+alt+del
and hiding your app so it can be seen if you press ctrl+alt+del
0
 

Author Comment

by:geoka
Comment Utility
my app is completely hidden, i suppose.
i once read a code how to disable ctrl+alt+entf but i lost it. may you post it for me ?

for all: look at my second question "nasty functions" also in the delphi topic area.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 1

Expert Comment

by:flooder
Comment Utility
geoka:
I see if I can find the code
I also once so it.
:)

Groete
Gerhardus
0
 
LVL 1

Expert Comment

by:sageryd
Comment Utility
<===================================>
From: flooder
 Date: Friday, April 14 2000 - 03:56PM CEST  
....If you want that kind of security you should consider NT which can be set so users cant run regedit
Gerhardus  
<===================================>

There are ways to prevent users from accessing the registry in win9x too:

HKEY_Current_User\Software\Microsoft\CurrentVersion\Policies

Add a DWORD-value named "DisableRegistryTools", containing the value "1".

Tada! Registry can't be accessed. But be sure to be able to restore this from your program, otherwise it will be hard exploring the registry afterwards!

--johan
0
 
LVL 1

Expert Comment

by:sageryd
Comment Utility
..forgot to mention, you need a reboot before your changes take effect.

--johan
0
 

Author Comment

by:geoka
Comment Utility
thx, but i don't think that i can implement that "anti- registry accessing" function, because that could make pretty much troubles for me, if the the teacher couldn't access the registry. i mean, i would have a good love, but if they ever find out who had done this, they will not leave me where i am now.
0
 
LVL 1

Expert Comment

by:sageryd
Comment Utility
Thought so, I was just mentioning that it is possible to do so. What kind of program is it you are making?

--johan
0
 

Author Comment

by:geoka
Comment Utility
look at my command above
0
 
LVL 1

Expert Comment

by:sageryd
Comment Utility
Trojan huh? Why?
0
 
LVL 4

Expert Comment

by:Radler
Comment Utility
Hi geoka,

My intent is help you, but ...
The code to hide your app
{$IFNDEF WINNT}
//Registra um aplicativo como servico do Windows 95( NAO DISPONIVEL NO WINDOWS NT )
function RegisterServiceProcess(dwProcessID, dwType: Integer): Integer; stdcall; external 'KERNEL32.DLL';
{$ENDIF}

At the begining of your app call
RegisterServiceProcess(0,1);
to unhide
RegisterServiceProcess( 0, 0 );
0
 

Author Comment

by:geoka
Comment Utility
hi radler, that means that services are only available in nt ??

to sageryd: it's not a trojan for all people, it's optimized spzially to our school network, it wouldn't work at other places because all computers must register at the ms network with names definded in the programm, so you couldn't ever use this "tool" outside our school.
why? at first i wrote a tool, which only was able to let all users communicate, send msgs. i thought it would be funny if you could nerve other people a bit, and nobody knows who it was. i'll implement rather all nasty functions into the programm, but only the ones who know how to call them, will get the results on their own risk.
0
 
LVL 1

Expert Comment

by:sageryd
Comment Utility
ok...I sure wouldn't appreciate getting my computer rebooted or something while working on some important school project!

--johan
0
 

Author Comment

by:geoka
Comment Utility
no, of cours I wouldn't do that.
0
 
LVL 4

Expert Comment

by:Radler
Comment Utility
No geoka "{$IFNDEF...} = "if NOT Defined". RegisterServiceProcess is not avaible in NT.

T++, Radler.
0
 

Author Comment

by:geoka
Comment Utility
oh, i see. what are the advantages  of registering the programm as a process ??
0
 
LVL 4

Expert Comment

by:Radler
Comment Utility
Your program don't appear at the task list if your Mainform is invisible.

T++, Radler.
0
 

Author Comment

by:geoka
Comment Utility
that wasn't already the question, but of course thx too
0
 

Author Comment

by:geoka
Comment Utility
that was the most detailed answer
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

762 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

6 Experts available now in Live!

Get 1:1 Help Now