JohnArtisan
-
Posts
3 -
Joined
-
Last visited
Posts posted by JohnArtisan
-
-
This is the script that I use it will apply a random wallpaper (only bitmaps) each time you run it.
' Random Wallpaper Changer'the only files allowed in wallpaper directory are bmp's
option explicit
Dim oShell, fold, fileset, fileCount
Dim counter, fileToPick, randomFile, fso, file, sWallPaper
Set oShell = WScript.CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
'change "getFolder" to your path
Set fold = fso.GetFolder("C:Wallpaper")
Set fileset = fold.files
fileCount = fileset.count
if fileCount > 0 then
'random file from folder
counter = 1
randomize
fileToPick = clng((rnd * fileCount) + 0.5)
for each file in fileset
if counter < fileToPick then
counter = counter + 1
else
randomFile = file.path
exit for
end if
next
else
response.write "Wallpaper directory is empty."
end if
set fileset = nothing
set fold = nothing
set fso = nothing
sWallPaper = randomFile
' update in registry
oShell.RegWrite "HKCUControl PanelDesktopWallpaper", sWallPaper
oShell.RegWrite "HKCUControl PanelDesktopTileWallpaper", 0 'Do not tile wallpaper
oShell.RegWrite "HKCUControl PanelDesktopWallpaperStyle", 0 'Center wallpaper
' let the system know about the change
oShell.Run _
"%windir%System32RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", _
1, True
-
Hi all,
I like U3 but I am not impressed with the U3 launchpad program. Could anyone provide instructions on how to create an ISO that will set the USB drive to run pstart instead of the u3 launchpad when it is plugged in. Then any new program can be added without having to convert to the u3 launchpad format.
Thanks, Sid.
This is what I use:
*autorun.inf
[AutoRun]
open=wscript .autorun.vbs
*autorun.vbs
dim FSO, flash, oShell
Set FSO = CreateObject("Scripting.FileSystemObject")
Set AllDrives = FSO.Drives
Set oShell = CreateObject("WScript.Shell")
For Each objDrive In fso.Drives
If objDrive.DriveType = "1" And objDrive.IsReady Then
If fso.FileExists(objDrive & "PStart.exe") Then flash = objDrive
oShell.Run flash & "PStart.exe", 1, False
End If
Next
If Len(flash) = 0 Then
MsgBox "Error: PStart.exe not found!",vbCritical,"File Not Found"
WScript.Quit
End if
batch file to change wallpaper?
in Questions
Posted
It should not need a reboot. I've tried it on 2 2000 machines and 3 or 4 xp systems without any problems, not sure why it's not working for you?