I am trying to use the SystemParametersInfo API to change the
wallpaper from a VBScript run by Windows Script Host locally on the
computer.
This is what I have:
Dim bmpFile
bmpFile = "C:\WINDOWS\WALLPAPR.BMP"
Call SystemParametersInfo(SPI_SETDESKWALLPAPER,0,bmpFile,SPIF_SENDWININICHANGE)
When I run it, Windows Script Host gives me the following error
information:
Script: C:\changeWallpaper.vbs
Line: 3
Char: 1
Error: Type mismatch: 'SystemParametersInfo'
Code: 800A000D
Source: Microsoft VBScript runtime error
Is there something I need to do prior to using SystemParametersInfo to
make the VBScript recognize it as valid?