$ret = SetWallPaper($RepertoireSource + $TableauNomFichiers[$indexaleatoire],0)
or
$ret = SetWallPaper($RepertoireSource + $TableauNomFichiers[$indexaleatoire],1)
make an error.

But i'd think is a W2K bug. If i leave "no picture in the background properties, the picture of the script will be overwritten by "no picture".
But if i select a picture, the script will overwrite this picture and so my script work !!! I'm going to put a black picture by default.

Thanks for your help

Steven