Jump to content

Chocobits

Member
  • Posts

    28
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Everything posted by Chocobits

  1. Hello again everyone, I'm back with more questions! So I've gotten my unattended Vista most of the way up and running. I still need to apply some updates and do some customizations (which I'll probably be asking about later ), but I'm having a bit of a problem with my answer file and I'm hoping someone can help. It's ignoring the OOBE section, specifically <ProtectYourPC> and <NetworkLocation>. The network dialogue pops up after install finishes, and when I go to Windows Update, Automatic Updates is disabled Here's my autounattend.xml: Everything looks good to me but it's ignoring those two entries Any help would be immensely appreciated.
  2. Hi again all! I have a question about rebuilding a Vista image. I know you can use tools like vLite to remove unnecessary builds from an image (like Vista 'N' versions in my case). I have an x86 AIO DVD, would it be possible to add x64 bit versions of Home Premium and Ultimate to my image and have the installation ask whether to install 32bit or 64bit when a Home Premium or Ultimate key is entered? Thanks
  3. I've never used Sysprep so you're Dutch and I'm Finnish and we'll go along speaking our own languages lol :-s I did end up resolving this particular issue. It turns out I was "doinitrong". I was using 64-bit version of imagex.exe (Silly me for assuming 64-bit would be backward compatible with 32 bit images instead of the other way around), and I didn't have the wimfilter installed. After I installed wimfilter I was able to integrate IE8.MSU with vLite. Also, here's a neat little trick for doing small edits/changes to a Windows build: Using an ISO editor like PowerISO, you can open up your ISO and drag and drop let's say a new copy of unattend.xml, or even just edit it directly inside and PowerISO can re-save the image, preserving its bootable state
  4. I'm trying to update the Vista OEM CD that we use at work (it's a PC repair shop) to be more up-to-date and unattended, because time isn't money there but it is a luxury none of us can afford I took the Vista disc and copied it to HDD, setup the folders and attempted to slipstream IE8 using WAIK according to this site, which is the best example I could find. Everything went fine during the slipstreaming. It was erroring out at first until I realized I needed to use attrib -r on the Offline folder, so apparently this disc is a Gold version. After I figured that out, I mounted and slipstreamed IE8 into each build, and those all completed without error, returning Exit Code 0x0. So I fired up vLite, removed the two 'N' builds, used it to make a simple answer file and rebuilt (all), creating a new ISO. When I use this image in a VM however, it will install correctly but when it would log in the first time, it says Configuring Updates 3 of 3, and goes into an infinite reboot cycle. This is frustrating. I can verify the integrity of the disc I copied from, and the version of IE8 I downloaded from here. The Vista disc is x86 and I made sure to download the 32-bit version of IE8 for Vista. I attempted re-downloading after the first VM test failed, same result. I'm kind of scratching my head here, any suggestions? *Edit* Forgot to mention, the disc has SP2 on it already, if that matters.
  5. Here's the update: The (simple) suggestion you gave didn't quite work Form1 "Change Product Key" button: Private Sub Button0_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button0.Click Dim frm2 As New Form2() Me.Hide() frm2.Show() Me.Show() End Sub Unless I remove the Me.Show() line, it doesn't hide Form1. If I remove the line, the program has the same memory/closing problem. If I'm ok with Form1 not being hidden (the forms are the same size and pop up in the same place so it's not a huge deal here) then it works. I need moar learning on this part lol. As for the other functionality: Superb! It does exactly what it's supposed to! Tested the product key replacement in a VM with a list of "bad keys" (blacklisted), key will change. Of course it fails Activation with these keys. Once I change to a Genuine key, Activation goes through without a hitch. There are 2 annoyances though: 1. The scripting seems to take an exorbitant amount of time (40-80 seconds) both to change the product key and to attempt activation. 2. The Activation actually shows TWO dialogue boxes total: One that says "Activating Windows...." that needs an "OK" press to go away, and another that gives the final status "failed" or "successfully" that only goes away with an OK click. Now, the 2nd message is important and I want that displayed. The first message is just annoying and unnecessary. Is there any way I can improve the speed here and destroy that first message? *Edit* Added another 1.5gigs of ram to my VM, that doubled the speed of the Activation. It's still a bit sluggish but bearable.
  6. Ahh, thanks for the explanation. I knew W7 would work, but I was worried if Vista would. Ok, I'm going to clean up the app with the suggestions above and see if it's in a state I'd trust to use 'in the field' per se. *Edit* Forgot to mention earlier: When I made my manifest, I created it as blank code inside my project and named it App.Manifest. When I compiled, it generated the correct name, matching the executable, but added a lot of extraneous lines that made it not work. Manually editing these lines out fixed it. Any reason the manifest is compiling funny?
  7. Wow very detailed response. I had a feeling there was a bit more depth to switching forms. Thanks for the info, I will make some updates and see what happens! I'm running into another problem now: The program compiled with VB.net requires... .Net runtimes to be installed on the machine it's run from.. This is awfully cumbersome for an app that runs as one of the final steps of an unattended Windows setup.. It'd mean I have to slipstream .Net or use some awkward process to integrate that before the app runs.. And then there's also the issues of customer expectations. Some simply don't WANT the runtimes installed or would have chosen not to have them installed given the choice. We have to be very careful when doing a system wipe/OS restore on a customer's machine; we can't assume it is safe to remove anything that was on their machine that they haven't expressly told us to (excluding installed apps of course), and we DEFINITELY can't be adding software that they haven't told us to. Is there a workaround for this? *Edit* I have had some success with VMWare's ThinStall program for avoiding the issue of installing certain apps necessary for other apps to work. If worst comes to worst I could try to create a thinstalled version of my app that includes a virtualized .net environment.. But I'm hoping there's an easier way
  8. Ok, I've resolved the UAC issue by using an external manifest. Now I have a few bugs to work out and some fine-tuning. Bug 1: Program crashes if it can't find the file listed by Process.Start Bug 2: The program will exit correctly if it hasn't switched forms using the method I posted earlier, but if I have switched forms, the size of the process keeps growing in memory based on # of form switches, and doesn't unload from memory upon exit. This isn't a big issue (for this instance) because this app will only be run once per machine. In the future though I'd like to learn how to avoid this kind of sloppiness. Feature help: A little embarrassing, but I can't figure out how to add text to the inside of a form window. IE I would like to put (Format XXXXX-XXXXX-XXXXX-XXXXX-XXXXX) above the text box. I added a background image and icon to the program, tweaked button/form position, added another button that takes the user to a Genuine Validation Required download page to test successful activation of Windows. I adjusted the size/position of both Forms so that the open/close effect isn't as noticeable. So all that's left is ironing out the bugs and figuring out how to add text to the inside of form windows.
  9. Muahaha! You've created a madman! I got it figured out after an hour of googling and playing around. My "Change Product Key" button on Form1: Private Sub Button0_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button0.Click Dim Form2 As New Form2() Me.Hide() Form2.Show() End Sub My "Cancel" button on Form2: Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click Dim form1 As New Form1() form1.Show() Me.Close() End Sub Tested, it lets me swap back and forth between forms no prob! I ran into the problems you mentioned I would. Closing Form1 causes program to exit, regardless if another form is open... Needs Hide option. And you can't reference Form1 in Form1 for some reason? You have to use 'Me'. So I understand the mechanics behind this, is there a more efficient way of doing this or is this clean enough? Also, can I tweak the position and size of both forms so that the user doesn't notice the open/close effect as much?
  10. Alright, g'nite then and thanks again for the help. I didn't think I'd get this much accomplished in one night
  11. Just caught the edit! Wow, that's both complex and simple at the same time. A very clever way to handle the requirements. Ok, so now I understand the textbox part fairly well. I have to admit, when you first said I wouldn't get an example at first and pointed me to the references, my eyes glazed over and I went "Ohh geez!" But this isn't very bad at all and it's a bit fun. So in order for me to clear the window and add new things, my gut tells me I'll be making a Form2? *Edit* You respond too fast! No, as in the new window replaces the old one. Like a web page, the first window is Index, and clicking on a link goes to the next page in the same window, clicking Home returns to the front page. I want my "Cancel" button to take me back to the first window.
  12. And urgh, I thought of two more questions :/ "slmgr.vbs" This is available in ALL versions of Vista/7, or is it a stripped out of some versions? Will UAC interfere with this program's functions? And if so, is there a way to flag this program to require Admin rights to run?
  13. Awesome, this is whizzing right along! So now I'm ready for the more advanced parts I think. So I want Button0 to clear the window, and have the textbox, "Change Key" and "Cancel" buttons to appear. The text "Change Customer Product Key" should be displayed somewhere in the window.
  14. AND another question! (Feel free to climb up a tower with a high powered rifle any time I ask too many questions!) If the entire text string would need to be entered enclosed in parenthesis in the command prompt (IE directories with long filenames), do they need parenthetical enclosure when run from a program like this? And if so, how would I go about doing that?
  15. Now another question not related to programming but slmgr.vbs: Do you know if it REQUIRES dashes or if the 25 alphanumeric alone can be entered? And are they case insensitive?
  16. Aha! So.. what I want is something like this: Process.Start("slmgr.vbs", "-ipk " & TextBox1.Text)?
  17. Ok, I've got a strong rudimentary grasp of what we've done so far, I owe you a bunch. I've added the textbox. Now I am working on using the input. Here's code so far: Imports System.Diagnostics Public Class Form1 Private Sub Button0_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button0.Click Process.Start("slmgr.vbs") End Sub Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged End Sub End Class What is the correct format for adding arguments, and how to use TextBox.Text? Also I notice it defaulted to TextBox1.TextChanged, would I need to used .TextChanged (or rename all instances of TextChanged to Text)?
  18. And another question: How difficult would it be relative to what we've done so far, to require the correct Windows product key format in the textbox? 5alphanumeric > a dash > 5 alphanumeric etc I'm guessing MUCH more difficult?
  19. Oh and a question about Process.Start Assuming I'll be running my app from a dvd, does it assume files in the directory it was run from if they aren't in a system path? IE I wouldn't have to specify which folder Keyfinder.exe was on the dvd if it's in the same folder as the executable for this app?
  20. Yay, that works, thank you! So now I just need to learn the text box, take text box input as add it as an argument. I'll need to continue this in a VM because messing around with slmgr on a live system is dangerous, no?
  21. Indeed! And not to miss out on where this is heading: Process.Start("cmd.exe") Would I be using CMD to eventually enter the command?
  22. Imports System.Diagnostics Public Class Form1 Private Sub Button0_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button0.Click 'Declaration Public Shared Function Start( _ ByVal fileName As String _ ) As Process End Function End Class Thanks for clearing that up. That cleared the Syntax error; the other two errors remain. I naturally assumed I wanted this to be placed right under the Button0 line, because that's what the button would be doing correct? So, where do I add Process.Start, and what is the syntax? Like Process.Start ie.exe -argument?
  23. Ok! It didn't work! It probably would help if I knew where I was adding the snippet or what I was doing lol. Public Class Form1 Private Sub Button0_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button0.Click Imports System.Diagnostics 'Declaration Public Shared Function Start( _ ByVal fileName As String _ ) As Process End Function End Class imdoinitrong Without even specifying the process I want to start (or because..?), I have a syntax error, a Statement cannot appear with a method body error, and a Function 'Start' doesn't return a value on all code paths warning!
  24. Ahh ok, this really is much simpler than I thought it would be, thanks for the tips. I'm about to try and add the "Imports System.Diagnostics", which naturally won't work and I'll be back in a few mins excited to troubleshoot the next step! Thanks again
  25. Ok, so I've decided to go the easiest route possible, which is probably VB 2010 Express I have the basic form and I've added the 3 buttons. For some reason, most likely my inexperience, it's not letting me copy the entire code for the entire project to paste here..? Anyway here's the basic form, with 1 of the buttons.. Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button0.Click End Sub End Class The buttons are all labeled, sized and positioned. Now I need to add functionality to them! I've done a mental flowchart and improved the basic layout for the little program. The first button is "Change Product Key" The second button is "Verify Key" (launches Keyfinder.exe) The third button is "Activate Windows" "Change Product Key" will clear the form, have an input field and the text "Change Product Key" above it. Two new buttons will appear below the input field, "Change Key" which will enter the command "slmgr.vbs -ipk *****-*****-*****-*****-*****", where asterisks are obviously the product key, and a "Cancel" key, which brings the main window back up. "Verify Key" launches Keyfinder.exe "Activate Windows" Will enter "slmgr.vbs -ato" How do I tie all of that functionality to the "Change Product Key" button? IE Clear the window of all buttons, add input field, add two new buttons, take input from the input field and add it as a variable to the end of "slmgr.vbs -ipk" and execute that command with the "Change Key" button? And have the "Cancel" button return to the main window? Once I clear this hurdle, I'm pretty much done. I've googled code for the input field, and came up with this: Public Function InputBox( _ ByVal Prompt As String, _ Optional ByVal Title As String = "", _ Optional ByVal DefaultResponse As String = "", _ Optional ByVal Xpos As Integer = -1, _ Optional ByVal YPos As Integer = -1 _ ) As String with the following example included: Dim message, title, defaultValue As String Dim myValue As Object ' Set prompt. message = "Enter a value between 1 and 3" ' Set title. title = "InputBox Demo" defaultValue = "1" ' Set default value. ' Display message, title, and default value. myValue = InputBox(message, title, defaultValue) ' If user has clicked Cancel, set myValue to defaultValue If myValue Is "" Then myValue = defaultValue ' Display dialog box at position 100, 100. myValue = InputBox(message, title, defaultValue, 100, 100) ' If user has clicked Cancel, set myValue to defaultValue If myValue Is "" Then myValue = defaultValue More google returns the basic syntax for explicitly declaring a variable: Dim VariableName As DataType Static VariableName As DataType Private VariableName As DataType Public VariableName As DataType So I'm very close to tying this all together but more confused than ever :-s Since I've put in the effort to get this all started, can you point me in the right direction with an example?
×
×
  • Create New...