Les subs (mot clef: SUB) et les functions (mot clef: FUNCTION)
La différence entre un sub et une function
Le sub (sous programme) ne retourne pas de valeur
La function (fonction) retourne une valeur, un ensemble de valeur identique (array) ou une structure de valeurs
À l'intérieur de la function, cette valeur est contenue dans une variable qui a le même nom que la function
Quand la valeur est retournée au sub qui l'a appelée, elle est injectée dans la variable qui a servi à appeler la function
Exemple:
sub programmeprincipal
'=== ici on apelle la function "calculatethis" en lui envoyant deux valeur à calculer
valeur01 = calculatethis(5,20)
msgbox(valeur01)
end sub
function calculatethis(valeur10, valeur20)
'=== calculatethis est la valeur retournée au sub car elle a le même nom que la function
calculatethis = valeur10 + valeur20
end function
Le programme principal est toujours un sub (de préférence)
Le sub apparait dans la liste des programme macros à exécuter si dans excel, on appuie ALT F8
Le function n'apparait pas, car ce sont les sub qui utilisent les functions, pas l'utilisateur humain
Donc faire des function pour tous les traitements à faire que l'usager n'a pas besoin de faire directement est une bonne méthode pour garder le menu ALT F8 "propre" (dans excel vba)
Excel traite séquentiellement les instructions du sub, et quand il atteint end sub, il a terminé
Il ne va pas traiter la function, parce qu'il sait que celle-ci sera appelé par le sub
Les instruments de base de la programmation sont bien sûr les variables (algèbre), mais aussi variables en tableau (array) et les boucles
Le tableau 1 dimension est un groupe de variables séquentiel
Exemple:
sub programmeprincipal
'=== array01 est un groupe de valeurs qui contient deux valeurs
array01 = array(5, 20)
valeur01 = calculatethis(array01)
msgbox(valeur01)
end sub
function calculatethis(array10)
for each element01 in array10
calculatethis= calculatethis+ element01
next
end function
"For each" va boucler jusqu'à ce que chaque valeur dans le tableau ait été traitée
Chaque valeur sera déposée dans "element01" à chaque itération de la boucle
La boucle se répétera tant qu'il y a des valeurs dans "array10"
Thursday, December 18, 2014
Sunday, December 14, 2014
Programmation, les variables d'algèbre
Maintenant que l'on sait comment les chiffres sont représentés dans un ordinateur, il faut les emmagasiner dans la mémoire et les utiliser afin de faire des calculs
Pour cela on va commencer par programmer du VBA (visual basic for application) dans excel
Pourquoi dans excel?
Programmer hors de excel nous ferais perdre beaucoup de temps à faire un HMI (homme to machine interface)
Ainsi, notre code en VBS (script windows éditable dans notepad) serait bien beau et gentil, mais afficherais seulement une boîte grise avec nos résultats de calculs dedans
Avec excel, on peut afficher des résultats dans la feuille au lieu d'une simple boîte grise laide
Ouvrez Excel, créez une nouvelle feuille (.XLS ou .XLSM) et appuyez ALT F11 afin d'entrer dans l'éditeur de VBA
Il est important que votre feuille excel soit de type XLSM, car le M veut dire macro, et les macros sont programmées en VBA
Ainsi, un fichier .XLSX ne contient aucun code de macro, ce qui le rend moins vulnérable aux virus qui peuvent se cacher dans une macro
Donc: nouveau fichier excel, XLS ou XLSM, ALT F11 pour ouvrir l'éditeur de macros
Excel emmagasine ses macro dans plusieurs endroits
Dans la feuille ou dans un module
Si une macro est dans la feuille, elle peut être reliée à une événement, comme l'ouverture de la feuille, la sauvegarde, la fermeture, etc.
Pour le moment on veut juste créer un nouveau module et on l'exécutera manuellement avec ALT F8 (fenêtre d'exécution des macros)
Nouveau classeur, sauvegardé en XLSM
ALT F11, insérer un nouveau module
Code à taper dans la fenêtre de droite:
Les bases du code
Il existe des SUB, ou sous programmes et des FUNCTION, ou fonctions
On doit en indiquer le début et la fin par des mots clef, tel que SUB ou FUNCTION, END SUB et END FUNCTION
Chaque sub ou function a un nom unique, ici on l'a appelé TEST
Mettre des tabulations devant votre code est très important (pour la clarté)
Ainsi, le premier niveau de tabulation indique qu'on est dans une fonction ou un sous programme
(il existe des commandes en dehors de sub on function)
Une variable est souvent utilisé pour contenir un résultat de calcul ou un message
Ici, on a déposé dans la variable MES01 (message numéro 01), le contenu "salut"
Ensuite on utilise la commande MSGBOX (message box) pour afficher le message
Les variables, ont les a apprises à l'école primaire:
Si a est égal à 5 et b est égal à 12, combien fait a + b? disait le professeur
En VBA, ce professeur serait remplacé par:
----- début code VBA -----
sub professeur
a = 5
b = 12
msgbox(a+b)
end sub
----- fin code -----
Faisons rouler notre premier programme
Sélectionnez le code du sub professeur:
Faites CTRL C
Allez dans le fenêtre du module1 de excel (ALT F11)
et faites coller (CTRL V)
Appuyez ensuite le bouton play (icône vert en forme de bouton play)
Si vous ne trouvez pas le boutons play, cela signifie que les zombies ont attaqué et que vous êtes présentement la génération d'humains suivante, vous habitez sans doute dans une caverne et vous n'avez jamais vu à quoi ressemble un bouton play... Cette formation ne s'adresse pas à vous, car la batterie du portable que vous avez trouvé dans une ruine sera bientôt épuisée. Allez chasser pour vous nourrir et ne faite pas de bruits pour ne pas attirer les zombies...
Résultat après avoir appuyé PLAY:
Alors, on se rappelle son algèbre de troisième année d'école maintenant?
Pour cela on va commencer par programmer du VBA (visual basic for application) dans excel
Pourquoi dans excel?
Programmer hors de excel nous ferais perdre beaucoup de temps à faire un HMI (homme to machine interface)
Ainsi, notre code en VBS (script windows éditable dans notepad) serait bien beau et gentil, mais afficherais seulement une boîte grise avec nos résultats de calculs dedans
Avec excel, on peut afficher des résultats dans la feuille au lieu d'une simple boîte grise laide
Ouvrez Excel, créez une nouvelle feuille (.XLS ou .XLSM) et appuyez ALT F11 afin d'entrer dans l'éditeur de VBA
Il est important que votre feuille excel soit de type XLSM, car le M veut dire macro, et les macros sont programmées en VBA
Ainsi, un fichier .XLSX ne contient aucun code de macro, ce qui le rend moins vulnérable aux virus qui peuvent se cacher dans une macro
Donc: nouveau fichier excel, XLS ou XLSM, ALT F11 pour ouvrir l'éditeur de macros
Excel emmagasine ses macro dans plusieurs endroits
Dans la feuille ou dans un module
Si une macro est dans la feuille, elle peut être reliée à une événement, comme l'ouverture de la feuille, la sauvegarde, la fermeture, etc.
Pour le moment on veut juste créer un nouveau module et on l'exécutera manuellement avec ALT F8 (fenêtre d'exécution des macros)
Nouveau classeur, sauvegardé en XLSM
ALT F11, insérer un nouveau module
Code à taper dans la fenêtre de droite:
Les bases du code
Il existe des SUB, ou sous programmes et des FUNCTION, ou fonctions
On doit en indiquer le début et la fin par des mots clef, tel que SUB ou FUNCTION, END SUB et END FUNCTION
Chaque sub ou function a un nom unique, ici on l'a appelé TEST
Mettre des tabulations devant votre code est très important (pour la clarté)
Ainsi, le premier niveau de tabulation indique qu'on est dans une fonction ou un sous programme
(il existe des commandes en dehors de sub on function)
Une variable est souvent utilisé pour contenir un résultat de calcul ou un message
Ici, on a déposé dans la variable MES01 (message numéro 01), le contenu "salut"
Ensuite on utilise la commande MSGBOX (message box) pour afficher le message
Les variables, ont les a apprises à l'école primaire:
Si a est égal à 5 et b est égal à 12, combien fait a + b? disait le professeur
En VBA, ce professeur serait remplacé par:
----- début code VBA -----
sub professeur
a = 5
b = 12
msgbox(a+b)
end sub
----- fin code -----
Faisons rouler notre premier programme
Sélectionnez le code du sub professeur:
Faites CTRL C
Allez dans le fenêtre du module1 de excel (ALT F11)
et faites coller (CTRL V)
Appuyez ensuite le bouton play (icône vert en forme de bouton play)
Si vous ne trouvez pas le boutons play, cela signifie que les zombies ont attaqué et que vous êtes présentement la génération d'humains suivante, vous habitez sans doute dans une caverne et vous n'avez jamais vu à quoi ressemble un bouton play... Cette formation ne s'adresse pas à vous, car la batterie du portable que vous avez trouvé dans une ruine sera bientôt épuisée. Allez chasser pour vous nourrir et ne faite pas de bruits pour ne pas attirer les zombies...
Résultat après avoir appuyé PLAY:
Alors, on se rappelle son algèbre de troisième année d'école maintenant?
Tuesday, December 9, 2014
Programmation, le binaire, la base 2, les octets et la base 16 (hexadécimale)
Un de mes amis est en train d'apprendre à programmer alors voici un petit cours
Une mémoire d'ordinateur transistors dans lesquels le courant passe ou ne passe pas
On appelle cette mémoire des BITS
Un bit peut contenir 0 (le courant ne passe pas) ou 1 (le courant passe)
Chaque bit contient la possibilité mathématique qu'il représente
1 bit peut contenir 2 possibilités: 0 ou 1
2 bits peuvent contenir 4 possibilités:
00 = possibilité 0
01 = possibilité 1
10 = possibilité 2
11 = possibilité 3
3 bits peuvent contenir 8 possibilités:
000 = 0
001 = 1
010 = 2
011 = 3
100 = 4
101 = 5
110 = 6
111 = 7
On réalise rapidement que:
le bit 0 représente les unités (multiple de 1)
le bit 1 représente les 2aines (multiple de 2)
le bit 3 représente les 4 aines (multiples de 4)
Exemple:
bits:
2----------1----------0
4aines----2aines----unités
101 = 1 x 4 + 0 x 2 + 1 x 1 = chiffre 5
Calcul binaire avec les unités de 2:
8 bits ensembles sont un octet (byte en anglais)
Un ordinateur qui a un processeur 8 bits va grouper ses bits par 8 (et aussi souvent, les transmettre 8 à la fois vers la carte vidéo, la mémoire ou le disque dur)
Pour calculer plus rapidement un octet on utilise la base 16, aussi appelé base hexadécimale
On divise l'octet en 2 parties:
16aines - unités
0000 0000
On peut donc avoir 0 à 15 unités et 0 à 15 16aines
Donc chaque groupe de 0000 (quatre bits) est un chiffre de 0 à 15
Sur 4 bits, il y a 16 agencements possibles (on compte le 0)
Voici leur représentation binaire, décimale, et hexadécimale:
(note: devant un chiffre hexadécimal, on met un signe de dollar $ pour les différencier des décimales)
0000 = 0 = $0
0001 = 1 = $1
0010 = 2 = $2
0011 = 3 = $3
0100 = 4 = $4
0101 = 5 = $5
0110 = 6 = $6
0111 = 7 = $7
1000 = 8 = $8
1001 = 9 = $9
1010 = 10 = $A
1011 = 11 = $B
1100 = 12 = $C
1101 = 13 = $D
1110 = 14 = $E
1111 = 15 = $F
Donc si on calcule un peux en base 16 (hexadécimale):
0011 0100 = $34 le 3 représente les 16aines et le 4 les unités
Donc, 3 x 16 (3 16aines) + 4 (unités) = 52
Dans 1 octet (8bits) on peut mettre une valeur de 0 à 255 et pour plus de facilité la représenter en hexadécimal:
1111 1111 = 255 = $FF
0111 1111 = 254 = $7F
...
0000 0011 = 3 = $03
0000 0010 = 2 = $02
0000 0001 = 1 = $01
0000 0000 = 0 = $00
Soit 256 valeurs différentes si on compte le 0
Utilité pratique du calcul binaire et hexadécimal
Chaque bit peu représenter un pixel sur un écran graphique
Avec 8 octets, agencés verticalement dans la mémoire qui est représentée à l'écran, on a dessiné les premier caractères:
00111100 = $3C
01000010 = $42
01000010 = $42
01111110 = $7E
01000010 = $42
01000010 = $42
01000010 = $42
00000000 = $00
(on utilise même plus la base décimale, car elle est maintenant démodée)
Si on regarde bien cela représente un A, avec une ligne de pixels vide en base pour laisse un espacement entre chaque ligne dans l'écran
Peu à peu les lettre ont évolués et ont été incluse dans la mémoire du BIOS déjà toutes dessinées (on a pas à les dessiner chaque fois)
Ainsi, le code 65, qu'on appelle code ASCII, représente un A majuscule
66 un B, etc. jusqu'à Z
32, un espace
8 une tabulation
13 un retour de chariot
10 un changement de ligne
92 un backslash --> \
Si on va plus loin dans la base 2 on peut grouper les octets au lieu de grouper les bits
Donc on fait un groupe de deux octets
0000 0000 0000 0000 ou $0000 en hexa
L'octet de droite est celui qu'on appelle de poids faible, car il contient les unités
L'octet de gauche, celui de poids fort, car il contient les 256 aines
Ainsi,en hexadécimal (base 16), $0101 représente 1 x 256 + 1 = 257
Le groupement de 2 octets est un integer
Si on fais la calcul rapidement, un integer (16 bits, 2 octets) va pouvoir contenir 255 x 256 + 255 x 1, soit un chiffre de 0 à 65535
Un groupement de 4 octets, $00000000 est un long integer
Maintenant on sais compter en base 2, et en base 16, représentée en hexadécimal pour plus de facilité de lecture :)
Vous pouvez maintenant comprendre cette phrase:
Comprendre le binaire vous aidera aussi à comprendre les réseaux d'adresses IP
Une mémoire d'ordinateur transistors dans lesquels le courant passe ou ne passe pas
On appelle cette mémoire des BITS
Un bit peut contenir 0 (le courant ne passe pas) ou 1 (le courant passe)
Chaque bit contient la possibilité mathématique qu'il représente
1 bit peut contenir 2 possibilités: 0 ou 1
2 bits peuvent contenir 4 possibilités:
00 = possibilité 0
01 = possibilité 1
10 = possibilité 2
11 = possibilité 3
3 bits peuvent contenir 8 possibilités:
000 = 0
001 = 1
010 = 2
011 = 3
100 = 4
101 = 5
110 = 6
111 = 7
On réalise rapidement que:
le bit 0 représente les unités (multiple de 1)
le bit 1 représente les 2aines (multiple de 2)
le bit 3 représente les 4 aines (multiples de 4)
Exemple:
bits:
2----------1----------0
4aines----2aines----unités
101 = 1 x 4 + 0 x 2 + 1 x 1 = chiffre 5
Calcul binaire avec les unités de 2:
8 bits ensembles sont un octet (byte en anglais)
Un ordinateur qui a un processeur 8 bits va grouper ses bits par 8 (et aussi souvent, les transmettre 8 à la fois vers la carte vidéo, la mémoire ou le disque dur)
Pour calculer plus rapidement un octet on utilise la base 16, aussi appelé base hexadécimale
On divise l'octet en 2 parties:
16aines - unités
0000 0000
On peut donc avoir 0 à 15 unités et 0 à 15 16aines
Donc chaque groupe de 0000 (quatre bits) est un chiffre de 0 à 15
Sur 4 bits, il y a 16 agencements possibles (on compte le 0)
Voici leur représentation binaire, décimale, et hexadécimale:
(note: devant un chiffre hexadécimal, on met un signe de dollar $ pour les différencier des décimales)
0000 = 0 = $0
0001 = 1 = $1
0010 = 2 = $2
0011 = 3 = $3
0100 = 4 = $4
0101 = 5 = $5
0110 = 6 = $6
0111 = 7 = $7
1000 = 8 = $8
1001 = 9 = $9
1010 = 10 = $A
1011 = 11 = $B
1100 = 12 = $C
1101 = 13 = $D
1110 = 14 = $E
1111 = 15 = $F
Donc si on calcule un peux en base 16 (hexadécimale):
0011 0100 = $34 le 3 représente les 16aines et le 4 les unités
Donc, 3 x 16 (3 16aines) + 4 (unités) = 52
Dans 1 octet (8bits) on peut mettre une valeur de 0 à 255 et pour plus de facilité la représenter en hexadécimal:
1111 1111 = 255 = $FF
0111 1111 = 254 = $7F
...
0000 0011 = 3 = $03
0000 0010 = 2 = $02
0000 0001 = 1 = $01
0000 0000 = 0 = $00
Soit 256 valeurs différentes si on compte le 0
Utilité pratique du calcul binaire et hexadécimal
Chaque bit peu représenter un pixel sur un écran graphique
Avec 8 octets, agencés verticalement dans la mémoire qui est représentée à l'écran, on a dessiné les premier caractères:
00111100 = $3C
01000010 = $42
01000010 = $42
01111110 = $7E
01000010 = $42
01000010 = $42
01000010 = $42
00000000 = $00
(on utilise même plus la base décimale, car elle est maintenant démodée)
Si on regarde bien cela représente un A, avec une ligne de pixels vide en base pour laisse un espacement entre chaque ligne dans l'écran
Peu à peu les lettre ont évolués et ont été incluse dans la mémoire du BIOS déjà toutes dessinées (on a pas à les dessiner chaque fois)
Ainsi, le code 65, qu'on appelle code ASCII, représente un A majuscule
66 un B, etc. jusqu'à Z
32, un espace
8 une tabulation
13 un retour de chariot
10 un changement de ligne
92 un backslash --> \
Si on va plus loin dans la base 2 on peut grouper les octets au lieu de grouper les bits
Donc on fait un groupe de deux octets
0000 0000 0000 0000 ou $0000 en hexa
L'octet de droite est celui qu'on appelle de poids faible, car il contient les unités
L'octet de gauche, celui de poids fort, car il contient les 256 aines
Ainsi,en hexadécimal (base 16), $0101 représente 1 x 256 + 1 = 257
Le groupement de 2 octets est un integer
Si on fais la calcul rapidement, un integer (16 bits, 2 octets) va pouvoir contenir 255 x 256 + 255 x 1, soit un chiffre de 0 à 65535
Maintenant on sais compter en base 2, et en base 16, représentée en hexadécimal pour plus de facilité de lecture :)
Vous pouvez maintenant comprendre cette phrase:
Comprendre le binaire vous aidera aussi à comprendre les réseaux d'adresses IP
Tuesday, September 16, 2014
Programming with structure without making it too complicated
Program example/sample with a good structure
Outlook 2013 addin that create a toolbar and a button on it
Also define a handler to call a sub with the button we added
Once upon a time, I programmed multiple dimension arrays, all numbered and dynamically accessibles by numbers.
A year later I told myself: never again!
Why? Because a program like this is like diving. When you are 30 feet deep, you are comfortable. But when you restart from the top a year later, the descent is long...
So i decided to adopt a standard, a plan to follow, and here it is.
Situation:
You get some code example on internet
You try to run it in visual studio, but a lot of objects are not reconized
Problem:
You are missing libraries (references, dll)
Solution:
Always include comments with what library to include in the code
Example:
'=== this is a addin for outlook 2013
'=== target framework: .net framework 4.5
'=== compile: any cpu
'=== programming: visual studio 2013
'=== references: just default office 15 references and visual studio ones, no custom
'=== software: office 15 (2013) must be installed
'=== software: .net framework 4.5 must be installed but office 2013 requires it anyway
'=== system: windows 7 64 bits sp1
---------------------------------------
Situation:
You have many functions and subs in your program
Problem:
You have to add a parameter to that sub you call because you forgot a situation that just emerged
But you already have 100 lines calling this sub...
You have to change all the line calling it for that
Solution:
use structures variables (vb)
or type variables (scripts)
You pass the structure as parameter to the sub or function
When you add one more parameter, you can reprogram the code inside the sub, but you do not have to change all the lines calling it, they still pass only one structure to the sub
Example:
'=== structure to pass to a function to create a toolbar in outlook
Public Structure bar_param
Dim bar_Exist01 As Integer '=== if bar exist we do not recreate
Dim bar_Caption01 As String '=== name of bar
Dim bar_inexplorer01 As Integer '=== create in main outlook window
Dim bar_ininspector01 As Integer '=== create in message window
End Structure
'=== strucutre to pass to a function to create a button in the bar we created just before
Public Structure but_param
Dim bar_obj As Object
Dim but_exist01 As Integer
Dim but_Caption01 As String
Dim but_tooltip01 As String
Dim but_onaction01 As String
Dim but_face01 As Integer '=== icon
Dim but_inexplorer01 As Integer '=== in main outlook window
Dim but_ininspector01 As Integer '=== in message window
Dim but_bar01 As Object '=== bar to add button to
End Structure
As you can see, but is abbreviation for button
Some poeple would say get a more significative name
But no, we also need clarity of code (and i am too lazy to type long names)
Too much text and you drown in your own code
The number at the end of the parameters are to show that these variables are not system variables, but custom/user made
------------------------------------------
Situation:
Your code is spaghetti
Your main loop is 1000 lines
Problem:
You have no main sub to look at to understand the program with one look
It's all a big pack of lines with lots of exceptions add along the way
You had to do that because you have many global variables used everywhere
Solution:
You main sub should be 1 to 2 screen big
Use functions even if you have to pass them lots of parameters to make them work
Always verify if the function return something
Then your main sub can continue processing only if the functions did return something
Example:
Private Sub ThisAddIn_Startup() Handles Me.Startup
Dim button01 As Office.CommandBarButton
Dim bar01 As Office.CommandBar
Dim objNet = CreateObject("WScript.Network")
'=== get username logon from local machine
usenam = LCase(objNet.UserName)
'====== BAR addition
Dim toolbarcnt = 0
'=== dynamic number of parameters by passing a structure to the function
'=== you can add parameters you want to opass to the functon in structure without modifying the code that call the function
Dim bar_param01 As bar_param
bar_param01.bar_Exist01 = 0
bar_param01.bar_Caption01 = "Hyperzip01"
bar_param01.bar_inexplorer01 = 1
bar_param01.bar_ininspector01 = 0
'=== if we want more toolbars, we extend the array and repeat same thing with a different bar name
bar01 = toolbar_Add(bar_param01)
Dim buttoncnt = 0
Dim but_param01(buttoncnt) As but_param
If Not bar01 Is Nothing Then
'====== buttons creation in explorer (main outlook windows)
In this example, we call a function to create the outlook bar
If the resulting bar (bar01) is nothing we obviously cannot continue and create the buttons on the bar
We create only one bar, so we defined a structure (bar_param01) as one variable, not an array of variables
The next time we use structures as an array containing many buttons parameters to create
We ony have one button here, but we can define the array of parameters to be bigger if we want to create more than one
'====== buttons creation in explorer (main outlook windows)
but_param01(buttoncnt).but_exist01 = 0
but_param01(buttoncnt).but_Caption01 = "HyperZIP"
but_param01(buttoncnt).but_tooltip01 = "Zip des fichiers ou dossiers et envoie un lien de téléchargement"
but_param01(buttoncnt).but_onaction01 = "hyperZIP"
but_param01(buttoncnt).but_face01 = 5432
but_param01(buttoncnt).but_inexplorer01 = 1
but_param01(buttoncnt).but_ininspector01 = 0
but_param01(buttoncnt).but_bar01 = bar01
'=== redim of more buttons to create
'buttoncnt = buttoncnt + 1
'ReDim Preserve but_param01(buttoncnt)
Loop through the array of parameters to create all buttons
For i = 0 To buttoncnt
button01 = button_Add(but_param01(buttoncnt))
If Not button01 Is Nothing Then
'=== button created in a bar
'MsgBox("bar name: " & bar01.name & vbCrLf & "Button name: " & button01.Caption)
'=== every handler must be connected to a sub, so we cant use dynamic name for the call here, we use fixed name hyperzip_click_01
If but_param01(buttoncnt).but_Caption01 = "HyperZIP" Then AddHandler button01.Click, AddressOf hyperzip_click_01
if the button was not created, we will have a fatal error
Else
'=== error the button was not created
MsgBox("WARNING - button (explorer - outlook window) not existing or created" & vbCrLf & but_param01(buttoncnt).but_Caption01 & vbCrLf & "next button")
End If
Next
Else
if the bar was not created we will have a fatal error
'=== error bar was not created
MsgBox("ERROR - fatal - toolbar (explorer - outlook window) not existing or created" & vbCrLf & bar_param01.bar_Caption01 & vbCrLf & "exiting program")
Exit Sub
End If
As you can see, we create a bar, and continue the main sub only if the bar exist
Then we create a button in the bar and continue only if the button exist
As this addin will be called by thoses buttons, there is no need to continue if the bar or the button does not exist after we tried to create it
Debugging:
There is no error trapping, but eventually, there should be only in the lower level sub
If you trap error before calling a function (in main sub), you will never know where the program crash as it will mostly report an error at the line calling the function
(this happen if your function is in another class, in same class, it's usually not a problem)
here is the rest of the code:
Function toolbar_Add(bar_param01 As bar_param) As Office.CommandBar
'=== add a toolbar object in outlook explorer or inspector (message)
'=== with a structure as parameter, we can add as many arguments we want before calling this function without modifying all the line that use it
'=== outlook objects for "complements"
Dim explorer01 As Microsoft.Office.Interop.Outlook.Explorer
Dim inspector01 As Microsoft.Office.Interop.Outlook.Inspector
explorer01 = Globals.ThisAddIn.Application.ActiveExplorer
inspector01 = Globals.ThisAddIn.Application.ActiveInspector
Dim bars01 As Object
If bar_param01.bar_inexplorer01 = 1 Then
'=== 1 = in message
bars01 = explorer01.CommandBars
End If
If bar_param01.bar_ininspector01 = 1 Then
'=== 0 = in outlook (main)
bars01 = inspector01.CommandBars
End If
'=== check if in all bars in a bar with same name exist
For Each bar01 In bars01
If Trim(LCase(bar01.Name)) = Trim(LCase(bar_param01.bar_Caption01)) Then
'bar01.Delete
If InStr(LCase(bar01.Name), "test01") Then
'MsgBox("stas2 found")
End If
bar_param01.bar_Exist01 = 1
toolbar_Add = bar01
End If
Next
'=== add tolbar if not already there
If bar_param01.bar_Exist01 = 0 Then
'=== we are in outlook main window
If bar_param01.bar_inexplorer01 = 1 Then
toolbar_Add = explorer01.CommandBars.Add(bar_param01.bar_Caption01)
ElseIf bar_param01.bar_ininspector01 = 1 Then
'=== we are in a message
toolbar_Add = inspector01.CommandBars.Add(bar_param01.bar_Caption01)
End If
End If
'=== make toolbar visible
If toolbar_Add IsNot Nothing Then
toolbar_Add.Name = bar_param01.bar_Caption01
toolbar_Add.Visible = True
If bar_param01.bar_Exist01 = 0 Then
toolbar_Add.Position = Office.MsoBarPosition.msoBarTop
End If
End If
Return toolbar_Add
End Function
Function button_Add(but_param01 As but_param) As Office.CommandBarButton
'=== add a button in a toolbar
'=== the bar to add the button to is in the parameters structure
'=== compteur de boutons pour pouvoir en ajouter n'importe où dans la matrice
'========================= button in toolbar
'=== outlook objects for "complements"
Dim inspector01 As Microsoft.Office.Interop.Outlook.Inspector
Dim explorer01 As Microsoft.Office.Interop.Outlook.Explorer
explorer01 = Globals.ThisAddIn.Application.ActiveExplorer
inspector01 = Globals.ThisAddIn.Application.ActiveInspector
Dim button01 As Object
'=== delete all buttons in bar
For Each button01 In but_param01.but_bar01.Controls
button01.Delete()
Next
'=== button add
If but_param01.but_inexplorer01 = 1 Then
'=== in outlook main windows
button01 = explorer01.CommandBars(but_param01.but_bar01.name).Controls.Add(Type:=Office.MsoControlType.msoControlButton, Before:=1)
ElseIf but_param01.but_ininspector01 = 1 Then
'=== in message
button01 = inspector01.CommandBars(but_param01.but_bar01.name).Controls.Add(Type:=Office.MsoControlType.msoControlButton, Before:=1)
End If
If Not button01 Is Nothing Then
With button01
'buttons(depnum, 0)
.Caption = but_param01.but_Caption01
.TooltipText = but_param01.but_tooltip01
.Enabled = True
.Visible = True
.OnAction = but_param01.but_onaction01
'.OnAction = "!<" & & ">"
.tag = but_param01.but_Caption01
.Style = Office.MsoButtonStyle.msoButtonIconAndCaption
.FaceId = but_param01.but_face01
'Dim Icon01 = LoadPicture("C:\_stas\outlook\bou_HYPERZIP.bmp")
End With
End If
button_Add = button01
End Function
Private Sub hyperzip_click_01(ByVal ctrl As Office.CommandBarButton, ByRef Cancel As Boolean)
'MsgBox("You clicked: " + ctrl.Caption)
'=== in 2013, you create a class called "form", then create a new object (window aka form) from this class, then use it
Dim form01 As New Form1
'=== show the form
form01.Show()
End Sub
Private Sub ThisAddIn_Shutdown() Handles Me.Shutdown
hyperzip = Nothing
End Sub
End Class
Thursday, July 3, 2014
Unattended windows 7 64 bits professional usb boot
Usb key windows 7 unattend bootable
Hullo,
I am a little tired of formatting pcs (windows and softwares)
I decided to boot my windows 7 dvd on usb and add an autounattend.xml
1.
You must use the one time boot key to boot the computer on the usb key (F8 on core2, ESC on HP, F12 on dell) (WARNING: the key will delete all partitions on first sata connector) (WARNING: disable EFI boot (or secure boot), the key is regular boot)
2.
if you change the boot order in BIOS, the key will format and reboot until the end of time (unless you remove the usb key after first reboot)
3.
The file [rootoftheusbkey] autounattend.xml contain what will be installed
4.
At the end, there will be a folder on desktop named "À faire - Todo"
In this folder, run the script "Redetecte les périphériques mal installés"
The second redetection script, is for the video card, but it will reboot without a warning, so do not run it while something else is in progress
5.
Folders on the key
ALL the folders in [rootoftheusbkey] \sources\$oem$\$1 will be copied on c:\ on installation
You can delete them after to gain disk space
sources\$i386$\$1\_drivers
Containt 5 gigabytes of drivers for different devices:
sources\$i386$\$1\_drivers_manual
This folder contain drivers that must be installed manually. Like video card drivers, ACPI, and some others
sources\$i386$\$1\_appsall
This folder contain the application installed on all computers (not all of the are installed)
sources\$i386$\$1\_appsmaison
"house" or personnal applications
2016-09-30
I optimized the usb key boot a lot with this patch package from microsoft
This procedure actually integrate a LOT of patches (about 270) in the usb key image/dvd:
Prerequisite:
Windows6.1-KB3020369-x64.msu
Patch package:
AMD64-all-windows6.1-kb3125574-v4-x64_2dafb1d203c8964239af3048b5dd4b1264cd93b9.msu
Integration to the usb key (windows 7 sp1 professional):
The windows 7 sp1 (64bits) dvd is in this folder:
C:\windows 7 sp1 fra pro unattend\
These command must be done in a command prompt (cmd.exe):
Get information about what version is the windows 7 sp1 DVD:
Dism /Get-WIMInfo /WimFile:"C:\windows 7 sp1 fra pro unattend\sources\install.wim"
Make a temporary folder to extract DVD data:
mkdir C:\Win7SP1ISO\offline
Extract DVD data essential to windows DVD installation into C:\Win7SP1ISO\offline:
Dism /Mount-WIM /WimFile:"C:\windows 7 sp1 fra pro unattend\sources\install.wim" /Name:"Windows 7 PROFESSIONAL" /MountDir:C:\Win7SP1ISO\offline
Delete this key if DISM say image is already mounted:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WIMMount\Mounted Images
Add the prerequisite package to the C:\Win7SP1ISO\offline folder:
Dism /Image:C:\Win7SP1ISO\offline /Add-Package /PackagePath:C:\_aef\updates\Windows6.1-KB3020369-x64.msu
Add the big patch package from microsoft to the C:\Win7SP1ISO\offline folder:
Dism /Image:C:\Win7SP1ISO\offline /Add-Package /PackagePath:C:\_aef\updates\AMD64-all-windows6.1-kb3125574-v4-x64_2dafb1d203c8964239af3048b5dd4b1264cd93b9.msu
Move the the C:\Win7SP1ISO\offline folder back to the DVD / usb image (this will not change the unattented status of the DVD):
Dism /Unmount-WIM /MountDir:C:\Win7SP1ISO\offline /Commit
2016-01-31
Batch file to patch some windows update at next pc restart:
--------- start phase04.bat file ---------------- use notepad.exe to create ---------------
rem phase 04 to 10
c:
rem folder where the usb copie the patchs when installing windows (source\$oem$\$1\_updates\)
cd c:\_updates\to20150102
for /F %%A in ('dir /b *.msu') do start /wait wusa.exe %%A /quiet /norestart
x:
reg add HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce /v NewSetupScript /t Reg_SZ /d "c:\_updates\phase05.bat" /f
rem echo phase04 done>"%USERPROFILE%\Desktop\A Faire - ToDo\phase04 done - phase04 faite.txt"
Shutdown /r /t 10
--------- end phase04.bat file ----------------
Step00:
Create a new usb key for boot:
(lexar usb key will do, sometimes kingston will mess up partitionning)
windows 7 usb boot
In short:
insert usb key (8 giga minumum I presume)
[windows] r
cmd
diskpart
(added list disk, on some pc, diskpart does list disk when executed)
list disk
select disk 11
(carefull here, it delete all)
clean
create partition primary
select partition 1
active
format fs=fat32
(wait for the format to complete)
assign
(let's say G: letter was assigned)
(if formated in ntfs: Bootsect.exe /nt60 G:)
copy all files from windows 7 bootable dvd to usb key
This file tell wich edition of windows is choosen:
G:\sources\ei.cfg
Step01:
You can stop here, and you will be able to boot on usb key (F12 and choose usb key to boot for most pc, F8 for BBS setup on old core 2 (yeah BBS setup mean boot menu)
You cannot really change the boot order in BIOS because the usb key boot will restart the windows installation at everyboot. (of course you could watch for the reboot, restart pc, remove usb boot from bios after the first phase of the windows installation)
A dvd read +/- 5 mb/sec, a usb key read +/- 20 mb/sec (usb 2)
It took 11 minutes from partition selection to desktop access to install windows 7 sp1 on a core 2 with a western digital hard disk of 500 gig
Step02:
Drivers folder (inf, cat)
On our newly created usb windows 7 sp1 boot, there is a folder called sources/$i386$\$1\drivers
Windows 7 will search all subfolders there and install drivers if the INF and CAT files are present (exe is not really a driver, just a compressed setup, in wich you can probably find drivers)
You can also get the drivers in raw form from the C:\Windows\System32\DriverStore\FileRepository but there is a lot of drivers there that are from the CAB files. And this folder is big.
Step03:
autounattend.xml file creation and location
root of the usb key: (not usb drive, just a key)
autounattend.xml
Step04:
WARNING: the usb key with this unattend file WILL delete all partitions on hard disk connected to SATA 0 connector
Be sure your C drive and D drive are not inverted on the connectors
Open your computer case to be sure the drive that will be erased is on SATA connector 0
Example:
if your current D drive is on connector SATA0, then D drive will be wiped/erased/data no more!
This usb key is not EFI bootable
That mean if the computer is very new, the key might not boot at all
You can go in BIOS and turn OFF EFI boot or SECURE boot off
Also, be sure to turn on AHCI ON, this type of disk access is faster
Step05:
The installation create an "administrateur" account
This account password (is empty)
It will expire after a few months
Just press "enter" if windows ask for a new one, or enter "" for password, and enter a new password not empty and a confirmation
Content of this file:
basic setup: will destroy disk 0 without mercy!
R01 2014-07-05 I had to change installation order (installing apps before register base modification was not working, also this bad order was preventing drivers from being installed)
r02 2014-12-29
problem: some drivers were flagged as boot-critical
problem: i was detecting drivers in wrong phase (winpe)
Shift F10 in error screen enabled me to see the winpe command prompt and then navigating in x:\windows\panther to consult logs and see my error
Solution:changed PnpCustomizationWinPE to PnpCustomizationNonWinPE
--------------------------- autounattend.xml ----------------------------
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="offlineServicing">
<component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<EnableLUA>false</EnableLUA>
</component>
</settings>
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35"
language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SetupUILanguage>
<UILanguage>fr-FR</UILanguage>
<WillShowUI>Never</WillShowUI>
</SetupUILanguage>
<InputLocale>0c0c:00001009</InputLocale>
<SystemLocale>fr-FR</SystemLocale>
<UILanguage>fr-FR</UILanguage>
<UserLocale>fr-FR</UserLocale>
</component>
<component name="Microsoft-Windows-Setup" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<DiskConfiguration>
<WillShowUI>OnError</WillShowUI>
<Disk wcm:action="add">
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
<CreatePartitions>
<CreatePartition wcm:action="add">
<Order>1</Order>
<Type>Primary</Type>
<Extend>true</Extend>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<ModifyPartition wcm:action="add">
<Format>NTFS</Format>
<Label>WIN7SP1</Label>
<Letter>C</Letter>
<Order>1</Order>
<Active>true</Active>
<PartitionID>1</PartitionID>
</ModifyPartition>
</ModifyPartitions>
</Disk>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>1</PartitionID>
</InstallTo>
<WillShowUI>OnError</WillShowUI>
</OSImage>
</ImageInstall>
<UserData>
<AcceptEula>true</AcceptEula>
<FullName></FullName>
<Organization></Organization>
<ProductKey>
<WillShowUI>OnError</WillShowUI>
<Key>HYF8J-CVRMY-CM74G-RPHKF-PW487</Key>
</ProductKey>
</UserData>
</component>
<component name="Microsoft-Windows-PnpCustomizationNonWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DriverPaths>
<PathAndCredentials wcm:action="add" wcm:keyValue="1">
<Path>c:\_drivers</Path>
</PathAndCredentials>
</DriverPaths>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<RegisteredOrganization></RegisteredOrganization>
<TimeZone>Eastern Standard Time</TimeZone>
<RegisteredOwner></RegisteredOwner>
<AutoLogon>
<Password>
<Value></Value>
<PlainText>true</PlainText>
</Password>
<Username>administrateur</Username>
<LogonCount>10</LogonCount>
<Enabled>true</Enabled>
</AutoLogon>
<ProductKey>HYF8J-CVRMY-CM74G-RPHKF-PW487</ProductKey>
<ComputerName />
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OOBE>
<ProtectYourPC>1</ProtectYourPC>
<NetworkLocation>Home</NetworkLocation>
</OOBE>
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SOFTWARE\Classes\VBSFile\Shell\Edit\command" /v "" /t REG_SZ /d "C:\WINDOWS\System32\Notepad2.exe %1" /f</CommandLine>
<Order>1</Order>
<Description>notepad2</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SOFTWARE\Classes\txtFile\Shell\Edit\command" /v "" /t REG_SZ /d "C:\WINDOWS\System32\Notepad2.exe %1" /f</CommandLine>
<Order>2</Order>
<Description>notepad2</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SOFTWARE\Classes\batFile\Shell\Edit\command" /v "" /t REG_SZ /d "C:\WINDOWS\System32\Notepad2.exe %1" /f</CommandLine>
<Order>3</Order>
<Description>notepad2</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SOFTWARE\Classes\regFile\Shell\Edit\command" /v "" /t REG_SZ /d "C:\WINDOWS\System32\Notepad2.exe %1" /f</CommandLine>
<Order>4</Order>
<Description>notepad2</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SOFTWARE\Classes\cmdFile\Shell\Edit\command" /v "" /t REG_SZ /d "C:\WINDOWS\System32\Notepad2.exe %1" /f</CommandLine>
<Order>5</Order>
<Description>notepad2</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SOFTWARE\Classes\xmlFile\Shell\Edit\command" /v "" /t REG_SZ /d "C:\WINDOWS\System32\Notepad2.exe %1" /f</CommandLine>
<Order>6</Order>
<Description>notepad2</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SOFTWARE\Classes\logfile\Shell\Edit\command" /v "" /t REG_SZ /d "C:\WINDOWS\System32\Notepad2.exe %1" /f</CommandLine>
<Order>7</Order>
<Description>notepad2</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v ForceClassicControlPanel /t REG_DWORD /d 1 /f</CommandLine>
<Order>20</Order>
<Description>explorer.exe setup</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ClassicViewState /t REG_DWORD /d 1 /f</CommandLine>
<Order>21</Order>
<Description>explorer.exe setup</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v WebView /t REG_DWORD /d 0 /f</CommandLine>
<Order>22</Order>
<Description>explorer.exe setup</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideIcons /t REG_DWORD /d 0 /f</CommandLine>
<Order>23</Order>
<Description>explorer.exe setup</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t REG_DWORD /d 1 /f</CommandLine>
<Order>24</Order>
<Description>explorer.exe setup</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v TaskbarGlomming /t REG_DWORD /d 0 /f</CommandLine>
<Order>25</Order>
<Description>explorer.exe setup</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v TaskbarSizeMove /t REG_DWORD /d 1 /f</CommandLine>
<Order>26</Order>
<Description>explorer.exe setup</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v TaskbarGlomLevel /t REG_DWORD /d 2 /f</CommandLine>
<Order>27</Order>
<Description>dont group icones in task bar explorer.exe setup</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Internet Explorer\IntelliForms" /v AskUser /t REG_DWORD /d 0 /f</CommandLine>
<Order>50</Order>
<Description>explorer.exe setup</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SYSTEM\CurrentControlSet\Control\CrashControl" /v AutoReboot /t REG_DWORD /d 0 /f</CommandLine>
<Order>51</Order>
<Description>blue screen crash</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SYSTEM\CurrentControlSet\Control\CrashControl" /v AUState /t REG_DWORD /d 1 /f</CommandLine>
<Order>52</Order>
<Description>blue screen crash</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 1 /f</CommandLine>
<Order>60</Order>
<Description>windows update</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUState /t REG_DWORD /d 1 /f</CommandLine>
<Order>61</Order>
<Description>windows update</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /v ShellState /t REG_BINARY /d 2400000033080000000000000000000000000000010000000d0000000000000000000000 /f</CommandLine>
<Order>70</Order>
<Description>classic view</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /v IconUnderline /t REG_BINARY /d 030000 /f</CommandLine>
<Order>71</Order>
<Description>i dont know</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /v EnableAutoTray /t REG_DWORD /d 0 /f</CommandLine>
<Order>72</Order>
<Description>dont hide right side icons</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg delete "HKCU\Keyboard Layout\Preload" /va /f</CommandLine>
<Order>80</Order>
<Description>clavier langue requiert un reboot</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Keyboard Layout\Preload" /v 1 /t REG_SZ /d "00000c0c" /f</CommandLine>
<Order>81</Order>
<Description>clavier langue requiert un reboot</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Keyboard Layout\Substitutes" /v 00000c0c /t REG_SZ /d "00001009" /f</CommandLine>
<Order>82</Order>
<Description>keyboard language need restart sessiont</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion" /v DevicePath /t REG_EXPAND_SZ /d %SystemRoot%\inf;c:\_drivers /f</CommandLine>
<Order>83</Order>
<Description>will detect all drivers is asked fo hardware change</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f</CommandLine>
<Order>90</Order>
<Description>Show file extensions in Explorer</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ClassicViewState /t REG_DWORD /d 1 /f</CommandLine>
<Order>91</Order>
<Description>Show file extensions in Explorer</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\MediaPlayer\Preferences" /v AcceptedPrivacyStatement /t REG_DWORD /d 1 /f</CommandLine>
<Order>92</Order>
<Description>Show file extensions in Explorer</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\MediaPlayer\Preferences" /v FirstRun /t REG_DWORD /d 0 /f</CommandLine>
<Order>93</Order>
<Description>Show file extensions in Explorer</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Internet Explorer\Main" /v RunOnceHasShown /t REG_DWORD /d 1 /f</CommandLine>
<Order>94</Order>
<Description>Show file extensions in Explorer</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Internet Explorer\Main" /v RunOnceComplete /t REG_DWORD /d 1 /f</CommandLine>
<Order>95</Order>
<Description>Show file extensions in Explorer</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c xcopy c:\_appsmaison\jzip\*.* "c:\program files (x86)\jzip\" /y /c</CommandLine>
<Order>96</Order>
<Description>jzip 7zip</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c xcopy c:\_appsall\jzip\*.* "c:\program files (x86)\jzip\" /y /c</CommandLine>
<Order>97</Order>
<Description>jzip 7zip</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>REGSVR32.EXE "c:\program files (x86)\jzip\jZipShell.dll" /s</CommandLine>
<Order>98</Order>
<Description>jzip 7zip</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>msiexec /i c:\_appsall\screenhunterfree_prt_scr\setupscreenhunterfree.msi /quiet</CommandLine>
<Order>99</Order>
<Description>screenhunter</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>c:\_updates\dotnet\NDP452-KB2901907-x86-x64-AllOS-ENU.exe /q /norestart</CommandLine>
<Order>200</Order>
<Description>dotnet452</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_appsall\video_codecs_convert\K-Lite_Codec_Pack_1180_Standard.exe /verysilent</CommandLine>
<Order>203</Order>
<Description>codecs video</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_appsall\java_sun\jre-8u25-windows-i586.exe /s</CommandLine>
<Order>204</Order>
<Description>java32</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_appsall\java_sun\jre-8u25-windows-x64.exe /s</CommandLine>
<Order>205</Order>
<Description>java64</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_appsall\skype\Skype_silent.exe</CommandLine>
<Order>206</Order>
<Description>skype</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>c:\_appsmaison\microsoft_office_2013_64_fra_files\setup.exe /adminfile office2013unattend.MSP</CommandLine>
<Order>207</Order>
<Description>office2013</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>msiexec.exe /i c:\_appsmaison\Acrobat_X_Professional\AcroPro.msi EULA_ACCEPT=YES REGISTRATION_SUPPRESS=YES /qn</CommandLine>
<Order>208</Order>
<Description>AcroPro.msi</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c copy c:\_appsall\notepad2\notepad2.exe c:\windows\system32\notepad2.exe</CommandLine>
<Order>209</Order>
<Description>notepad2</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_appsall\chrome\chromeStandaloneSetup.exe /silent /install</CommandLine>
<Order>210</Order>
<Description>chrome</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>msiexec.exe /i "C:\_appsall\flashplayer\install_flash_player_20_active_x.msi" /qn</CommandLine>
<Order>211</Order>
<Description>install_flash_player_20_active_x</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>msiexec.exe /i "C:\_appsall\flashplayer\install_flash_player_20_plugin.msi" /qn</CommandLine>
<Order>212</Order>
<Description>install_flash_player_20_plugin</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c wmic useraccount where "name='administrateur'" set PasswordExpires=FALSE</CommandLine>
<Order>213</Order>
<Description>Disable password expiration for vagrant user</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c c:\_appsmaison\antivirus\avast_free_antivirus_setup.exe /silent /NORESTART /SP- /"Chrome"="false"</CommandLine>
<Order>215</Order>
<Description>antivirus avast</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>reg add HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce /v NewSetupScript /t Reg_SZ /d "c:\_updates\phase02.bat" /f</CommandLine>
<Order>216</Order>
<Description>patchbeforeie11</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c "c:\_appsall\firefox\Firefox Setup 43.0.2.exe" -ms</CommandLine>
<Order>217</Order>
<Description>firefox</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c "c:\_appsall\vcredist2010sp1\vcredist_x86.exe" /q /norestart</CommandLine>
<Order>218</Order>
<Description>vcredist2010sp1</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c "c:\_appsall\vcredist2015\vc_redist.x86.exe" /q /norestart</CommandLine>
<Order>219</Order>
<Description>vcredist2015_32</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c "c:\_appsall\vcredist2015\vc_redist.x64.exe" /q /norestart</CommandLine>
<Order>220</Order>
<Description>vcredist2015_64</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>msiexec /i c:\_appsall\MysqlOdbcConnector\mysql-connector-odbc-5.3.4-win32.msi /quiet</CommandLine>
<Order>221</Order>
<Description>mysql32odbc</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>msiexec /i c:\_appsall\MysqlOdbcConnector\mysql-connector-odbc-5.3.4-winx64.msi /quiet</CommandLine>
<Order>222</Order>
<Description>mysql64odbc</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c "c:\_appsall\acrobat_reader_adobe\AdbeRdr11010_fr_FR.exe" /sPB /rs</CommandLine>
<Order>223</Order>
<Description>mysql64odbc</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\SOFTWARE\Adobe\Acrobat Reader\11.0\AdobeViewer" /v EULA /t REG_DWORD /d 1 /f</CommandLine>
<Order>224</Order>
<Description>adobereadereulaaccepted</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c mkdir "c:\users\administrateur\desktop\A Faire - ToDo\"</CommandLine>
<Order>225</Order>
<Description>a faire apres reboot</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_util\shortcut\Shortcut.exe /f:"%USERPROFILE%\Desktop\A Faire - ToDo\patch windows phase 4-10 (4 heures reboot auto).lnk" /a:c /t:"c:\_updates\phase04.bat"</CommandLine>
<Order>226</Order>
<Description></Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_util\shortcut\Shortcut.exe /f:"%USERPROFILE%\Desktop\A Faire - ToDo\activate windows.lnk" /a:c /t:"c:\_appsmaison\crack win7 Windows Loader sp1\Windows Loader.exe"</CommandLine>
<Order>229</Order>
<Description></Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_util\shortcut\Shortcut.exe /f:"%USERPROFILE%\Desktop\A Faire - ToDo\activate office2013.lnk" /a:c /t:"c:\_appsmaison\microsoft_office_2013_64_fra_files\_activation_off2013_fra\Microsoft Toolkit.exe"</CommandLine>
<Order>230</Order>
<Description></Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_util\shortcut\Shortcut.exe /f:"%USERPROFILE%\Desktop\A Faire - ToDo\Tweaks (setup profile).lnk" /a:c /t:"c:\_appsall\_01_tweaks.reg"</CommandLine>
<Order>231</Order>
<Description></Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_util\shortcut\Shortcut.exe /f:"%USERPROFILE%\Desktop\A Faire - ToDo\Malwarebyte Setup.lnk" /a:c /t:"c:\_appsall\malwarebyte\mbam-setup-2.0.4.1028.exe"</CommandLine>
<Order>232</Order>
<Description></Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_util\shortcut\Shortcut.exe /f:"%USERPROFILE%\Desktop\A Faire - ToDo\spywareblaster54 setup.lnk" /a:c /t:"c:\_appsall\spywareblaster\spywareblastersetup54.exe"</CommandLine>
<Order>233</Order>
<Description></Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_util\shortcut\Shortcut.exe /f:"%USERPROFILE%\Desktop\A Faire - ToDo\virtualclonedrive setup.lnk" /a:c /t:"c:\_appsall\virtualclonedrive\SetupVirtualCloneDrive5470.exe"</CommandLine>
<Order>234</Order>
<Description></Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_util\shortcut\Shortcut.exe /f:"%USERPROFILE%\Desktop\A Faire - ToDo\imageburn graveur dvd setup.lnk" /a:c /t:"c:\_appsall\imageburn\SetupImgBurn_2.5.7.0.exe"</CommandLine>
<Order>235</Order>
<Description></Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_util\shortcut\Shortcut.exe /f:"%USERPROFILE%\Desktop\A Faire - ToDo\supprime les peripheriques et redetecte.lnk" /a:c /t:"c:\_drivers\scanfornewhardware.vbs"</CommandLine>
<Order>236</Order>
<Description></Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c "c:\_appsall\vcredist2012upd4\vcredist_x86.exe" /q /norestart</CommandLine>
<Order>237</Order>
<Description>vcredist2012_32</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c "c:\_appsall\vcredist2012upd4\vcredist_x64.exe" /q /norestart</CommandLine>
<Order>238</Order>
<Description>vcredist2012_64</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>C:\Windows\System32\shutdown.exe /r /t 120</CommandLine>
<Order>250</Order>
<Description>restart</Description>
</SynchronousCommand>
</FirstLogonCommands>
<UserAccounts>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<Value></Value>
<PlainText>true</PlainText>
</Password>
<Name>Administrateur</Name>
<Group>Administrators</Group>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<AutoLogon>
<Enabled>true</Enabled>
<Username>Administrateur</Username>
<LogonCount>3</LogonCount>
</AutoLogon>
<RegisteredOrganization>Maison</RegisteredOrganization>
<RegisteredOwner>Maison</RegisteredOwner>
</component>
</settings>
</unattend>
Hullo,
I am a little tired of formatting pcs (windows and softwares)
I decided to boot my windows 7 dvd on usb and add an autounattend.xml
1.
You must use the one time boot key to boot the computer on the usb key (F8 on core2, ESC on HP, F12 on dell) (WARNING: the key will delete all partitions on first sata connector) (WARNING: disable EFI boot (or secure boot), the key is regular boot)
2.
if you change the boot order in BIOS, the key will format and reboot until the end of time (unless you remove the usb key after first reboot)
3.
The file [rootoftheusbkey] autounattend.xml contain what will be installed
4.
At the end, there will be a folder on desktop named "À faire - Todo"
In this folder, run the script "Redetecte les périphériques mal installés"
The second redetection script, is for the video card, but it will reboot without a warning, so do not run it while something else is in progress
5.
Folders on the key
ALL the folders in [rootoftheusbkey] \sources\$oem$\$1 will be copied on c:\ on installation
You can delete them after to gain disk space
sources\$i386$\$1\_drivers
Containt 5 gigabytes of drivers for different devices:
sources\$i386$\$1\_drivers_manual
This folder contain drivers that must be installed manually. Like video card drivers, ACPI, and some others
sources\$i386$\$1\_appsall
This folder contain the application installed on all computers (not all of the are installed)
sources\$i386$\$1\_appsmaison
"house" or personnal applications
2016-09-30
I optimized the usb key boot a lot with this patch package from microsoft
This procedure actually integrate a LOT of patches (about 270) in the usb key image/dvd:
Prerequisite:
Windows6.1-KB3020369-x64.msu
Patch package:
AMD64-all-windows6.1-kb3125574-v4-x64_2dafb1d203c8964239af3048b5dd4b1264cd93b9.msu
Integration to the usb key (windows 7 sp1 professional):
The windows 7 sp1 (64bits) dvd is in this folder:
C:\windows 7 sp1 fra pro unattend\
These command must be done in a command prompt (cmd.exe):
Get information about what version is the windows 7 sp1 DVD:
Dism /Get-WIMInfo /WimFile:"C:\windows 7 sp1 fra pro unattend\sources\install.wim"
Make a temporary folder to extract DVD data:
mkdir C:\Win7SP1ISO\offline
Extract DVD data essential to windows DVD installation into C:\Win7SP1ISO\offline:
Dism /Mount-WIM /WimFile:"C:\windows 7 sp1 fra pro unattend\sources\install.wim" /Name:"Windows 7 PROFESSIONAL" /MountDir:C:\Win7SP1ISO\offline
Delete this key if DISM say image is already mounted:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WIMMount\Mounted Images
Add the prerequisite package to the C:\Win7SP1ISO\offline folder:
Dism /Image:C:\Win7SP1ISO\offline /Add-Package /PackagePath:C:\_aef\updates\Windows6.1-KB3020369-x64.msu
Add the big patch package from microsoft to the C:\Win7SP1ISO\offline folder:
Dism /Image:C:\Win7SP1ISO\offline /Add-Package /PackagePath:C:\_aef\updates\AMD64-all-windows6.1-kb3125574-v4-x64_2dafb1d203c8964239af3048b5dd4b1264cd93b9.msu
Move the the C:\Win7SP1ISO\offline folder back to the DVD / usb image (this will not change the unattented status of the DVD):
Dism /Unmount-WIM /MountDir:C:\Win7SP1ISO\offline /Commit
2016-01-31
Batch file to patch some windows update at next pc restart:
--------- start phase04.bat file ---------------- use notepad.exe to create ---------------
rem phase 04 to 10
c:
rem folder where the usb copie the patchs when installing windows (source\$oem$\$1\_updates\)
cd c:\_updates\to20150102
for /F %%A in ('dir /b *.msu') do start /wait wusa.exe %%A /quiet /norestart
x:
reg add HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce /v NewSetupScript /t Reg_SZ /d "c:\_updates\phase05.bat" /f
rem echo phase04 done>"%USERPROFILE%\Desktop\A Faire - ToDo\phase04 done - phase04 faite.txt"
Shutdown /r /t 10
--------- end phase04.bat file ----------------
Step00:
Create a new usb key for boot:
(lexar usb key will do, sometimes kingston will mess up partitionning)
windows 7 usb boot
In short:
insert usb key (8 giga minumum I presume)
[windows] r
cmd
diskpart
(added list disk, on some pc, diskpart does list disk when executed)
list disk
select disk 11
(carefull here, it delete all)
clean
create partition primary
select partition 1
active
format fs=fat32
(wait for the format to complete)
assign
(let's say G: letter was assigned)
(if formated in ntfs: Bootsect.exe /nt60 G:)
copy all files from windows 7 bootable dvd to usb key
This file tell wich edition of windows is choosen:
G:\sources\ei.cfg
Step01:
You can stop here, and you will be able to boot on usb key (F12 and choose usb key to boot for most pc, F8 for BBS setup on old core 2 (yeah BBS setup mean boot menu)
You cannot really change the boot order in BIOS because the usb key boot will restart the windows installation at everyboot. (of course you could watch for the reboot, restart pc, remove usb boot from bios after the first phase of the windows installation)
A dvd read +/- 5 mb/sec, a usb key read +/- 20 mb/sec (usb 2)
It took 11 minutes from partition selection to desktop access to install windows 7 sp1 on a core 2 with a western digital hard disk of 500 gig
Step02:
Drivers folder (inf, cat)
On our newly created usb windows 7 sp1 boot, there is a folder called sources/$i386$\$1\drivers
Windows 7 will search all subfolders there and install drivers if the INF and CAT files are present (exe is not really a driver, just a compressed setup, in wich you can probably find drivers)
You can also get the drivers in raw form from the C:\Windows\System32\DriverStore\FileRepository but there is a lot of drivers there that are from the CAB files. And this folder is big.
Step03:
autounattend.xml file creation and location
root of the usb key: (not usb drive, just a key)
autounattend.xml
Step04:
WARNING: the usb key with this unattend file WILL delete all partitions on hard disk connected to SATA 0 connector
Be sure your C drive and D drive are not inverted on the connectors
Open your computer case to be sure the drive that will be erased is on SATA connector 0
Example:
if your current D drive is on connector SATA0, then D drive will be wiped/erased/data no more!
This usb key is not EFI bootable
That mean if the computer is very new, the key might not boot at all
You can go in BIOS and turn OFF EFI boot or SECURE boot off
Also, be sure to turn on AHCI ON, this type of disk access is faster
Step05:
The installation create an "administrateur" account
This account password (is empty)
It will expire after a few months
Just press "enter" if windows ask for a new one, or enter "" for password, and enter a new password not empty and a confirmation
Content of this file:
basic setup: will destroy disk 0 without mercy!
R01 2014-07-05 I had to change installation order (installing apps before register base modification was not working, also this bad order was preventing drivers from being installed)
r02 2014-12-29
problem: some drivers were flagged as boot-critical
problem: i was detecting drivers in wrong phase (winpe)
Shift F10 in error screen enabled me to see the winpe command prompt and then navigating in x:\windows\panther to consult logs and see my error
Solution:changed PnpCustomizationWinPE to PnpCustomizationNonWinPE
--------------------------- autounattend.xml ----------------------------
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="offlineServicing">
<component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<EnableLUA>false</EnableLUA>
</component>
</settings>
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35"
language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SetupUILanguage>
<UILanguage>fr-FR</UILanguage>
<WillShowUI>Never</WillShowUI>
</SetupUILanguage>
<InputLocale>0c0c:00001009</InputLocale>
<SystemLocale>fr-FR</SystemLocale>
<UILanguage>fr-FR</UILanguage>
<UserLocale>fr-FR</UserLocale>
</component>
<component name="Microsoft-Windows-Setup" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<DiskConfiguration>
<WillShowUI>OnError</WillShowUI>
<Disk wcm:action="add">
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
<CreatePartitions>
<CreatePartition wcm:action="add">
<Order>1</Order>
<Type>Primary</Type>
<Extend>true</Extend>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<ModifyPartition wcm:action="add">
<Format>NTFS</Format>
<Label>WIN7SP1</Label>
<Letter>C</Letter>
<Order>1</Order>
<Active>true</Active>
<PartitionID>1</PartitionID>
</ModifyPartition>
</ModifyPartitions>
</Disk>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>1</PartitionID>
</InstallTo>
<WillShowUI>OnError</WillShowUI>
</OSImage>
</ImageInstall>
<UserData>
<AcceptEula>true</AcceptEula>
<FullName></FullName>
<Organization></Organization>
<ProductKey>
<WillShowUI>OnError</WillShowUI>
<Key>HYF8J-CVRMY-CM74G-RPHKF-PW487</Key>
</ProductKey>
</UserData>
</component>
<component name="Microsoft-Windows-PnpCustomizationNonWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DriverPaths>
<PathAndCredentials wcm:action="add" wcm:keyValue="1">
<Path>c:\_drivers</Path>
</PathAndCredentials>
</DriverPaths>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<RegisteredOrganization></RegisteredOrganization>
<TimeZone>Eastern Standard Time</TimeZone>
<RegisteredOwner></RegisteredOwner>
<AutoLogon>
<Password>
<Value></Value>
<PlainText>true</PlainText>
</Password>
<Username>administrateur</Username>
<LogonCount>10</LogonCount>
<Enabled>true</Enabled>
</AutoLogon>
<ProductKey>HYF8J-CVRMY-CM74G-RPHKF-PW487</ProductKey>
<ComputerName />
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OOBE>
<ProtectYourPC>1</ProtectYourPC>
<NetworkLocation>Home</NetworkLocation>
</OOBE>
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SOFTWARE\Classes\VBSFile\Shell\Edit\command" /v "" /t REG_SZ /d "C:\WINDOWS\System32\Notepad2.exe %1" /f</CommandLine>
<Order>1</Order>
<Description>notepad2</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SOFTWARE\Classes\txtFile\Shell\Edit\command" /v "" /t REG_SZ /d "C:\WINDOWS\System32\Notepad2.exe %1" /f</CommandLine>
<Order>2</Order>
<Description>notepad2</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SOFTWARE\Classes\batFile\Shell\Edit\command" /v "" /t REG_SZ /d "C:\WINDOWS\System32\Notepad2.exe %1" /f</CommandLine>
<Order>3</Order>
<Description>notepad2</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SOFTWARE\Classes\regFile\Shell\Edit\command" /v "" /t REG_SZ /d "C:\WINDOWS\System32\Notepad2.exe %1" /f</CommandLine>
<Order>4</Order>
<Description>notepad2</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SOFTWARE\Classes\cmdFile\Shell\Edit\command" /v "" /t REG_SZ /d "C:\WINDOWS\System32\Notepad2.exe %1" /f</CommandLine>
<Order>5</Order>
<Description>notepad2</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SOFTWARE\Classes\xmlFile\Shell\Edit\command" /v "" /t REG_SZ /d "C:\WINDOWS\System32\Notepad2.exe %1" /f</CommandLine>
<Order>6</Order>
<Description>notepad2</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SOFTWARE\Classes\logfile\Shell\Edit\command" /v "" /t REG_SZ /d "C:\WINDOWS\System32\Notepad2.exe %1" /f</CommandLine>
<Order>7</Order>
<Description>notepad2</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v ForceClassicControlPanel /t REG_DWORD /d 1 /f</CommandLine>
<Order>20</Order>
<Description>explorer.exe setup</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ClassicViewState /t REG_DWORD /d 1 /f</CommandLine>
<Order>21</Order>
<Description>explorer.exe setup</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v WebView /t REG_DWORD /d 0 /f</CommandLine>
<Order>22</Order>
<Description>explorer.exe setup</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideIcons /t REG_DWORD /d 0 /f</CommandLine>
<Order>23</Order>
<Description>explorer.exe setup</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t REG_DWORD /d 1 /f</CommandLine>
<Order>24</Order>
<Description>explorer.exe setup</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v TaskbarGlomming /t REG_DWORD /d 0 /f</CommandLine>
<Order>25</Order>
<Description>explorer.exe setup</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v TaskbarSizeMove /t REG_DWORD /d 1 /f</CommandLine>
<Order>26</Order>
<Description>explorer.exe setup</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v TaskbarGlomLevel /t REG_DWORD /d 2 /f</CommandLine>
<Order>27</Order>
<Description>dont group icones in task bar explorer.exe setup</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Internet Explorer\IntelliForms" /v AskUser /t REG_DWORD /d 0 /f</CommandLine>
<Order>50</Order>
<Description>explorer.exe setup</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SYSTEM\CurrentControlSet\Control\CrashControl" /v AutoReboot /t REG_DWORD /d 0 /f</CommandLine>
<Order>51</Order>
<Description>blue screen crash</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SYSTEM\CurrentControlSet\Control\CrashControl" /v AUState /t REG_DWORD /d 1 /f</CommandLine>
<Order>52</Order>
<Description>blue screen crash</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 1 /f</CommandLine>
<Order>60</Order>
<Description>windows update</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUState /t REG_DWORD /d 1 /f</CommandLine>
<Order>61</Order>
<Description>windows update</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /v ShellState /t REG_BINARY /d 2400000033080000000000000000000000000000010000000d0000000000000000000000 /f</CommandLine>
<Order>70</Order>
<Description>classic view</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /v IconUnderline /t REG_BINARY /d 030000 /f</CommandLine>
<Order>71</Order>
<Description>i dont know</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /v EnableAutoTray /t REG_DWORD /d 0 /f</CommandLine>
<Order>72</Order>
<Description>dont hide right side icons</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg delete "HKCU\Keyboard Layout\Preload" /va /f</CommandLine>
<Order>80</Order>
<Description>clavier langue requiert un reboot</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Keyboard Layout\Preload" /v 1 /t REG_SZ /d "00000c0c" /f</CommandLine>
<Order>81</Order>
<Description>clavier langue requiert un reboot</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Keyboard Layout\Substitutes" /v 00000c0c /t REG_SZ /d "00001009" /f</CommandLine>
<Order>82</Order>
<Description>keyboard language need restart sessiont</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion" /v DevicePath /t REG_EXPAND_SZ /d %SystemRoot%\inf;c:\_drivers /f</CommandLine>
<Order>83</Order>
<Description>will detect all drivers is asked fo hardware change</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f</CommandLine>
<Order>90</Order>
<Description>Show file extensions in Explorer</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ClassicViewState /t REG_DWORD /d 1 /f</CommandLine>
<Order>91</Order>
<Description>Show file extensions in Explorer</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\MediaPlayer\Preferences" /v AcceptedPrivacyStatement /t REG_DWORD /d 1 /f</CommandLine>
<Order>92</Order>
<Description>Show file extensions in Explorer</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\MediaPlayer\Preferences" /v FirstRun /t REG_DWORD /d 0 /f</CommandLine>
<Order>93</Order>
<Description>Show file extensions in Explorer</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Internet Explorer\Main" /v RunOnceHasShown /t REG_DWORD /d 1 /f</CommandLine>
<Order>94</Order>
<Description>Show file extensions in Explorer</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\Software\Microsoft\Internet Explorer\Main" /v RunOnceComplete /t REG_DWORD /d 1 /f</CommandLine>
<Order>95</Order>
<Description>Show file extensions in Explorer</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c xcopy c:\_appsmaison\jzip\*.* "c:\program files (x86)\jzip\" /y /c</CommandLine>
<Order>96</Order>
<Description>jzip 7zip</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c xcopy c:\_appsall\jzip\*.* "c:\program files (x86)\jzip\" /y /c</CommandLine>
<Order>97</Order>
<Description>jzip 7zip</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>REGSVR32.EXE "c:\program files (x86)\jzip\jZipShell.dll" /s</CommandLine>
<Order>98</Order>
<Description>jzip 7zip</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>msiexec /i c:\_appsall\screenhunterfree_prt_scr\setupscreenhunterfree.msi /quiet</CommandLine>
<Order>99</Order>
<Description>screenhunter</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>c:\_updates\dotnet\NDP452-KB2901907-x86-x64-AllOS-ENU.exe /q /norestart</CommandLine>
<Order>200</Order>
<Description>dotnet452</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_appsall\video_codecs_convert\K-Lite_Codec_Pack_1180_Standard.exe /verysilent</CommandLine>
<Order>203</Order>
<Description>codecs video</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_appsall\java_sun\jre-8u25-windows-i586.exe /s</CommandLine>
<Order>204</Order>
<Description>java32</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_appsall\java_sun\jre-8u25-windows-x64.exe /s</CommandLine>
<Order>205</Order>
<Description>java64</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_appsall\skype\Skype_silent.exe</CommandLine>
<Order>206</Order>
<Description>skype</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>c:\_appsmaison\microsoft_office_2013_64_fra_files\setup.exe /adminfile office2013unattend.MSP</CommandLine>
<Order>207</Order>
<Description>office2013</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>msiexec.exe /i c:\_appsmaison\Acrobat_X_Professional\AcroPro.msi EULA_ACCEPT=YES REGISTRATION_SUPPRESS=YES /qn</CommandLine>
<Order>208</Order>
<Description>AcroPro.msi</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c copy c:\_appsall\notepad2\notepad2.exe c:\windows\system32\notepad2.exe</CommandLine>
<Order>209</Order>
<Description>notepad2</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_appsall\chrome\chromeStandaloneSetup.exe /silent /install</CommandLine>
<Order>210</Order>
<Description>chrome</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>msiexec.exe /i "C:\_appsall\flashplayer\install_flash_player_20_active_x.msi" /qn</CommandLine>
<Order>211</Order>
<Description>install_flash_player_20_active_x</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>msiexec.exe /i "C:\_appsall\flashplayer\install_flash_player_20_plugin.msi" /qn</CommandLine>
<Order>212</Order>
<Description>install_flash_player_20_plugin</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c wmic useraccount where "name='administrateur'" set PasswordExpires=FALSE</CommandLine>
<Order>213</Order>
<Description>Disable password expiration for vagrant user</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c c:\_appsmaison\antivirus\avast_free_antivirus_setup.exe /silent /NORESTART /SP- /"Chrome"="false"</CommandLine>
<Order>215</Order>
<Description>antivirus avast</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>reg add HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce /v NewSetupScript /t Reg_SZ /d "c:\_updates\phase02.bat" /f</CommandLine>
<Order>216</Order>
<Description>patchbeforeie11</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c "c:\_appsall\firefox\Firefox Setup 43.0.2.exe" -ms</CommandLine>
<Order>217</Order>
<Description>firefox</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c "c:\_appsall\vcredist2010sp1\vcredist_x86.exe" /q /norestart</CommandLine>
<Order>218</Order>
<Description>vcredist2010sp1</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c "c:\_appsall\vcredist2015\vc_redist.x86.exe" /q /norestart</CommandLine>
<Order>219</Order>
<Description>vcredist2015_32</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c "c:\_appsall\vcredist2015\vc_redist.x64.exe" /q /norestart</CommandLine>
<Order>220</Order>
<Description>vcredist2015_64</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>msiexec /i c:\_appsall\MysqlOdbcConnector\mysql-connector-odbc-5.3.4-win32.msi /quiet</CommandLine>
<Order>221</Order>
<Description>mysql32odbc</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>msiexec /i c:\_appsall\MysqlOdbcConnector\mysql-connector-odbc-5.3.4-winx64.msi /quiet</CommandLine>
<Order>222</Order>
<Description>mysql64odbc</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c "c:\_appsall\acrobat_reader_adobe\AdbeRdr11010_fr_FR.exe" /sPB /rs</CommandLine>
<Order>223</Order>
<Description>mysql64odbc</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKCU\SOFTWARE\Adobe\Acrobat Reader\11.0\AdobeViewer" /v EULA /t REG_DWORD /d 1 /f</CommandLine>
<Order>224</Order>
<Description>adobereadereulaaccepted</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c mkdir "c:\users\administrateur\desktop\A Faire - ToDo\"</CommandLine>
<Order>225</Order>
<Description>a faire apres reboot</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_util\shortcut\Shortcut.exe /f:"%USERPROFILE%\Desktop\A Faire - ToDo\patch windows phase 4-10 (4 heures reboot auto).lnk" /a:c /t:"c:\_updates\phase04.bat"</CommandLine>
<Order>226</Order>
<Description></Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_util\shortcut\Shortcut.exe /f:"%USERPROFILE%\Desktop\A Faire - ToDo\activate windows.lnk" /a:c /t:"c:\_appsmaison\crack win7 Windows Loader sp1\Windows Loader.exe"</CommandLine>
<Order>229</Order>
<Description></Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_util\shortcut\Shortcut.exe /f:"%USERPROFILE%\Desktop\A Faire - ToDo\activate office2013.lnk" /a:c /t:"c:\_appsmaison\microsoft_office_2013_64_fra_files\_activation_off2013_fra\Microsoft Toolkit.exe"</CommandLine>
<Order>230</Order>
<Description></Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_util\shortcut\Shortcut.exe /f:"%USERPROFILE%\Desktop\A Faire - ToDo\Tweaks (setup profile).lnk" /a:c /t:"c:\_appsall\_01_tweaks.reg"</CommandLine>
<Order>231</Order>
<Description></Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_util\shortcut\Shortcut.exe /f:"%USERPROFILE%\Desktop\A Faire - ToDo\Malwarebyte Setup.lnk" /a:c /t:"c:\_appsall\malwarebyte\mbam-setup-2.0.4.1028.exe"</CommandLine>
<Order>232</Order>
<Description></Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_util\shortcut\Shortcut.exe /f:"%USERPROFILE%\Desktop\A Faire - ToDo\spywareblaster54 setup.lnk" /a:c /t:"c:\_appsall\spywareblaster\spywareblastersetup54.exe"</CommandLine>
<Order>233</Order>
<Description></Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_util\shortcut\Shortcut.exe /f:"%USERPROFILE%\Desktop\A Faire - ToDo\virtualclonedrive setup.lnk" /a:c /t:"c:\_appsall\virtualclonedrive\SetupVirtualCloneDrive5470.exe"</CommandLine>
<Order>234</Order>
<Description></Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_util\shortcut\Shortcut.exe /f:"%USERPROFILE%\Desktop\A Faire - ToDo\imageburn graveur dvd setup.lnk" /a:c /t:"c:\_appsall\imageburn\SetupImgBurn_2.5.7.0.exe"</CommandLine>
<Order>235</Order>
<Description></Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c c:\_util\shortcut\Shortcut.exe /f:"%USERPROFILE%\Desktop\A Faire - ToDo\supprime les peripheriques et redetecte.lnk" /a:c /t:"c:\_drivers\scanfornewhardware.vbs"</CommandLine>
<Order>236</Order>
<Description></Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c "c:\_appsall\vcredist2012upd4\vcredist_x86.exe" /q /norestart</CommandLine>
<Order>237</Order>
<Description>vcredist2012_32</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c "c:\_appsall\vcredist2012upd4\vcredist_x64.exe" /q /norestart</CommandLine>
<Order>238</Order>
<Description>vcredist2012_64</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>C:\Windows\System32\shutdown.exe /r /t 120</CommandLine>
<Order>250</Order>
<Description>restart</Description>
</SynchronousCommand>
</FirstLogonCommands>
<UserAccounts>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<Value></Value>
<PlainText>true</PlainText>
</Password>
<Name>Administrateur</Name>
<Group>Administrators</Group>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<AutoLogon>
<Enabled>true</Enabled>
<Username>Administrateur</Username>
<LogonCount>3</LogonCount>
</AutoLogon>
<RegisteredOrganization>Maison</RegisteredOrganization>
<RegisteredOwner>Maison</RegisteredOwner>
</component>
</settings>
</unattend>
Subscribe to:
Posts (Atom)