ACTIVER LE NUMLOCK AU DÉMARRAGE

Nargzul Messages postés 438 Date d'inscription vendredi 9 mai 2003 Statut Membre Dernière intervention 26 juillet 2007 - 17 juil. 2003 à 10:17
Groumphy Messages postés 17 Date d'inscription mercredi 24 mars 2004 Statut Membre Dernière intervention 7 mai 2004 - 29 mars 2004 à 20:20
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.

https://codes-sources.commentcamarche.net/source/7940-activer-le-numlock-au-demarrage

Groumphy Messages postés 17 Date d'inscription mercredi 24 mars 2004 Statut Membre Dernière intervention 7 mai 2004
29 mars 2004 à 20:20
Peut-être plus simple d'emplois :

' Code libre de source
WScript.Echo "En activant le script suivant vous êtes conscient des risques pris."
MsgBienvenue = "Reg v1 - Modification de la base de registre."
TitreBienvenue = "Digital-Nation : [Script de Configuration]"
Call MsgAccueil()
MsgAttnTxt = "Compatibilité unique vers Windows NT4 / 2000 / Xp."
TitreAttn = "Digital-Nation : [Attention]"
Call MsgAttn()
Dim WSHShell
Set WSHShell = WScript.CreateObject("WScript.Shell")
Dim theValue
Dim theConf
theValue InputBox("Entrer la valeur de la clé [A actif - N = Non actif] :")
If theValue = "" then
theConf = "0"
ElseIf theValue = "N" then
theConf = "0"
ElseIf theValue = "A" then
theConf = "2"
Else
WScript.Echo "Valeur non correcte. Abandon de la procédure. --[(c) by Groumphy]--"
WScript.Quit
End if
WSHShell.Popup "Modification de la clé : InitialKeyboardIndicators"
WSHShell.RegWrite "HKEY_USERS\.DEFAULT\Control Panel\Keyboard\InitialKeyboardIndicators", theConf

' *****************
' * End of Script *
' *****************
WScript.Echo "Modification de la base de registre effectuée. -- [(c) by Groumphy] --"
' ***********
' * Accueil *
' ***********
Sub MsgAccueil()
Dim MsgXt
MsgXt = MsgBox(MsgBienvenue, vbOKCancel + vbInformation, TitreBienvenue )
If MsgXt = vbCancel Then
WScript.Quit
End If
End Sub
Sub MsgAttn()
Dim MsgAt
MsgAt = MsgBox(MsgAttnTxt, vbOKCancel + vbInformation, TitreAttn)
If MsgAt = vbCancel then
WScript.Quit
End If
End Sub

... ??? ... A vous de voir.
nephix2003 Messages postés 84 Date d'inscription mercredi 4 juin 2003 Statut Membre Dernière intervention 6 novembre 2004
19 juil. 2003 à 02:20
je te dirai ça au prochain reboot ;-)
mathieumg Messages postés 558 Date d'inscription mardi 4 février 2003 Statut Membre Dernière intervention 18 février 2006
18 juil. 2003 à 03:22
Pas testé mais tu pourrais le mettre direct pour les non-inscrits ;)

Merci

Mathieu M-G
http://www.maxicom.ca.tc
Nargzul Messages postés 438 Date d'inscription vendredi 9 mai 2003 Statut Membre Dernière intervention 26 juillet 2007 4
17 juil. 2003 à 10:17
bon je sais, ya rien à commenter, mais si vous pouviez seulement dire si il marche...
Rejoignez-nous