J'ai exploité la possibilité proposée de fichiers .bat... Ca tourne... encore un mystère de microsoft... Pour les curieux, voici mon code...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 Public Function LoadHive(myuser As String) Dim chemin As String, commande As String chemin = "C:\Documents and Settings\" & myuser & "\ntuser.dat" commande = "reg load hku\mynewhive " & Chr(34) & chemin & Chr(34) Open "c:\mine.bat" For Binary As #2 Put #2, 1, commande Close #2 Shell "c:\mine.bat" Sleep 5000 Kill "c:\mine.bat" End Function
Partager