RichE Posted July 27, 2008 Share Posted July 27, 2008 (edited) Hi All, I rebuild peoples computers on a regular basis, so just to remind them who helped them out, I like to leave my contact info. So i wrote the OEM Info creator, it's still work in progress and has been tested on vista and works fine, i've just got to do the XP Gui, as vista and xp store the info differently, anyways here's the code so far. CODE#RequireAdmin #include <GUIConstants.au3> GUICreate("OEM INFO Creator.", 419, 545, -1, -1) $Quit = GUICtrlCreateButton("EXIT", 240, 508, 169, 33, 0) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $update = GUICtrlCreateButton("UPDATE", 8, 508, 169, 33, 0) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") guictrlcreatepic("OIC_logo.jpg", 0,0,419, 100) GUICtrlCreateTab(8, 108, 401, 393) GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) if @OSVersion = "WIN_VISTA" Then $VistaSheet = GUICtrlCreateTabItem("Windows Vista") GUICtrlSetFont(-1, 8, 400, 0, "Terminal") GUICtrlCreateLabel("Logo", 18, 155, 28, 12) $LOGO_Input = GUICtrlCreateInput("Your Logo Here", 88, 150, 200, 21) $Logo_btn = GUICtrlCreateButton("Browse", 300, 151, 96, 19) GUICtrlCreateLabel("Manufacturer", 18, 180, 76, 12) $Manu_input = GUICtrlCreateInput("Your Name Here", 88, 176, 200, 21) GUICtrlCreateLabel("Model", 18, 205, 34, 12) $Model_input = GUICtrlCreateInput("Computer Model Here", 88,200, 200, 21) GUICtrlCreateLabel("Support URL", 18, 230, 70, 12) $Url_input = GUICtrlCreateInput("Your Website Here", 88, 225, 200, 21) guictrlcreategroup("OEMLOGO Preview", 18, 260, 180, 180) $logo_preview = guictrlcreatepic("",22,275,165,160) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Quit Exit Case $Logo_btn $logo_select = FileOpenDialog("OEM Logo Image", @MyDocumentsDir, "Images (*.bmp)", 1+2) Guictrlsetdata($LOGO_Input, $logo_select, "") GUICtrlSetImage($logo_preview, $logo_select) Case $Update $image = guictrlread($LOGO_Input) $dest = @WindowsDir & "\system32" if $image = "" or $image = "Your Logo Here" Then msgbox(48, "Warning!", "No image selected!", 3) Else FileCopy($image, $dest, 1) Msgbox(64, "Image Copy", "OEM Logo Image copied successfully", 3) guictrlsetdata($LOGO_Input, $dest & "\OEMLogo.bmp", "") $regoemlocation = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" RegWrite($regoemlocation, "Logo", "REG_SZ", guictrlread($LOGO_Input)) RegWrite($regoemlocation, "Manufacturer", "REG_SZ", guictrlread($manu_Input)) RegWrite($regoemlocation, "Model", "REG_SZ", guictrlread($Model_Input)) RegWrite($regoemlocation, "SupportURL", "REG_SZ", guictrlread($Url_input)) msgbox(64, "OEM Info Creator", "Update Successful!") endif EndSwitch WEnd Elseif @osversion = "WIN_XP" Then $XPSheet = GUICtrlCreateTabItem("Windows XP") GUICtrlSetFont(-1, 8, 400, 0, "Terminal") GUICtrlCreateLabel("Logo", 18, 155, 28, 12) $LOGO_Input = GUICtrlCreateInput("Your Logo Here", 88, 150, 200, 21) $Logo_btn = GUICtrlCreateButton("Browse", 300, 151, 96, 19) GUICtrlCreateLabel("Manufacturer", 18, 180, 76, 12) $Manu_input = GUICtrlCreateInput("Your Name Here", 88, 176, 200, 21) GUICtrlCreateLabel("Model", 18, 205, 34, 12) $Model_input = GUICtrlCreateInput("Computer Model Here", 88,200, 200, 21) $Url_input = GUICtrlCreateInput("Your Website Here", 88, 225, 200, 21) GUICtrlCreateLabel("Support URL", 18, 230, 70, 12) guictrlcreategroup("OEMLOGO Preview", 18, 260, 180, 180) $logo_preview = guictrlcreatepic("",22,275,165,160) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Quit Exit Case $Logo_btn $logo_select = FileOpenDialog("OEM Logo Image", @MyDocumentsDir, "Images (*.bmp)", 1+2) Guictrlsetdata($LOGO_Input, $logo_select, "") GUICtrlSetImage($logo_preview, $logo_select) Case $Update $image = guictrlread($LOGO_Input) $dest = @WindowsDir & "\system32" if $image = "" or $image = "Your Logo Here" Then msgbox(48, "Warning!", "No image selected!", 3) Else FileCopy($image, $dest, 1) Msgbox(64, "Image Copy", "OEM Logo Image copied successfully", 3) guictrlsetdata($LOGO_Input, $dest & "\OEMLogo.bmp", "") $regoemlocation = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation" RegWrite($regoemlocation, "Logo", "REG_SZ", guictrlread($LOGO_Input)) RegWrite($regoemlocation, "Manufacturer", "REG_SZ", guictrlread($manu_Input)) RegWrite($regoemlocation, "Model", "REG_SZ", guictrlread($Model_Input)) RegWrite($regoemlocation, "SupportURL", "REG_SZ", guictrlread($Url_input)) msgbox(64, "OEM Info Creator", "Update Successful!") endif EndSwitch WEnd EndIf I'll post more code up as I do it (and test it of course) Edited July 27, 2008 by l15ard RichE [font="'Arial Narrow';"]Current projects[/font] [font="'Arial Narrow';"]are on my site [/font]Sellostring Link to comment Share on other sites More sharing options...
James Posted July 27, 2008 Share Posted July 27, 2008 (edited) Check out my OEMWizard! I am currently working on it right now! I am selling it to a couple of local areas, they are really interested in it! Edit: Yours doesn't work. Firstly, no includes. Second, missing EndIf's. Edited July 27, 2008 by JamesBrooks Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
RichE Posted July 27, 2008 Author Share Posted July 27, 2008 (edited) Check out my OEMWizard!I am currently working on it right now! I am selling it to a couple of local areas, they are really interested in it!Edit: Yours doesn't work. Firstly, no includes. Second, missing EndIf's.Funny that, as i've just copy pasted the code into a new auto/Scite new and it works fine.1. Hmmm, the paste didn't paste in the include, (which is fixed now:) )2. no warnings bout missing endif's...??? and runs prefect....also like i said in the first post, working with vista, I need to do the XP side, so if your using Xp it won't, but i did state thatOEM Wizard i'll check it out.Note: I've checked out OEM Wizard, and it seems you've been having troubles yourself..., and mine looks better Edited July 27, 2008 by l15ard RichE [font="'Arial Narrow';"]Current projects[/font] [font="'Arial Narrow';"]are on my site [/font]Sellostring Link to comment Share on other sites More sharing options...
James Posted July 27, 2008 Share Posted July 27, 2008 (edited) Weird. No problems with mine. I did when I first started with it, some problems here and there. And no way, mine has Vista Glass effect! Edit: Look and see how mine checks for Vista or below in the case arguments. You don't need to write out a whole new While Wend if it's not Vista. Edited July 27, 2008 by JamesBrooks Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
RichE Posted July 29, 2008 Author Share Posted July 29, 2008 I've finished my version of OI Creator, it has been tested on XP and Vista and works fine. though it doesn't have a coded vista glass effect it does windows native aero glass when ran on Vista and also has the following features:Program Checks for O/S version and tailors the the gui accordingly.OEM Logo preview windowFade in and out of guiFull inno installer setup with uninstaller.Line9 (non vista O/S's) is the URL information.Support Information line can be left blank (in non Vista O/S's)I've put up some screen shots of the finished app, and if anyone is interested in it, please MSN or email me and i'll send it over.also source code is available on request. RichE [font="'Arial Narrow';"]Current projects[/font] [font="'Arial Narrow';"]are on my site [/font]Sellostring Link to comment Share on other sites More sharing options...
James Posted July 29, 2008 Share Posted July 29, 2008 Ok, yours looks a bit more organised. For XP though, you do not need to have a 97*97 icon, it's the big one you need. Vista requires a smaller logo, so it can fit in with it's bit Vista icon above. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
RichE Posted July 29, 2008 Author Share Posted July 29, 2008 Ok, yours looks a bit more organised. For XP though, you do not need to have a 97*97 icon, it's the big one you need. Vista requires a smaller logo, so it can fit in with it's bit Vista icon above.you need 97x97 if your using large fonts 120x120 for small fonts, as per Microsofts site information RichE [font="'Arial Narrow';"]Current projects[/font] [font="'Arial Narrow';"]are on my site [/font]Sellostring Link to comment Share on other sites More sharing options...
James Posted July 29, 2008 Share Posted July 29, 2008 Ahh cool, didn't know that. Something to add! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
gseller Posted July 30, 2008 Share Posted July 30, 2008 Hey very nice l15ard! Thanks for sending it over. I don't understand why you would want to install it for a quick use on a new PC but the application works very well, and easy to use. Thanks for sharing... 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