Number of.

A cool way to change your wallpaper...

Copy this code in to a text file and save it as "wallpaper.vbs" (Without quotes)

But keep in mind you have to give the path of the image(.jpeg or .bmp) that your going to use as the wallpaper.

In this code the path of the wallpaper is in colored text.

This is the code...........

dim wshShell
dim sUserName

Set wshShell = WScript.CreateObject("WScript.Shell")
sUserName = wshShell.ExpandEnvironmentStrings("%USERNAME%")

Set oShell = CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")

sWinDir = oFSO.GetSpecialFolder(0)
sWallPaper = "C:\Wallpaper.bmp"

' update in registry
oShell.RegWrite "HKCU\Control Panel\Desktop\Wallpaper", sWallPaper

' let the system know about the change
oShell.Run "%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", 1, True

Save this text file as "wallpaper.vbs" and double click it.

Read Users' Comments (0)

0 Response to "A cool way to change your wallpaper..."

Post a Comment