/* Collection of code snippets by Arne Vajhøj */
/* (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) */
#include <windows.h>

#include <stdlib.h>
#include <time.h>

int main(int argc, char *argv[])
{
    int v;
    if(argc > 2)
    {
        srand(time(NULL));
        v = 1 + rand() % (argc - 1);
        SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, argv[v], SPIF_UPDATEINIFILE);
    }
    return EXIT_SUCCESS;
}
