English
Source / code snippets

Autorun Autostart Remove Hinzufügen Program Regdeletevalue Regopenkeyex

 

Julian
Schmidt

CompileMarkSeparation
Def @Regopenkeyex(5) !"ADVAPI32","RegOpenKeyExA"
var Programm$=Par$((Upper$(DateiName(Par$(0)))="PROFAN.EXE") or (Upper$(DateiName(Par$(0)))="XPROFAN.EXE"))
CLS
Set("ErrorLevel", 0)
Var AutoRun_Name$="Programm"
var autorun&=Create("CheckBox",%hwnd,"Programm mit Windows starten?",10,20,230,20)
case Readini$("HKEY_1","Software\\Microsoft\\Windows\\CurrentVersion\\Run",AutoRun_Name$)<>"" : SetCheck autorun&,1

WhileNot iskey(27)

    waitinput

    If getfocus(autorun&)

        If GetCheck(autorun&)=1'autorun

            Writeini "HKEY_1","Software\\Microsoft\\Windows\\CurrentVersion\\Run",AutoRun_Name$=Programm$'Autostart-Programm eintragen

        else

            DeleteRegEintrag("$80000001","Software\\Microsoft\\Windows\\CurrentVersion\\Run",AutoRun_Name$)'Autostart-Programm entfernen

        Endif

    Endif

Endwhile

Proc DeleteRegEintrag

    Parameters hkey$, schluessel$, name_eintrag$
    Declare Handle#
    Dim Handle#,4
    Declare Key#
    Dim Key#,100
    String Key#,0=schluessel$
    Declare Name#
    Dim Name#,100
    String Name#,0=name_eintrag$
    @Regopenkeyex(hkey$,Key#,0,$2,Handle#)
    External("ADVAPI32","RegDeleteValueA",Long(Handle#,0),Name#)
    External("ADVAPI32","RegCloseKey",Long(Handle#,0))
    Dispose Handle#
    Dispose Key#
    Dispose Name#

ENDPROC

 
XProfan X2
˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
06/23/12  
 



very + almost very calm!

with Stringkonstanten How z.B.: software\Microsoft\windows\CurrentVersion\Run
übersiehst often The Backslashes correctly. To repräsentieren by semidetached-Backslash
simply to prevention of Problemen in reference on Escape-Sequenzen.

software\\Microsoft\\windows\\CurrentVersion\\Run
 
06/25/12  
 




Julian
Schmidt
OK, abgeändert!
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
06/25/12  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

9.357 Views

Untitledvor 0 min.
p.specht11/21/21
R.Schneider11/20/21
Uwe Lang11/20/21
Manfred Barei11/19/21
More...

Themeninformationen

this Topic has 2 subscriber:

Julian Schmidt (2x)
iF (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie