bibi26 Ex-Modérateur
Messages : 4446
| Sujet: Jouer avec la base de registre Sam 30 Juil 2005 - 22:22 | |
| Salut tout le monde (mdr, sa fait une eternite que j'ai pas toucher à game maker)
J'ai une question qui me tricote la tête !
Peut on avec le gml (ou un dll) crée un logiciel qui peut changer certaines informations dans la base de registre de l'utilisateur !
Est-ce possible ? Merci de me répondre !
PS : J'ai mis dans experts mais si ce n'est pas la bonne place vous pouvez le déplacer ! |
|
Bast Administrateur
Messages : 20017 Localisation : Alsace
| Sujet: Re: Jouer avec la base de registre Sam 30 Juil 2005 - 22:32 | |
| Je croit que c'est possible avec une DLL, Dam en possède une qui permet pas mal de choses de ce genre Il faut attendre qu'il rentre, il pourra te donner plus de précisions :-D Mais ce genre de ressource est à utiliser avec modération, et surtout pas pour concevoir des virus _________________ |
|
bibi26 Ex-Modérateur
Messages : 4446
| Sujet: Re: Jouer avec la base de registre Sam 30 Juil 2005 - 22:34 | |
| Oui je sais qu'il faut y ailler modérément ! |
|
CyberTwister Bavard
Messages : 103 Localisation : Chez moi
| Sujet: Re: Jouer avec la base de registre Lun 1 Aoû 2005 - 11:52 | |
| Coucou Ca faisait longtemps que j'etait pas passé Il existe plusieurs methodes permettant de modifier la base de registre : methode 1 :utiliser une dll methode 2 : utiliser le vbs scriptVoici un exemple de script vbs qui utilise la base de registre : il permet de rajouter un texte a coté de l'orloge en bas a droite dans la barre des taches : - Code:
-
Option Explicit On Error Resume Next Dim wsh, box, str
Set wsh = CreateObject("WScript.Shell") str = wsh.RegRead("HKEY_CURRENT_USER\Control Panel\international\s1159") box = InputBox("Entrez le texte à afficher dans la barre des tâches (8 caractères maximum)", "Personnaliser la barre des tâches - Zebulon.fr", str) wsh.RegWrite "HKEY_CURRENT_USER\Control Panel\international\s1159", box, "REG_SZ" wsh.RegWrite "HKEY_CURRENT_USER\Control Panel\international\s2359", box, "REG_SZ" wsh.RegWrite "HKEY_CURRENT_USER\Control Panel\international\sTimeFormat", "HH:mm tt", "REG_SZ" MsgBox ("Votre texte est enregistré. Veuillez relancer l'ordinateur afin que les changements soient validés."), 64, "Opération terminée"
Copie ça dans un fichier texte et enregistre le au format .vbs lance le et c'est bon (il faudra redemarrer le pc pour voir le texte). Pour le lancer depuis game maker, il y a 2 solutions : - joindre ton fichier a l'executable et utiliser execute_shell(...) - creer le fichier vbs depuis game maker... Voici un exemple que j'ai créé qui fait ca : http://gmzone.jexiste.fr/center/VBS_TXT_letter.zipmethode 3 : les fonctions de Game Maker : - Citation :
- registry_write_string(name,str) Creates an entry in the registry with the given name and string value.
registry_write_real(name,x) Creates an entry in the registry with the given name and real value. registry_read_string(name) Returns the string that the given name holds. (The name must exist. otherwise an empty string is returned.) registry_read_real(name) Returns the real that the given name holds. (The name must exist. Otherwise the number 0 is returned.) registry_exists(name) Returns whether the given name exists. Actually, values in the registry are grouped into keys. The above routines all work on values within the key that is especially created for your game. Your program can use this to obtain certain information about the system the game is running on. You can also read values in other keys. You can write them also but be very careful. YOU EASILY DESTROY YOUR SYSTEM this way. (Write is not allowed in secure mode.) Note that keys are again placed in groups. The following routines default work on the group HKEY_CURRENT_USER. But you can change the root group. So, for example, if you want to find out the current temp dir, use path = registry_read_string_ext('\Environment','TEMP'); The following functions exist. registry_write_string_ext(key,name,str) Creates an entry in the key in the registry with the given name and string value. registry_write_real_ext(key,name,x) Creates an entry in the key in the registry with the given name and real value. registry_read_string_ext(key,name) Returns the string that the given name in the indicated key holds. (The name must exist. otherwise an empty string is returned.) registry_read_real_ext(key,name) Returns the real that the given name in the indicated key holds. (The name must exist. Otherwise the number 0 is returned.) registry_exists_ext(key,name) Returns whether the given name exists in the given key. registry_set_root(root) Sets the root for the other routines. Use the following values:
0 = HKEY_CURRENT_USER 1 = HKEY_LOCAL_MACHINE 2 = HKEY_CLASSES_ROOT 3 = HKEY_USERS Voici maintenant un script gml qui te permet de changer le fond d'ecran du pc en utilisant la base de registre : - Code:
-
registry_set_root(0) registry_write_string('Control Panel/desktop/wallpaper ','C:/windows/picture/nouveaubmp.bmp') voila J'espere que ça t'aidera et @+ |
|
bibi26 Ex-Modérateur
Messages : 4446
| Sujet: Re: Jouer avec la base de registre Lun 1 Aoû 2005 - 16:10 | |
| Merci |
|
Warrior Utilisateur confirmé: Rang *
Messages : 168 Projet Actuel : RVA -> Robot Vs All
| Sujet: Re: Jouer avec la base de registre Sam 6 Aoû 2005 - 10:11 | |
| reguarde moi ca :non: si il ve toucher au registre je pense pas que c'est pour faire un jeu mais pour faire chier le monde ! fuck you ! _________________ vive le CBNA
|
|
Bast Administrateur
Messages : 20017 Localisation : Alsace
| Sujet: Re: Jouer avec la base de registre Sam 6 Aoû 2005 - 11:16 | |
| Warrior voyons :oue:
Je ne pense pas que Bibi ai besoin de se créer un virus ou toute autre connerie de ce genre :-D _________________ |
|
bibi26 Ex-Modérateur
Messages : 4446
| Sujet: Re: Jouer avec la base de registre Sam 6 Aoû 2005 - 14:22 | |
| |
|
Contenu sponsorisé
| Sujet: Re: Jouer avec la base de registre | |
| |
|