Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 06-08-2008, 09:24 PM   #1 (permalink)
 
Super Techie

Join Date: Feb 2008

Posts: 302

Thorn is on a distinguished road

Default Changing desktop?

So, I wish to change the desktop picture upon boot. I want it to randomly pick a picture from inside a folder.

How would I do this? I have a very basic understanding of programming (Java C++ and Batch)


(If there is a program to do this, let me know)
Thorn is offline  
Old 06-09-2008, 04:03 PM   #2 (permalink)
CrazeD's Avatar
 
Wizard Techie

Join Date: Feb 2006

Location: Maine

Posts: 3,690

CrazeD will become famous soon enough

Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: Changing desktop?

Without bothering to do any research, I'm betting you could make something in Java/C++ to just change the registry entry for the background picture. Or, just make the program navigate to the directory that the background image saves, and copy different pictures in with the same name.

There's probably an easier way, but I CBA to Google it right now.
__________________

Need website help? PM me!
CrazeD is offline  
Old 06-09-2008, 10:01 PM   #3 (permalink)
 
Monster Techie

Join Date: May 2004

Location: /usr/root/mn/us

Posts: 1,121

bla!! is on a distinguished road

Default Re: Changing desktop?

You can do this easily with a VBScript or even a batch script with or without a .reg file.

I prefer VBS, so here's a couple steps to get you going in the right direction.

1. Look up how to do a registry edit with vbs. The Reg key for your background is HKCU\Control Panel\Desktop\Wallpaper
2. Look into random number generating based on the system time.
3. Have the script select a random number between 1 and x where x is the number of pictures
4. Then select the x'th number file from the folder you keep them in (look into the wscript.filesystem object)

If you need more help just post.
__________________
<br>
Its a frigging Laptop, not a Labtop!!!!
bla!! is offline  
Old 06-09-2008, 10:02 PM   #4 (permalink)
 
Monster Techie

Join Date: May 2004

Location: /usr/root/mn/us

Posts: 1,121

bla!! is on a distinguished road

Default Re: Changing desktop?

Oops, double post X(
__________________
<br>
Its a frigging Laptop, not a Labtop!!!!
bla!! is offline  
Old 06-10-2008, 12:47 AM   #5 (permalink)
 
Super Techie

Join Date: Feb 2008

Posts: 302

Thorn is on a distinguished road

Default Re: Changing desktop?

Quote:
Originally Posted by bla!! View Post
You can do this easily with a VBScript or even a batch script with or without a .reg file.

I prefer VBS, so here's a couple steps to get you going in the right direction.

1. Look up how to do a registry edit with vbs. The Reg key for your background is HKCU\Control Panel\Desktop\Wallpaper
2. Look into random number generating based on the system time.
3. Have the script select a random number between 1 and x where x is the number of pictures
4. Then select the x'th number file from the folder you keep them in (look into the wscript.filesystem object)

If you need more help just post.
For 3.

I only want it to change on reboot, so would there be a way to do this?

And could I just do something counter like, where I just rename all the files, and on each reboot increment the counter?
Thorn is offline  
Old 06-10-2008, 02:08 AM   #6 (permalink)
CrazeD's Avatar
 
Wizard Techie

Join Date: Feb 2006

Location: Maine

Posts: 3,690

CrazeD will become famous soon enough

Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: Changing desktop?

Run the script on startup, then have it terminate after it's done.
__________________

Need website help? PM me!
CrazeD is offline  
Old 06-11-2008, 12:28 AM   #7 (permalink)
 
Monster Techie

Join Date: May 2004

Location: /usr/root/mn/us

Posts: 1,121

bla!! is on a distinguished road

Default Re: Changing desktop?

Quote:
Originally Posted by Thorn View Post
For 3.

I only want it to change on reboot, so would there be a way to do this?

And could I just do something counter like, where I just rename all the files, and on each reboot increment the counter?
As far as running the script, you would want to put it in your startup items (c:\docs and settings\username\start menu\prog files\startup)

You can't just increment a variable since each time you boot it would re-run the script from scratch.

One thing you could do is read/write from a text file on the computer (or to and from the registry if you want to get that fancy )
Read the first line (assume it's an integer between 1 and x), then set the background based on that number, then overwrite the text file with the number you read +1. If the number is greater than the # of bg files you have, start back at 1.
__________________
<br>
Its a frigging Laptop, not a Labtop!!!!
bla!! is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP! Desktop turns on and restarts repeatedly, other turns on to black screen cvocvo Hardware Troubleshooting 1 12-31-2007 01:21 AM
friends really bad log..needs some major help here. Static_11 HijackThis Logs (finished) 17 12-07-2007 09:44 AM
New Computers - Which looks best for me? Chris Down Building, Buying, or Upgrading High Performance PC Systems 8 11-13-2007 11:42 PM
Intel Readies Desktop Penryn Models maroon1 Building, Buying, or Upgrading High Performance PC Systems 2 08-30-2007 01:50 PM
Google Desktop Goes Mac Osiris Apple, Mac OS , and Power PC 1 04-06-2007 01:18 PM