glent Posted January 4, 2006 Share Posted January 4, 2006 (edited) I had this crazy Idea this morning after looking at this post http://www.msfn.org/board/index.php?showto...=0entry443461Would it be possible to set a a different wall paper depending wether the CPU is AMD or INTEL? im guessing an autoit or VBS script will do it but I have litlle experience with either, Look forward to any Help Edited January 4, 2006 by glent Link to comment Share on other sites More sharing options...
possy_99 Posted January 4, 2006 Share Posted January 4, 2006 I'm a user of AutoIt myself, I use the following code in a script I made to itentify the CPU type (WinXP):$cputype = RegRead("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0", "ProcessorNameString")if you encorporate that with IF statements or something similar, that will do the trick..If you want the CPU speed btw, use this one...$cpuspeed = RegRead("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0", "~MHz") Link to comment Share on other sites More sharing options...
possy_99 Posted January 4, 2006 Share Posted January 4, 2006 ..some more info I just found..changing xp wallpaper using registry is done in the following key..HKEY USERS\ .DEFAULT\Control Panel\Desktopedit the wallpaper value, and type in the full path of your image and the filename..so from this I recon if your compitent with AutoIt, you should have enough to make a script to change the wallpaper depending on CPU. ..question is, when do you want to implement this? during setup, or afterwards? Link to comment Share on other sites More sharing options...
glent Posted January 4, 2006 Author Share Posted January 4, 2006 Thnx for the input, Id make this for runoncex I think, I report back soon Link to comment Share on other sites More sharing options...
Synapse Posted January 4, 2006 Share Posted January 4, 2006 (edited) autoit is very simple heres a script i wrote in like 5 minutes.*Edited* check post below.. new revision forces the windows API to redraw the wallpaper.. but one downside is the API only allows .bmp files.$readkey = "HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0"$readstring = "VendorIdentifier"$wallkey = "HKEY_CURRENT_USER\Control Panel\Desktop"$wallstring = "Wallpaper"$type = RegRead($readkey, $readstring)If @error = -1 Then MsgBox(0, "Error:", "An error has occured")Else If $type = "AuthenticAMD" Then RegWrite($wallkey, $wallstring, "REG_SZ", "C:\WINDOWS\web\Wallpaper\Bliss.bmp") ElseIf $type = "GenuineIntel" Then RegWrite($wallkey, $wallstring, "REG_SZ", "C:\WINDOWS\web\Wallpaper\Red moon desert.jpg") Else MsgBox(0, "", "Unknown Processor") EndIfEndIfshould be pretty straight forward, it reads the registry for VendorIdentifer.. from what i know, all AMD's are "AuthenticAMD".. and all Intels are "AuthenticIntel"if an error occurs, it will popup a messagebox saying so.. if you wish to not have a messagebox you can delete that line.if AuthenticAMD is returned from the registry it will change the wallpaper to Bliss.. if AuthenticIntel is returned, it will change it to "red moon desert"... if it returns anything else besides AMD or intel.. it will show a msgbox saying Unknown Processor.. again you can delete this line if you want.. and it'll use whatever the default wallpaper is.. or you can modify this to use a third wallpaper if you want.hope this helps, you'll have to compile it since i don't know the location of your pictures.. and don't know how much you would want to tweak it.. not sure when the earliest you can run an autoit compiled script is though..(.exe not .au3) Edited January 5, 2006 by Bi0haZarD Link to comment Share on other sites More sharing options...
Synapse Posted January 4, 2006 Share Posted January 4, 2006 (edited) ok... further improvised the code above.. and made it to where it forces the windows API to change the wall paper.. and the registry string for the wallpaper...HOWEVER!... the windows API only allows .bmp pictures.. so you would have to open the .jpg or whatever in paint then "save as" to 24-bit .bmp (don't think it matters..)$readkey = "HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0"$readstring = "VendorIdentifier"$wallkey = "HKEY_CURRENT_USER\Control Panel\Desktop"$wallstring = "Wallpaper"$amdwall = "C:\WINDOWS\web\Wallpaper\Bliss.bmp"$intelwall = "C:\WINDOWS\web\Wallpaper\Bliss.bmp"$type = RegRead($readkey, $readstring)If @error = -1 Then MsgBox(0, "Error:", "An error has occured")Else If $type = "AuthenticAMD" Then RegWrite($wallkey, $wallstring, "REG_SZ", $amdwall) DllCall("user32", "int", "SystemParametersInfo", "int", 20, "int", 0, "str", $amdwall, "int", 0) ElseIf $type = "GenuineIntel" Then RegWrite($wallkey, $wallstring, "REG_SZ", $intelwall) DllCall("user32", "int", "SystemParametersInfo", "int", 20, "int", 0, "str", $intelwall, "int", 0) Else MsgBox(0, "", "Unknown Processor") EndIfEndIf*typo in line 3 corrected* Edited January 5, 2006 by Bi0haZarD Link to comment Share on other sites More sharing options...
Nilfred Posted January 4, 2006 Share Posted January 4, 2006 (edited) from what i know, all AMD's are "AuthenticAMD".. and all Intels are "AuthenticIntel"All Intels are "GenuineIntel"Transmeta Crusoe are "GenuineTMx86"Old Cyrix are "CyrixInstead"I would like to know the string for "VIA C3" Processors. I think is "CentaurHauls". Edited January 4, 2006 by Nilfred Link to comment Share on other sites More sharing options...
Synapse Posted January 5, 2006 Share Posted January 5, 2006 Thanks Nilfred wasn't payin attention to that lol fixed the AuthenticIntel to the correct GenuineIntel in both of the above scripts.adding additional Vendor Identifiers if need be is easy.. Link to comment Share on other sites More sharing options...
glent Posted January 5, 2006 Author Share Posted January 5, 2006 @Bi0haZarD Thanks dude! Tetsing now Link to comment Share on other sites More sharing options...
druiddk Posted January 5, 2006 Share Posted January 5, 2006 This looks cool.Looking forward to hearing Glents results Link to comment Share on other sites More sharing options...
glent Posted January 5, 2006 Author Share Posted January 5, 2006 (edited) ok... further improvised the code above.. and made it to where it forces the windows API to change the wall paper.. and the registry string for the wallpaper...HOWEVER!... the windows API only allows .bmp pictures.. so you would have to open the .jpg or whatever in paint then "save as" to 24-bit .bmp (don't think it matters..)$readkey = "HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0"$readstring = "VendorIdentifier"$wallkey = "HKEY_CURRENT_USER\Control Panel\Desktop"S$wallstring = "Wallpaper"$amdwall = "C:\WINDOWS\web\Wallpaper\Bliss.bmp"$intelwall = "C:\WINDOWS\web\Wallpaper\yourownfilehere.bmp"$type = RegRead($readkey, $readstring)If @error = -1 Then MsgBox(0, "Error:", "An error has occured")Else If $type = "AuthenticAMD" Then RegWrite($wallkey, $wallstring, "REG_SZ", $amdwall) DllCall("user32", "int", "SystemParametersInfo", "int", 20, "int", 0, "str", $amdwall, "int", 0) ElseIf $type = "GenuineIntel" Then RegWrite($wallkey, $wallstring, "REG_SZ", $intelwall) DllCall("user32", "int", "SystemParametersInfo", "int", 20, "int", 0, "str", $intelwall, "int", 0) Else MsgBox(0, "", "Unknown Processor") EndIfEndIf you made a small typo on line 3 i changed$wallkey = "HKEY_CURRENT_USER\Control Panel\Desktop"Sto$wallkey = "HKEY_CURRENT_USER\Control Panel\Desktop"compiled and worked great on my athlon 64 system could and intel user please try this and report back please Edited January 5, 2006 by glent Link to comment Share on other sites More sharing options...
Synapse Posted January 5, 2006 Share Posted January 5, 2006 np, glad it worked was kinda worried about if autoit worked in 64 bit.oops for the typo lol. dunno where that S came from it's not in my main source My server is an Intel Celeron 1.1ghz.. 32 bit of course.. just checked it, and worked perfectly. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now