Autor Beitrag
tempuss
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29

xp, vista
Delphi 7 Personal
BeitragVerfasst: So 27.04.08 02:02 
Hallo Delphi-Freunde!

Nun klappt es unter xp wunderbar, mit gedrückter Shift-Taste Autorun zu unterdrücken.
Dies lässt sich auch gut per Shift-Simulation unter Delphi regeln.

Doch Vista reagiert nicht auf die gedrückte Shift-Taste.
Gibt es eine andere Taste(nkombination) unter Vista, welche Autorun temporär unterdrückt?

Anderenfalls habe ich im Inet folgenden Knowledgebase-Eintrag #500 erspäht:

www.hh-software.com/...wKnowledgebase%7C500

Es war mir aber nicht möglich, damit zum Ziel zu kommen.

Der Wert unter Autorun ist ein DWORD, doch wie ändere ich diesen von Eins auf Null?

Konnte einfach nicht fündig werden.

PLEASE Help me! :!:

Gruß Uli


Moderiert von user profile iconNarses: Topic aus Sonstiges (Delphi) verschoben am So 27.04.2008 um 23:09
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: So 27.04.08 23:12 
Moin!

user profile icontempuss hat folgendes geschrieben:
Der Wert unter Autorun ist ein DWORD, doch wie ändere ich diesen von Eins auf Null?
Suche in: Delphi-Forum, Delphi-Library REGISTRY DWORD SCHREIBEN

user profile icontempuss hat folgendes geschrieben:
Konnte einfach nicht fündig werden.
Du meinst also, du hast keinen c&p-fähigen Code finden können... ? :zwinker:

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
<TargeT>
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 59

Win XP, Win 98
Delphi 7
BeitragVerfasst: Mo 28.04.08 20:45 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
Uses Registry;

procedure TForm1.Button1Click(Sender: TObject);
var
 REG :TRegistry;
begin
 try
  REG:= TRegistry.Create;
  REG.RootKey:= HKEY_LOCAL_MACHINE;
  REG.OpenKey('\System\CurrentControlSet\Services\CDRom\', true);
  REG.WriteBool('AutoRun', false); // false = 0, true = 1
  REG.CloseKey;
 finally
  REG.Free;
 end;
end;
end.


Damit sollte es klappen.....

lg Target
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 28.04.08 21:56 
Moin!

user profile icon<TargeT> hat folgendes geschrieben:
Damit sollte es klappen.....
Großartig! :zustimm:

Schreibst du mir auch c&p-Code, wenn ich ganz lieb "Bitte, bitte" sage und zu faul zum Lesen bin... :roll:

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
<TargeT>
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 59

Win XP, Win 98
Delphi 7
BeitragVerfasst: Mo 28.04.08 22:34 
Zitat:

Großartig! :zustimm:

Schreibst du mir auch c&p-Code, wenn ich ganz lieb "Bitte, bitte" sage und zu faul zum Lesen bin... :roll:


Soll ich es wieder weg Editieren?^^
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 28.04.08 22:50 
Moin!

user profile icon<TargeT> hat folgendes geschrieben:
Soll ich es wieder weg Editieren?^^
Nein, gar nicht erst schreiben wäre die Lösung gewesen... :|

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
tempuss Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29

xp, vista
Delphi 7 Personal
BeitragVerfasst: Mo 28.04.08 23:58 
Hallo TargeT,

jau, das war's!
Ist schon irre, eine DWord-Var zu nehmen und dann nur auf ja/nein zu prüfen.
Aber das gibt es ja überall in der Registry.

Danke Dir VIELMALS!!!

Gruß Uli
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Di 29.04.08 08:20 
Moin!

user profile icontempuss hat folgendes geschrieben:
Ist schon irre, eine DWord-Var zu nehmen und dann nur auf ja/nein zu prüfen.
Das ist ja auch ein Spezialfall, für DWORD nimmt man normalerweise wohl .WriteInteger/.ReadInteger, aber das hätte dir der 4. Link aus meiner Suche auch verraten - wenn du nicht zu faul gewesen wärest, das mal durchzugehen... :?

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.