[HTA] cmdhlp.hta : adaptateur de l'aide de CMD.EXE
20 réponses
Jean
La conversation d' "hugguy" m'a rappelé qu'il y a quelques lunes
j'avais écrit un HTA (cmdhlp.hta) ,un adaptateur pour l'aide CMD.
Il est compatible Windows 2000 et XP tout langages.
Je n'ai pas encore eu l'occasion de le tester sous Vista pour apporter
des modifications éventuelles ... avec un peu de chance il fonctionnera
tel quel :-) :
<!---8<---CMDHLP.HTA---Jean-JMST-Belgium---8<--->
<script>
/*
Adaptateur pour l'aide CMD de Windows 2000/XP.
Ce fichier doit avoir une extension HTA pour fonctionner
correctement.
Les contenus affichés par ce fichier sont la propriété de
Microsoft® Corporation.
Des fichiers temporaires sont créés et effacés dans le même
répertoire que ce HTA.
L'utilisation de la méthode Exec et de la propriété StdOut
pourrait simplifier ce code et éviter l'utilisation de fichiers
temporaires mais ceci engendre l'apparition courte de
fenêtres CMD.
FSO est utilisé en lieu et place pour le confort visuel ;-)
/*
¤¤¤
Retrouve le répertoire du HTA
¤¤¤
*/
function get_HTA_directory(){
with(location.pathname){
r=lastIndexOf('\\')
return substr(0,r)
}
}
/*
¤¤¤
Construction de la liste des commandes
¤¤¤
*/
function get_commands_list(){
var s,RE,tempfile
tempfile=temp_name(htadir)
WS.Run('cmd.exe /c help > "'+tempfile+'"',0,true)
RE=new RegExp().compile("^[A-Z]{2,}")
with(FSO.OpenTextFile(tempfile)){
while(!AtEndOfStream){
s=ReadLine().split(' ')[0]
if(s!==''&&RE.test(s)){
with(TB0.insertRow().insertCell()){
innerText=s
if(is_internal_command(s)){
style.textDecoration='underline'
}
}
}
}
}
delete_file(tempfile)
}
/*
¤¤¤
Définition du contenu texte
¤¤¤
*/
function set_contents(){
D1.innerHTML=
'UTILISATION :<br>'+
'Cliquer sur un \u00E9l\u00E9ment de la liste pour afficher '+
'l\'aide de la commande dans cette fen\u00EAtre.<br>'+
'Faire un clic droit sur un \u00E9l\u00E9ment de la liste '+
'pour afficher l\'aide de la commande dans une console '+
'CMD.<br>'+
'Double cliquer sur la fen\u00EAtre principale pour copier '+
'son contenu dans le presse-papiers.<br>'+
'Les noms de commandes <u>soulign\u00E9s</u> sont des '+
'commandes <u>internes</u> de CMD, les autres sont des '+
'commandes externes.<br><br>'+
'NOTES :<br>'+
'Des fichiers temporaires sont cr\u00E9\u00E9s et '+
'effac\u00E9s dans le m\u00EAme r\u00E9pertoire que ce HTA.'+
'<br><br>'+
'L\'utilisation de la m\u00E9thode Exec et de la '+
'propri\u00E9t\u00E9 StdOut pourrait simplifier ce code et '+
'\u00E9viter l\'utilisation de fichiers temporaires mais '+
'ceci engendre l\'apparition courte de fen\u00EAtres CMD.<br>'+
'FSO est utilis\u00E9 en lieu et place pour le confort '+
'visuel ;-)<br><br>'+
'*** Compatible Windows 2000 et XP ***<br><br>'+
'Les contenus affich\u00E9s par ce fichier sont la '+
'propri\u00E9t\u00E9 de Microsoft® Corporation.'
D2.innerText='UTILISATION'
}
/*
¤¤¤
Définitions des tailles et positions
¤¤¤
*/
function set_D2_position(){
with(D1){
D2.style.right=(offsetWidth-clientWidth)+'px'
}
}
function set_div_size(){
var maxheight,maxwidth
with(document.body){
maxheight=clientHeight
maxwidth=clientWidth
}
D0.style.height=maxheight+'px'
with(D1.style){
width=(maxwidth-D0.style.pixelWidth)+'px'
height=maxheight+'px'
left=D0.style.pixelWidth
}
setTimeout('set_D2_position()',10)
}
/*
¤¤¤
Définitions des événements
¤¤¤
*/
function window.onresize(){
set_div_size()
}
function D1.ondblclick(){
if(D2.copy){return false}
D2.copy=D2.innerText
copy_to_clipboard(this.innerText)
D2.innerText='Copi\u00E9 dans le presse-papiers'
setTimeout('with(D2){innerText=copy;copy=""}',1200)
}
/*
¤¤¤
Gestion du contenu de l'aide
¤¤¤
*/
function show_help(topic,mode){
var c0,c1,c2,tempfile,windowState,bWaitOnReturn
tempfile=temp_name(htadir)
c0='c'
c1=''
c2='> "'+tempfile+'"'
windowState=0
bWaitOnReturn=true
if(mode){
c0='k'
c1=' title '+topic+'|'
c2=''
windowState=1
bWaitOnReturn=false
}
with(WS){
Environment('PROCESS')('PATH')=sysdir
Run(
'cmd.exe /T:31 /'+c0+c1+' help '+topic+c2,
windowState,
bWaitOnReturn
)
}
with(FSO){
if(FileExists(tempfile)){
D1.innerText=CVT.toUnicode(
OpenTextFile(tempfile).ReadAll(),
codepage
)
delete_file(tempfile)
}
}
D1.busy=''
}
/*
¤¤¤
Retrouve la page de code de la console
¤¤¤
*/
function get_dos_code_page(){
var r,tempfile
tempfile=temp_name(htadir)
WS.Run('cmd.exe /c chcp>"'+tempfile+'"',0,true)
r=FSO.OpenTextFile(tempfile).ReadLine().match(/[0-9]+/)
delete_file(tempfile)
return r
}
/*
¤¤¤
Détecte les commandes internes
¤¤¤
*/
function is_internal_command(cname){
var icom=sysdir+cname
if(FSO.FileExists(icom+'.exe')||FSO.FileExists(icom+'.com')){
return false
}
return true
}
/*
¤¤¤
Efface un fichier temporaire
¤¤¤
*/
function delete_file(filename){
with(FSO){
while(FileExists(filename)){
try{DeleteFile(filename)}catch(e){void true}
}
}
}
/*
¤¤¤
Copie le texte dans le presse-papiers
¤¤¤
*/
function copy_to_clipboard(txttocop){
clipboardData.setData('Text',txttocop)
}
/*
¤¤¤
Nom de fichier temporaire
¤¤¤
*/
function temp_name(directory){
with(FSO){
var r=directory+GetTempName()
while(FileExists(r)){
r=directory+GetTempName()
}
}
return r
}
Ha! Ha! J'adore le pseudo et l'email. Merci pour l'hommage, ça me touche :-)
Jacques
moi
Bonjour,
très très beau ... Chapeau bas ;o)
Je n'ai qu'un regret : La grande famille des commandes "net" est absente de ce florilège... Ceci étant j'imagine bien volontiers que les intégrer suppose un traitement spécial qui ne rien de trivial.
encore bravo,
HB
Bonjour,
très très beau ...
Chapeau bas ;o)
Je n'ai qu'un regret :
La grande famille des commandes "net" est absente de ce florilège...
Ceci étant j'imagine bien volontiers
que les intégrer suppose un traitement spécial
qui ne rien de trivial.
Je n'ai qu'un regret : La grande famille des commandes "net" est absente de ce florilège... Ceci étant j'imagine bien volontiers que les intégrer suppose un traitement spécial qui ne rien de trivial.
encore bravo,
HB
Michel Claveau
Bonjour !
Alors : 1- ça ne voulais pas être méchant ; juste taquin. 2- c'est pas comme ça que mes messages pourront être décomptés ou repérés... 3- car jamais deux sans trois.
-- @-salutations
Michel Claveau
Bonjour !
Alors :
1- ça ne voulais pas être méchant ; juste taquin.
2- c'est pas comme ça que mes messages pourront être décomptés ou
repérés...
3- car jamais deux sans trois.
Alors : 1- ça ne voulais pas être méchant ; juste taquin. 2- c'est pas comme ça que mes messages pourront être décomptés ou repérés... 3- car jamais deux sans trois.
-- @-salutations
Michel Claveau
PowerSulfite
Sous CMD /U /K j'ai fait un help>help.txt
En PJ
Ah là on voit tout :-)
Mais en ANSI (pas grave) ... le commutateur /U n'a d'effet qu'avec des commandes internes. Pour traiter une sortie fichier on peut passer par TYPE.
Amicalement,
-- Jean - JMST Belgium
Sous CMD /U /K j'ai fait un help>help.txt
En PJ
Ah là on voit tout :-)
Mais en ANSI (pas grave) ... le commutateur /U n'a d'effet qu'avec des
commandes internes.
Pour traiter une sortie fichier on peut passer par TYPE.
La logique impose de prendre celle qui fonctionne :-) Donc la 3. Je vais poster la version "Vista compatible" :-)
Amicalement,
-- Jean - JMST Belgium
Jean
Je n'ai qu'un regret : La grande famille des commandes "net" est absente de ce florilège...
Plusieurs autres projets avaient découlés de celui-ci et peut être bien un qui répond à ça. Je regarderai un de ces quatre si il y a dans ceux-ci des choses "distribuables". Je sais qu'il y en avait un qui traitait les autres commandes externes mais qui contrairement à celui-ci ne générait pas la liste des commandes dynamiquement.
Amicalement,
-- Jean - JMST Belgium
Je n'ai qu'un regret :
La grande famille des commandes "net" est absente de ce florilège...
Plusieurs autres projets avaient découlés de celui-ci et peut être bien
un qui répond à ça.
Je regarderai un de ces quatre si il y a dans ceux-ci des choses
"distribuables".
Je sais qu'il y en avait un qui traitait les autres commandes externes
mais qui contrairement à celui-ci ne générait pas la liste des
commandes dynamiquement.
Je n'ai qu'un regret : La grande famille des commandes "net" est absente de ce florilège...
Plusieurs autres projets avaient découlés de celui-ci et peut être bien un qui répond à ça. Je regarderai un de ces quatre si il y a dans ceux-ci des choses "distribuables". Je sais qu'il y en avait un qui traitait les autres commandes externes mais qui contrairement à celui-ci ne générait pas la liste des commandes dynamiquement.
Amicalement,
-- Jean - JMST Belgium
Méta-MCI
Bonjour !
Les "Méga-commandes", comme Net, Netsh, Ftp, Mmc, Fsutil, Wmic, etc. Sont trop complexes, et devraient faire l'objet d'un, ou de plusieurs, article chacune.
De toutes façons, comme l'a dit JCB, presque tous les .EXE peuvent être considérés comme des commandes. Ainsi, dans mon %windir%system32, j'ai 370 .exe (902 avec les sous-répertoires) ; difficile de tous les traiter...
@+
MCI
Bonjour !
Les "Méga-commandes", comme Net, Netsh, Ftp, Mmc, Fsutil, Wmic, etc.
Sont trop complexes, et devraient faire l'objet d'un, ou de plusieurs,
article chacune.
De toutes façons, comme l'a dit JCB, presque tous les .EXE peuvent être
considérés comme des commandes.
Ainsi, dans mon %windir%system32, j'ai 370 .exe (902 avec les
sous-répertoires) ; difficile de tous les traiter...
Les "Méga-commandes", comme Net, Netsh, Ftp, Mmc, Fsutil, Wmic, etc. Sont trop complexes, et devraient faire l'objet d'un, ou de plusieurs, article chacune.
De toutes façons, comme l'a dit JCB, presque tous les .EXE peuvent être considérés comme des commandes. Ainsi, dans mon %windir%system32, j'ai 370 .exe (902 avec les sous-répertoires) ; difficile de tous les traiter...
@+
MCI
Jean
un adaptateur pour l'aide CMD
<!---8<---CMDHLP.HTA---Jean-JMST-Belgium---8<---> <script> /* Adaptateur pour l'aide CMD de Windows 2000/XP/Vista.
Ce fichier doit avoir une extension HTA pour fonctionner correctement.
Les contenus affichés par ce fichier sont la propriété de Microsoft® Corporation.
Des fichiers temporaires sont créés et effacés dans le même répertoire que ce HTA.
L'utilisation de la méthode Exec et de la propriété StdOut pourrait simplifier ce code et éviter l'utilisation de fichiers temporaires mais ceci engendre l'apparition courte de fenêtres CMD. FSO est utilisé en lieu et place pour le confort visuel ;-)
/* ¤¤¤ Retrouve le répertoire du HTA ¤¤¤ */ function get_HTA_directory(){ with(location.pathname){ r=lastIndexOf('') return substr(0,r) } }
/* ¤¤¤ Construction de la liste des commandes ¤¤¤ */ function get_commands_list(){ var s,RE,tempfile tempfile=temp_name(htadir) WS.Run('cmd.exe /c help > "'+tempfile+'"',0,true) RE=new RegExp().compile("^[A-Z]{2,}") with(FSO.OpenTextFile(tempfile)){ while(!AtEndOfStream){ s=ReadLine().split(' ')[0] if(s!==''&&RE.test(s)){ with(TB0.insertRow().insertCell()){ innerText=s if(is_internal_command(s)){ style.textDecoration='underline' } } } } } delete_file(tempfile) }
/* ¤¤¤ Définition du contenu texte ¤¤¤ */ function set_contents(){ D1.innerHTML 'UTILISATION :<br>'+ 'Cliquer sur un u00E9lu00E9ment de la liste pour afficher '+ 'l'aide de la commande dans cette fenu00EAtre.<br>'+ 'Faire un clic droit sur un u00E9lu00E9ment de la liste '+ 'pour afficher l'aide de la commande dans une console '+ 'CMD.<br>'+ 'Double cliquer sur la fenu00EAtre principale pour copier '+ 'son contenu dans le presse-papiers.<br>'+ 'Les noms de commandes <u>soulignu00E9s</u> sont des '+ 'commandes <u>internes</u> de CMD, les autres sont des '+ 'commandes externes.<br><br>'+ 'NOTES :<br>'+ 'Des fichiers temporaires sont cru00E9u00E9s et '+ 'effacu00E9s dans le mu00EAme ru00E9pertoire que ce HTA.'+ '<br><br>'+ 'L'utilisation de la mu00E9thode Exec et de la '+ 'propriu00E9tu00E9 StdOut pourrait simplifier ce code et '+ 'u00E9viter l'utilisation de fichiers temporaires mais '+ 'ceci engendre l'apparition courte de fenu00EAtres CMD.<br>'+ 'FSO est utilisu00E9 en lieu et place pour le confort '+ 'visuel ;-)<br><br>'+ '<u>*** Compatible Windows 2000, XP et Vista ***</u><br><br>'+ 'Les contenus affichu00E9s par ce fichier sont la '+ 'propriu00E9tu00E9 de Microsoft® Corporation.'
D2.innerText='UTILISATION' }
/* ¤¤¤ Définitions des tailles et positions ¤¤¤ */ function set_D2_position(){ with(D1){ D2.style.right=(offsetWidth-clientWidth)+'px' } }
function set_div_size(){ var maxheight,maxwidth with(document.body){ maxheight=clientHeight maxwidth=clientWidth } D0.style.height=maxheight+'px' with(D1.style){ width=(maxwidth-D0.style.pixelWidth)+'px' height=maxheight+'px' leftÐ.style.pixelWidth } setTimeout('set_D2_position()',10) }
/* ¤¤¤ Définitions des événements ¤¤¤ */ function window.onresize(){ set_div_size() }
function D1.ondblclick(){ if(D2.copy){return false} D2.copyÒ.innerText copy_to_clipboard(this.innerText) D2.innerText='Copiu00E9 dans le presse-papiers' setTimeout('with(D2){innerText=copy;copy=""}',1200) }
/* ¤¤¤ Gestion du contenu de l'aide ¤¤¤ */ function show_help(topic,mode){ var c0,c1,c2,tempfile,windowState,bWaitOnReturn tempfile=temp_name(htadir) c0='c' c1='' c2='> "'+tempfile+'"' windowState=0 bWaitOnReturn=true if(mode){ c0='k' c1=' title '+topic+'|' c2='' windowState=1 bWaitOnReturnúlse } WS.Run( 'cmd.exe /T:31 /'+c0+c1+' help '+topic+c2, windowState, bWaitOnReturn ) with(FSO){ if(FileExists(tempfile)){ D1.innerText=CVT.toUnicode( OpenTextFile(tempfile).ReadAll(), codepage ) delete_file(tempfile) } } D1.busy='' }
/* ¤¤¤ Retrouve la page de code de la console ¤¤¤ */ function get_dos_code_page(){ var r,tempfile tempfile=temp_name(htadir) WS.Run('cmd.exe /c chcp>"'+tempfile+'"',0,true) r=FSO.OpenTextFile(tempfile).ReadLine().match(/[0-9]+/) delete_file(tempfile) return r }
/* ¤¤¤ Détecte les commandes internes ¤¤¤ */ function is_internal_command(cname){ var icom=sysdir+cname if(FSO.FileExists(icom+'.exe')||FSO.FileExists(icom+'.com')){ return false } return true }
/* ¤¤¤ Efface un fichier temporaire ¤¤¤ */ function delete_file(filename){ with(FSO){ while(FileExists(filename)){ try{DeleteFile(filename)}catch(e){void true} } } }
/* ¤¤¤ Copie le texte dans le presse-papiers ¤¤¤ */ function copy_to_clipboard(txttocop){ clipboardData.setData('Text',txttocop) }
/* ¤¤¤ Nom de fichier temporaire ¤¤¤ */ function temp_name(directory){ with(FSO){ var r=directory+GetTempName() while(FileExists(r)){ r=directory+GetTempName() } } return r }
</script>
<!---8<---CMDHLP.HTA---Jean-JMST-Belgium---8<--->
-- Jean - JMST Belgium
un adaptateur pour l'aide CMD
<!---8<---CMDHLP.HTA---Jean-JMST-Belgium---8<--->
<script>
/*
Adaptateur pour l'aide CMD de Windows 2000/XP/Vista.
Ce fichier doit avoir une extension HTA pour fonctionner
correctement.
Les contenus affichés par ce fichier sont la propriété de
Microsoft® Corporation.
Des fichiers temporaires sont créés et effacés dans le même
répertoire que ce HTA.
L'utilisation de la méthode Exec et de la propriété StdOut
pourrait simplifier ce code et éviter l'utilisation de fichiers
temporaires mais ceci engendre l'apparition courte de
fenêtres CMD.
FSO est utilisé en lieu et place pour le confort visuel ;-)
/*
¤¤¤
Retrouve le répertoire du HTA
¤¤¤
*/
function get_HTA_directory(){
with(location.pathname){
r=lastIndexOf('\')
return substr(0,r)
}
}
/*
¤¤¤
Construction de la liste des commandes
¤¤¤
*/
function get_commands_list(){
var s,RE,tempfile
tempfile=temp_name(htadir)
WS.Run('cmd.exe /c help > "'+tempfile+'"',0,true)
RE=new RegExp().compile("^[A-Z]{2,}")
with(FSO.OpenTextFile(tempfile)){
while(!AtEndOfStream){
s=ReadLine().split(' ')[0]
if(s!==''&&RE.test(s)){
with(TB0.insertRow().insertCell()){
innerText=s
if(is_internal_command(s)){
style.textDecoration='underline'
}
}
}
}
}
delete_file(tempfile)
}
/*
¤¤¤
Définition du contenu texte
¤¤¤
*/
function set_contents(){
D1.innerHTML 'UTILISATION :<br>'+
'Cliquer sur un u00E9lu00E9ment de la liste pour afficher '+
'l'aide de la commande dans cette fenu00EAtre.<br>'+
'Faire un clic droit sur un u00E9lu00E9ment de la liste '+
'pour afficher l'aide de la commande dans une console '+
'CMD.<br>'+
'Double cliquer sur la fenu00EAtre principale pour copier '+
'son contenu dans le presse-papiers.<br>'+
'Les noms de commandes <u>soulignu00E9s</u> sont des '+
'commandes <u>internes</u> de CMD, les autres sont des '+
'commandes externes.<br><br>'+
'NOTES :<br>'+
'Des fichiers temporaires sont cru00E9u00E9s et '+
'effacu00E9s dans le mu00EAme ru00E9pertoire que ce HTA.'+
'<br><br>'+
'L'utilisation de la mu00E9thode Exec et de la '+
'propriu00E9tu00E9 StdOut pourrait simplifier ce code et '+
'u00E9viter l'utilisation de fichiers temporaires mais '+
'ceci engendre l'apparition courte de fenu00EAtres CMD.<br>'+
'FSO est utilisu00E9 en lieu et place pour le confort '+
'visuel ;-)<br><br>'+
'<u>*** Compatible Windows 2000, XP et Vista ***</u><br><br>'+
'Les contenus affichu00E9s par ce fichier sont la '+
'propriu00E9tu00E9 de Microsoft® Corporation.'
D2.innerText='UTILISATION'
}
/*
¤¤¤
Définitions des tailles et positions
¤¤¤
*/
function set_D2_position(){
with(D1){
D2.style.right=(offsetWidth-clientWidth)+'px'
}
}
function set_div_size(){
var maxheight,maxwidth
with(document.body){
maxheight=clientHeight
maxwidth=clientWidth
}
D0.style.height=maxheight+'px'
with(D1.style){
width=(maxwidth-D0.style.pixelWidth)+'px'
height=maxheight+'px'
leftÐ.style.pixelWidth
}
setTimeout('set_D2_position()',10)
}
/*
¤¤¤
Définitions des événements
¤¤¤
*/
function window.onresize(){
set_div_size()
}
function D1.ondblclick(){
if(D2.copy){return false}
D2.copyÒ.innerText
copy_to_clipboard(this.innerText)
D2.innerText='Copiu00E9 dans le presse-papiers'
setTimeout('with(D2){innerText=copy;copy=""}',1200)
}
/*
¤¤¤
Gestion du contenu de l'aide
¤¤¤
*/
function show_help(topic,mode){
var c0,c1,c2,tempfile,windowState,bWaitOnReturn
tempfile=temp_name(htadir)
c0='c'
c1=''
c2='> "'+tempfile+'"'
windowState=0
bWaitOnReturn=true
if(mode){
c0='k'
c1=' title '+topic+'|'
c2=''
windowState=1
bWaitOnReturnúlse
}
WS.Run(
'cmd.exe /T:31 /'+c0+c1+' help '+topic+c2,
windowState,
bWaitOnReturn
)
with(FSO){
if(FileExists(tempfile)){
D1.innerText=CVT.toUnicode(
OpenTextFile(tempfile).ReadAll(),
codepage
)
delete_file(tempfile)
}
}
D1.busy=''
}
/*
¤¤¤
Retrouve la page de code de la console
¤¤¤
*/
function get_dos_code_page(){
var r,tempfile
tempfile=temp_name(htadir)
WS.Run('cmd.exe /c chcp>"'+tempfile+'"',0,true)
r=FSO.OpenTextFile(tempfile).ReadLine().match(/[0-9]+/)
delete_file(tempfile)
return r
}
/*
¤¤¤
Détecte les commandes internes
¤¤¤
*/
function is_internal_command(cname){
var icom=sysdir+cname
if(FSO.FileExists(icom+'.exe')||FSO.FileExists(icom+'.com')){
return false
}
return true
}
/*
¤¤¤
Efface un fichier temporaire
¤¤¤
*/
function delete_file(filename){
with(FSO){
while(FileExists(filename)){
try{DeleteFile(filename)}catch(e){void true}
}
}
}
/*
¤¤¤
Copie le texte dans le presse-papiers
¤¤¤
*/
function copy_to_clipboard(txttocop){
clipboardData.setData('Text',txttocop)
}
/*
¤¤¤
Nom de fichier temporaire
¤¤¤
*/
function temp_name(directory){
with(FSO){
var r=directory+GetTempName()
while(FileExists(r)){
r=directory+GetTempName()
}
}
return r
}
<!---8<---CMDHLP.HTA---Jean-JMST-Belgium---8<---> <script> /* Adaptateur pour l'aide CMD de Windows 2000/XP/Vista.
Ce fichier doit avoir une extension HTA pour fonctionner correctement.
Les contenus affichés par ce fichier sont la propriété de Microsoft® Corporation.
Des fichiers temporaires sont créés et effacés dans le même répertoire que ce HTA.
L'utilisation de la méthode Exec et de la propriété StdOut pourrait simplifier ce code et éviter l'utilisation de fichiers temporaires mais ceci engendre l'apparition courte de fenêtres CMD. FSO est utilisé en lieu et place pour le confort visuel ;-)
/* ¤¤¤ Retrouve le répertoire du HTA ¤¤¤ */ function get_HTA_directory(){ with(location.pathname){ r=lastIndexOf('') return substr(0,r) } }
/* ¤¤¤ Construction de la liste des commandes ¤¤¤ */ function get_commands_list(){ var s,RE,tempfile tempfile=temp_name(htadir) WS.Run('cmd.exe /c help > "'+tempfile+'"',0,true) RE=new RegExp().compile("^[A-Z]{2,}") with(FSO.OpenTextFile(tempfile)){ while(!AtEndOfStream){ s=ReadLine().split(' ')[0] if(s!==''&&RE.test(s)){ with(TB0.insertRow().insertCell()){ innerText=s if(is_internal_command(s)){ style.textDecoration='underline' } } } } } delete_file(tempfile) }
/* ¤¤¤ Définition du contenu texte ¤¤¤ */ function set_contents(){ D1.innerHTML 'UTILISATION :<br>'+ 'Cliquer sur un u00E9lu00E9ment de la liste pour afficher '+ 'l'aide de la commande dans cette fenu00EAtre.<br>'+ 'Faire un clic droit sur un u00E9lu00E9ment de la liste '+ 'pour afficher l'aide de la commande dans une console '+ 'CMD.<br>'+ 'Double cliquer sur la fenu00EAtre principale pour copier '+ 'son contenu dans le presse-papiers.<br>'+ 'Les noms de commandes <u>soulignu00E9s</u> sont des '+ 'commandes <u>internes</u> de CMD, les autres sont des '+ 'commandes externes.<br><br>'+ 'NOTES :<br>'+ 'Des fichiers temporaires sont cru00E9u00E9s et '+ 'effacu00E9s dans le mu00EAme ru00E9pertoire que ce HTA.'+ '<br><br>'+ 'L'utilisation de la mu00E9thode Exec et de la '+ 'propriu00E9tu00E9 StdOut pourrait simplifier ce code et '+ 'u00E9viter l'utilisation de fichiers temporaires mais '+ 'ceci engendre l'apparition courte de fenu00EAtres CMD.<br>'+ 'FSO est utilisu00E9 en lieu et place pour le confort '+ 'visuel ;-)<br><br>'+ '<u>*** Compatible Windows 2000, XP et Vista ***</u><br><br>'+ 'Les contenus affichu00E9s par ce fichier sont la '+ 'propriu00E9tu00E9 de Microsoft® Corporation.'
D2.innerText='UTILISATION' }
/* ¤¤¤ Définitions des tailles et positions ¤¤¤ */ function set_D2_position(){ with(D1){ D2.style.right=(offsetWidth-clientWidth)+'px' } }
function set_div_size(){ var maxheight,maxwidth with(document.body){ maxheight=clientHeight maxwidth=clientWidth } D0.style.height=maxheight+'px' with(D1.style){ width=(maxwidth-D0.style.pixelWidth)+'px' height=maxheight+'px' leftÐ.style.pixelWidth } setTimeout('set_D2_position()',10) }
/* ¤¤¤ Définitions des événements ¤¤¤ */ function window.onresize(){ set_div_size() }
function D1.ondblclick(){ if(D2.copy){return false} D2.copyÒ.innerText copy_to_clipboard(this.innerText) D2.innerText='Copiu00E9 dans le presse-papiers' setTimeout('with(D2){innerText=copy;copy=""}',1200) }
/* ¤¤¤ Gestion du contenu de l'aide ¤¤¤ */ function show_help(topic,mode){ var c0,c1,c2,tempfile,windowState,bWaitOnReturn tempfile=temp_name(htadir) c0='c' c1='' c2='> "'+tempfile+'"' windowState=0 bWaitOnReturn=true if(mode){ c0='k' c1=' title '+topic+'|' c2='' windowState=1 bWaitOnReturnúlse } WS.Run( 'cmd.exe /T:31 /'+c0+c1+' help '+topic+c2, windowState, bWaitOnReturn ) with(FSO){ if(FileExists(tempfile)){ D1.innerText=CVT.toUnicode( OpenTextFile(tempfile).ReadAll(), codepage ) delete_file(tempfile) } } D1.busy='' }
/* ¤¤¤ Retrouve la page de code de la console ¤¤¤ */ function get_dos_code_page(){ var r,tempfile tempfile=temp_name(htadir) WS.Run('cmd.exe /c chcp>"'+tempfile+'"',0,true) r=FSO.OpenTextFile(tempfile).ReadLine().match(/[0-9]+/) delete_file(tempfile) return r }
/* ¤¤¤ Détecte les commandes internes ¤¤¤ */ function is_internal_command(cname){ var icom=sysdir+cname if(FSO.FileExists(icom+'.exe')||FSO.FileExists(icom+'.com')){ return false } return true }
/* ¤¤¤ Efface un fichier temporaire ¤¤¤ */ function delete_file(filename){ with(FSO){ while(FileExists(filename)){ try{DeleteFile(filename)}catch(e){void true} } } }
/* ¤¤¤ Copie le texte dans le presse-papiers ¤¤¤ */ function copy_to_clipboard(txttocop){ clipboardData.setData('Text',txttocop) }
/* ¤¤¤ Nom de fichier temporaire ¤¤¤ */ function temp_name(directory){ with(FSO){ var r=directory+GetTempName() while(FileExists(r)){ r=directory+GetTempName() } } return r }
</script>
<!---8<---CMDHLP.HTA---Jean-JMST-Belgium---8<--->
-- Jean - JMST Belgium
Jean
Je sais qu'il y en avait un qui traitait les autres commandes externes
J'ai retrouvé celui-là (COMMANDSHLP.HTA), à l'état de brouillon, poussiéreux, en cours d'expérimentation, donc ... Mais cliquable :-)
Le principe est d'utiliser des listes d'exécutables qui se différencient par la façon dont ces exécutables affichent leur aide.
<!---8<---COMMANDSHLP.HTA---Jean-JMST-Belgium---8<---> <script> /* THIS IS A DRAFT SCRIPT
A wrapper for console's externals commands help of Windows XP/2000. This file must have an HTA extension to work properly.
Contents displayed by this document are property of Microsoft® Corporation.
Temporaries files are used (created and deleted) in the same directory than the HTA file.
The use of Exec method and StdOut property could greatly simplify this code and avoid the use of a temporaries files but unfortunately with CMD windows flashing. FSO is used instead for visual comfort ;-)
Version 1.8 */
/* TECHNICAL COMMENTS
[help switches] Help of files concerned here can be get by several ways : - using a /? switch - using a -? switch - running the command without switches or arguments
Some files accept several of those ways (even if not present in their help content :-) or other (ie : -h).
[help output] Some files show their help only if a bad parameter is passed. In this case, to get the output you need to get the StdErr output. For example the FTP.EXE command : If you type FTP -* in a console window, FTP.EXE shows it's help because -* isn't recognized and so the command returns the StdErr output stream.
[help localization] Some files are English on localized Windows versions. As for those files help is in English they don't need to be Unicode converted.
[output localization] This script uses the toUnicode method of OlePrn.OleCvt object to convert a ANSI output in Unicode. For internals commands the /U switch of CDM.EXE can be used instead. For example to output a DIR internal command in Unicode: cmd /C echo dir|cmd /U >output.txt The /A switch can be used to output as ANSI. */
/* ¤¤¤Function building the list of commands names¤¤¤ */ function get_commands_list(){ var list=( list_1+','+list_2+','+list_3+','+list_4+','+list_5+','+ list_6+','+list_7+','+list_8+','+list_9+','+list_10 ).split(',') list.sort() for(i=0;i<list.length;i++){ with(TB0.insertRow().insertCell()){ innerText=list[i] if(!FSO.FileExists(system32+list[i])){style.color=unexists_color} } } }
/* ¤¤¤Function determining in which list is a command name¤¤¤ */ function is_in_list(topic){ for(j=1;j<11;j++){ eval('var r=list_'+j+'.split(',')') for(i=0;i<r.length;i++){ if(r[i].toUpperCase()==topic.toUpperCase()){return j} } } return false }
/* ¤¤¤Function getting help content¤¤¤ */ function show_help(topic,mode){ var c0,c1,c2,uni,box var tempfile=temp_name(htadir) var c3='> "'+tempfile+'"'+' 2>&1' switch(is_in_list(topic)){ case 1: c2=' /?' break case 2: uni=true c2=' /?' break case 3: uni=true c2=' /?' break case 4: c2=' -?' break case 5: uni=true c2=' -?' break case 6: c2=' ' break case 7: c2=' ' break case 8: c2=' -?' break case 9: box=true break case 10: c2=' ' mode=true D1.innerText='No Output' break default: D1.busy='' return '' } if(box){ c2=' /?' D1.innerText='Dialog Box' WS.Run(topic+c2) D1.busy='' return '' } c0='c' c1=' ' var windowState=0 var bWaitOnReturn=true if(mode){ c0='k' c1=' title '+topic+'|' c3='' windowState=1 bWaitOnReturnúlse } WS.Run('cmd /T:31 /'+c0+c1+topic+c2+c3,windowState,bWaitOnReturn) with(FSO){ if(FileExists(tempfile)){ var text=OpenTextFile(tempfile).ReadAll() if(!uni){text=CVT.toUnicode(text,codepage)} D1.innerText=text delete_file(tempfile) } } D1.busy='' }
/* ¤¤¤Function getting the HTA directory¤¤¤ */ function get_HTA_directory(){ with(location.pathname){ var r=lastIndexOf('') return substr(0,r) } }
/* ¤¤¤Function used to get current DOS code page¤¤¤ */ function get_dos_code_page(){ tempfile=temp_name(htadir) WS.Run('cmd /c chcp>"'+tempfile+'"',0,true) var r=FSO.OpenTextFile(tempfile).ReadLine().match(/[0-9]+/) delete_file(tempfile) return r }
/* ¤¤¤Function used to delete the temporary file¤¤¤ */ function delete_file(filename){ with(FSO){ while(FileExists(filename)){ try{DeleteFile(filename)}catch(e){void true} } } }
/* ¤¤¤Function to copy text to clipboard¤¤¤ */ function copy_to_clipboard(txttocop){ clipboardData.setData('Text',txttocop) }
/* ¤¤¤Function to get temporaries files names¤¤¤ */ function temp_name(directory){ with(FSO){ var r=directory+GetTempName() while(FileExists(r)){ var r=directory+GetTempName() } } return r }
function D1.ondblclick(){ if(D2.copy){return false} D2.copyÒ.innerText copy_to_clipboard(this.innerText) D2.innerText='Copied to clipboard' setTimeout('with(D2){innerText=copy;copy=""}',1200) }
/* ¤¤¤Function executing NTCMDS.HTM file¤¤¤ */ function execute_help(){ with(FSO){ if(FileExists(windir+'helpntcmds.chm')){ WS.Run('hh ntcmds.chm::/ntcmds.htm') return '' } alert('File NTCMDS.CHM not found in HELP dir') } }
/* ¤¤¤Function setting initial DIV text content¤¤¤ */ function set_contents(){ D1.innerHTML 'HELP :<br>'+ 'Click a topic in the left listing to show help in this '+ 'window<br>'+ 'Right-click a topic to show help in a console window<br>'+ 'Double-click an article content to copy it to the clipboard'+ '<br><br>'+ 'Topics appearing in <font color='+unexists_color+'>'+ unexists_color+ '</font> means the file isn't present on your system<br>'+ 'or concerns another Windows version than yours.<br><br>'+ 'NOTES :<br>'+ 'Additionnal externals commands help information can be '+ 'found here : <br>'+ ' <a href=http://www.microsoft.com/technet/prodtechnol/'+ 'winxppro/proddocs/ntcmds_o.asp>http://www.microsoft.com/'+ 'technet/prodtechnol/winxppro/proddocs/ntcmds_o.asp</a><br>'+ 'or by running the following command :<br>'+ ' <a href='' onclick=event.returnValueúlse;'+ 'execute_help()>hh ntcmds.chm::/ntcmds.htm</a><br><br>'+ 'Temporaries files are used (created and deleted) in the '+ 'same directory than the HTA file.<br><br>'+ 'The use of Exec method and StdOut property could greatly '+ 'simplify this code and<br>'+ 'avoid the use of a temporaries files but unfortunately with '+ 'CMD windows flashing.<br>'+ 'FSO is used instead (when possible) for visual comfort ;-)'+ '<br><br>'+ 'TECNHICAL COMMENTS : See in the source file content.'
Je sais qu'il y en avait un qui traitait les autres commandes externes
J'ai retrouvé celui-là (COMMANDSHLP.HTA), à l'état de brouillon,
poussiéreux, en cours d'expérimentation, donc ...
Mais cliquable :-)
Le principe est d'utiliser des listes d'exécutables qui se
différencient par la façon dont ces exécutables affichent leur aide.
<!---8<---COMMANDSHLP.HTA---Jean-JMST-Belgium---8<--->
<script>
/*
THIS IS A DRAFT SCRIPT
A wrapper for console's externals commands help of Windows XP/2000.
This file must have an HTA extension to work properly.
Contents displayed by this document are property of
Microsoft® Corporation.
Temporaries files are used (created and deleted) in the same
directory than the HTA file.
The use of Exec method and StdOut property could greatly simplify
this code and avoid the use of a temporaries files but
unfortunately with CMD windows flashing.
FSO is used instead for visual comfort ;-)
Version 1.8
*/
/*
TECHNICAL COMMENTS
[help switches]
Help of files concerned here can be get by several ways :
- using a /? switch
- using a -? switch
- running the command without switches or arguments
Some files accept several of those ways (even if not present
in their help content :-) or other (ie : -h).
[help output]
Some files show their help only if a bad parameter is passed.
In this case, to get the output you need to get the StdErr
output.
For example the FTP.EXE command :
If you type
FTP -*
in a console window, FTP.EXE shows it's help because
-* isn't recognized and so the command returns the StdErr
output stream.
[help localization]
Some files are English on localized Windows versions.
As for those files help is in English they don't
need to be Unicode converted.
[output localization]
This script uses the toUnicode method of OlePrn.OleCvt object
to convert a ANSI output in Unicode.
For internals commands the /U switch of CDM.EXE
can be used instead.
For example to output a DIR internal command in Unicode:
cmd /C echo dir|cmd /U >output.txt
The /A switch can be used to output as ANSI.
*/
/*
¤¤¤Function building the list of commands names¤¤¤
*/
function get_commands_list(){
var list=(
list_1+','+list_2+','+list_3+','+list_4+','+list_5+','+
list_6+','+list_7+','+list_8+','+list_9+','+list_10
).split(',')
list.sort()
for(i=0;i<list.length;i++){
with(TB0.insertRow().insertCell()){
innerText=list[i]
if(!FSO.FileExists(system32+list[i])){style.color=unexists_color}
}
}
}
/*
¤¤¤Function determining in which list is a command name¤¤¤
*/
function is_in_list(topic){
for(j=1;j<11;j++){
eval('var r=list_'+j+'.split(',')')
for(i=0;i<r.length;i++){
if(r[i].toUpperCase()==topic.toUpperCase()){return j}
}
}
return false
}
/*
¤¤¤Function getting help content¤¤¤
*/
function show_help(topic,mode){
var c0,c1,c2,uni,box
var tempfile=temp_name(htadir)
var c3='> "'+tempfile+'"'+' 2>&1'
switch(is_in_list(topic)){
case 1:
c2=' /?'
break
case 2:
uni=true
c2=' /?'
break
case 3:
uni=true
c2=' /?'
break
case 4:
c2=' -?'
break
case 5:
uni=true
c2=' -?'
break
case 6:
c2=' '
break
case 7:
c2=' '
break
case 8:
c2=' -?'
break
case 9:
box=true
break
case 10:
c2=' '
mode=true
D1.innerText='No Output'
break
default:
D1.busy=''
return ''
}
if(box){
c2=' /?'
D1.innerText='Dialog Box'
WS.Run(topic+c2)
D1.busy=''
return ''
}
c0='c'
c1=' '
var windowState=0
var bWaitOnReturn=true
if(mode){
c0='k'
c1=' title '+topic+'|'
c3=''
windowState=1
bWaitOnReturnúlse
}
WS.Run('cmd /T:31 /'+c0+c1+topic+c2+c3,windowState,bWaitOnReturn)
with(FSO){
if(FileExists(tempfile)){
var text=OpenTextFile(tempfile).ReadAll()
if(!uni){text=CVT.toUnicode(text,codepage)}
D1.innerText=text
delete_file(tempfile)
}
}
D1.busy=''
}
/*
¤¤¤Function getting the HTA directory¤¤¤
*/
function get_HTA_directory(){
with(location.pathname){
var r=lastIndexOf('\')
return substr(0,r)
}
}
/*
¤¤¤Function used to get current DOS code page¤¤¤
*/
function get_dos_code_page(){
tempfile=temp_name(htadir)
WS.Run('cmd /c chcp>"'+tempfile+'"',0,true)
var r=FSO.OpenTextFile(tempfile).ReadLine().match(/[0-9]+/)
delete_file(tempfile)
return r
}
/*
¤¤¤Function used to delete the temporary file¤¤¤
*/
function delete_file(filename){
with(FSO){
while(FileExists(filename)){
try{DeleteFile(filename)}catch(e){void true}
}
}
}
/*
¤¤¤Function to copy text to clipboard¤¤¤
*/
function copy_to_clipboard(txttocop){
clipboardData.setData('Text',txttocop)
}
/*
¤¤¤Function to get temporaries files names¤¤¤
*/
function temp_name(directory){
with(FSO){
var r=directory+GetTempName()
while(FileExists(r)){
var r=directory+GetTempName()
}
}
return r
}
function D1.ondblclick(){
if(D2.copy){return false}
D2.copyÒ.innerText
copy_to_clipboard(this.innerText)
D2.innerText='Copied to clipboard'
setTimeout('with(D2){innerText=copy;copy=""}',1200)
}
/*
¤¤¤Function executing NTCMDS.HTM file¤¤¤
*/
function execute_help(){
with(FSO){
if(FileExists(windir+'\help\ntcmds.chm')){
WS.Run('hh ntcmds.chm::/ntcmds.htm')
return ''
}
alert('File NTCMDS.CHM not found in HELP dir')
}
}
/*
¤¤¤Function setting initial DIV text content¤¤¤
*/
function set_contents(){
D1.innerHTML 'HELP :<br>'+
'Click a topic in the left listing to show help in this '+
'window<br>'+
'Right-click a topic to show help in a console window<br>'+
'Double-click an article content to copy it to the clipboard'+
'<br><br>'+
'Topics appearing in <font color='+unexists_color+'>'+
unexists_color+
'</font> means the file isn't present on your system<br>'+
'or concerns another Windows version than yours.<br><br>'+
'NOTES :<br>'+
'Additionnal externals commands help information can be '+
'found here : <br>'+
' <a href=http://www.microsoft.com/technet/prodtechnol/'+
'winxppro/proddocs/ntcmds_o.asp>http://www.microsoft.com/'+
'technet/prodtechnol/winxppro/proddocs/ntcmds_o.asp</a><br>'+
'or by running the following command :<br>'+
' <a href='' onclick=event.returnValueúlse;'+
'execute_help()>hh ntcmds.chm::/ntcmds.htm</a><br><br>'+
'Temporaries files are used (created and deleted) in the '+
'same directory than the HTA file.<br><br>'+
'The use of Exec method and StdOut property could greatly '+
'simplify this code and<br>'+
'avoid the use of a temporaries files but unfortunately with '+
'CMD windows flashing.<br>'+
'FSO is used instead (when possible) for visual comfort ;-)'+
'<br><br>'+
'TECNHICAL COMMENTS : See in the source file content.'
Je sais qu'il y en avait un qui traitait les autres commandes externes
J'ai retrouvé celui-là (COMMANDSHLP.HTA), à l'état de brouillon, poussiéreux, en cours d'expérimentation, donc ... Mais cliquable :-)
Le principe est d'utiliser des listes d'exécutables qui se différencient par la façon dont ces exécutables affichent leur aide.
<!---8<---COMMANDSHLP.HTA---Jean-JMST-Belgium---8<---> <script> /* THIS IS A DRAFT SCRIPT
A wrapper for console's externals commands help of Windows XP/2000. This file must have an HTA extension to work properly.
Contents displayed by this document are property of Microsoft® Corporation.
Temporaries files are used (created and deleted) in the same directory than the HTA file.
The use of Exec method and StdOut property could greatly simplify this code and avoid the use of a temporaries files but unfortunately with CMD windows flashing. FSO is used instead for visual comfort ;-)
Version 1.8 */
/* TECHNICAL COMMENTS
[help switches] Help of files concerned here can be get by several ways : - using a /? switch - using a -? switch - running the command without switches or arguments
Some files accept several of those ways (even if not present in their help content :-) or other (ie : -h).
[help output] Some files show their help only if a bad parameter is passed. In this case, to get the output you need to get the StdErr output. For example the FTP.EXE command : If you type FTP -* in a console window, FTP.EXE shows it's help because -* isn't recognized and so the command returns the StdErr output stream.
[help localization] Some files are English on localized Windows versions. As for those files help is in English they don't need to be Unicode converted.
[output localization] This script uses the toUnicode method of OlePrn.OleCvt object to convert a ANSI output in Unicode. For internals commands the /U switch of CDM.EXE can be used instead. For example to output a DIR internal command in Unicode: cmd /C echo dir|cmd /U >output.txt The /A switch can be used to output as ANSI. */
/* ¤¤¤Function building the list of commands names¤¤¤ */ function get_commands_list(){ var list=( list_1+','+list_2+','+list_3+','+list_4+','+list_5+','+ list_6+','+list_7+','+list_8+','+list_9+','+list_10 ).split(',') list.sort() for(i=0;i<list.length;i++){ with(TB0.insertRow().insertCell()){ innerText=list[i] if(!FSO.FileExists(system32+list[i])){style.color=unexists_color} } } }
/* ¤¤¤Function determining in which list is a command name¤¤¤ */ function is_in_list(topic){ for(j=1;j<11;j++){ eval('var r=list_'+j+'.split(',')') for(i=0;i<r.length;i++){ if(r[i].toUpperCase()==topic.toUpperCase()){return j} } } return false }
/* ¤¤¤Function getting help content¤¤¤ */ function show_help(topic,mode){ var c0,c1,c2,uni,box var tempfile=temp_name(htadir) var c3='> "'+tempfile+'"'+' 2>&1' switch(is_in_list(topic)){ case 1: c2=' /?' break case 2: uni=true c2=' /?' break case 3: uni=true c2=' /?' break case 4: c2=' -?' break case 5: uni=true c2=' -?' break case 6: c2=' ' break case 7: c2=' ' break case 8: c2=' -?' break case 9: box=true break case 10: c2=' ' mode=true D1.innerText='No Output' break default: D1.busy='' return '' } if(box){ c2=' /?' D1.innerText='Dialog Box' WS.Run(topic+c2) D1.busy='' return '' } c0='c' c1=' ' var windowState=0 var bWaitOnReturn=true if(mode){ c0='k' c1=' title '+topic+'|' c3='' windowState=1 bWaitOnReturnúlse } WS.Run('cmd /T:31 /'+c0+c1+topic+c2+c3,windowState,bWaitOnReturn) with(FSO){ if(FileExists(tempfile)){ var text=OpenTextFile(tempfile).ReadAll() if(!uni){text=CVT.toUnicode(text,codepage)} D1.innerText=text delete_file(tempfile) } } D1.busy='' }
/* ¤¤¤Function getting the HTA directory¤¤¤ */ function get_HTA_directory(){ with(location.pathname){ var r=lastIndexOf('') return substr(0,r) } }
/* ¤¤¤Function used to get current DOS code page¤¤¤ */ function get_dos_code_page(){ tempfile=temp_name(htadir) WS.Run('cmd /c chcp>"'+tempfile+'"',0,true) var r=FSO.OpenTextFile(tempfile).ReadLine().match(/[0-9]+/) delete_file(tempfile) return r }
/* ¤¤¤Function used to delete the temporary file¤¤¤ */ function delete_file(filename){ with(FSO){ while(FileExists(filename)){ try{DeleteFile(filename)}catch(e){void true} } } }
/* ¤¤¤Function to copy text to clipboard¤¤¤ */ function copy_to_clipboard(txttocop){ clipboardData.setData('Text',txttocop) }
/* ¤¤¤Function to get temporaries files names¤¤¤ */ function temp_name(directory){ with(FSO){ var r=directory+GetTempName() while(FileExists(r)){ var r=directory+GetTempName() } } return r }
function D1.ondblclick(){ if(D2.copy){return false} D2.copyÒ.innerText copy_to_clipboard(this.innerText) D2.innerText='Copied to clipboard' setTimeout('with(D2){innerText=copy;copy=""}',1200) }
/* ¤¤¤Function executing NTCMDS.HTM file¤¤¤ */ function execute_help(){ with(FSO){ if(FileExists(windir+'helpntcmds.chm')){ WS.Run('hh ntcmds.chm::/ntcmds.htm') return '' } alert('File NTCMDS.CHM not found in HELP dir') } }
/* ¤¤¤Function setting initial DIV text content¤¤¤ */ function set_contents(){ D1.innerHTML 'HELP :<br>'+ 'Click a topic in the left listing to show help in this '+ 'window<br>'+ 'Right-click a topic to show help in a console window<br>'+ 'Double-click an article content to copy it to the clipboard'+ '<br><br>'+ 'Topics appearing in <font color='+unexists_color+'>'+ unexists_color+ '</font> means the file isn't present on your system<br>'+ 'or concerns another Windows version than yours.<br><br>'+ 'NOTES :<br>'+ 'Additionnal externals commands help information can be '+ 'found here : <br>'+ ' <a href=http://www.microsoft.com/technet/prodtechnol/'+ 'winxppro/proddocs/ntcmds_o.asp>http://www.microsoft.com/'+ 'technet/prodtechnol/winxppro/proddocs/ntcmds_o.asp</a><br>'+ 'or by running the following command :<br>'+ ' <a href='' onclick=event.returnValueúlse;'+ 'execute_help()>hh ntcmds.chm::/ntcmds.htm</a><br><br>'+ 'Temporaries files are used (created and deleted) in the '+ 'same directory than the HTA file.<br><br>'+ 'The use of Exec method and StdOut property could greatly '+ 'simplify this code and<br>'+ 'avoid the use of a temporaries files but unfortunately with '+ 'CMD windows flashing.<br>'+ 'FSO is used instead (when possible) for visual comfort ;-)'+ '<br><br>'+ 'TECNHICAL COMMENTS : See in the source file content.'