Bernster Posted September 12, 2006 Share Posted September 12, 2006 Let me first start by saying that I am not a programmer by trade but can usually with time figure things out. I am also a noob with AutoIT and love it. I have searched the board for the following but can't quite seem to have found a solution. What I am looking for is a seperate external file that could be edited via a GUI. This file would hold all the license keys of my products. A script could then, while doing the install, look into this file for my Registration Code and input them at the right time. Here is the reason for me asking. Myself and some friends have the same programs (legit copies, if they weren't I would have no need for this setup). We want to build a software installation program to install our software in case of a crash or if we buy a new PC. We would like to enter our specific Reg Codes in this external file and be able to build scripts to restore the application that would be generic and be passed from one person to another. If one updates a script due to a new release, we could share the install between all of us and still have our proper registration codes. Also, is there a scipt that only copies the content of a directory to another with the option to overwrite files if necessary. Thanks Bernie Link to comment Share on other sites More sharing options...
Bernster Posted September 13, 2006 Author Share Posted September 13, 2006 I thought for sure this would have generated some comments. Is this not a good idea? Am I missing the point of the capabilities of the software? has it been done before? Thanks Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 13, 2006 Moderators Share Posted September 13, 2006 I thought for sure this would have generated some comments.Is this not a good idea? Am I missing the point of the capabilities of the software? has it been done before?ThanksI think we are more or less not understanding your specific request. See, generally you start a project, then when your stuck you ask for help, show the code that is producing the issue, and someone generally answers in a timely manner. If you don't know where to start, take a guess, then if you screw up, come and ask, that's generally how it's supposed to go. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Bernster Posted September 13, 2006 Author Share Posted September 13, 2006 Thanks SmOke_N I am starting the project. I guess there was two parts to my statement. First of all I was asking if something like this already existed, I didn't want to reinvent the wheel, and second was to see if this was even a doable thing. I am trying to create a batch restore of a dozen or more applications and have it pulled for a single file where all the Reg Codes reside. This way I can pass the restore scripts to others that are looking to do the same thing as I am doing, but only need to update the Reg Code file with their own codes. I will keep plugging along! Thanks Link to comment Share on other sites More sharing options...
BigDaddyO Posted September 13, 2006 Share Posted September 13, 2006 do you mean like, an INI file? AutoIT has several commands you can use to store and retrieve information from an INI file. Mike Link to comment Share on other sites More sharing options...
blademonkey Posted September 13, 2006 Share Posted September 13, 2006 Thanks SmOke_NI am starting the project. I guess there was two parts to my statement.First of all I was asking if something like this already existed, I didn't want to reinvent the wheel, and second was to see if this was even a doable thing.I am trying to create a batch restore of a dozen or more applications and have it pulled for a single file where all the Reg Codes reside. This way I can pass the restore scripts to others that are looking to do the same thing as I am doing, but only need to update the Reg Code file with their own codes.I will keep plugging along! ThanksHmm interesting. I dont know of a system that includes all Reg codes for different applications in one file. I think there are pros and cons with your approach, but I'm very interested in it.I know that you can embed specific Serial Numbers in your Unattended install statement for MSIEXEC setups and for older setups you can create ISS files that record pretty much everything you do during the setup. I use it in a couple of scripts here at work for our VLK versions of Visio.I think the best way i can could think of implementing your idea is to use an INI file since autoit support the INI file structure through the Ini* functions.hope that helps. ---"Educate the Mind, Make Savage the Body" -Mao Tse Tung Link to comment Share on other sites More sharing options...
Bernster Posted September 13, 2006 Author Share Posted September 13, 2006 Mike, Yes, and INI file would be great. It would just be a way to read info from a file and pass it to the script that installs the program. This way, I can use the restore and have my INI file with my codes, pass the scripts to a friend that has the similar program and he can restore with his codes from his INI file. Here is a better description. Let say that I want to install Photoshop, Corel Paint and MS Office. I create 3 scripts PhotoshopCS2.au3, CorelPaint.au3, MSOfficeXP.au3 In each of these scripts, there is a line that fetches a code in the INI file The INI file would look like this: RegCode.INI PhotoshopCS2,1233-3456-7890-7654 CorelPaint,999-4433385865884 MSOfficeXP,44JU-3KSU4-KSM4-WKK45 This looks fairly simple, but I am not much of a programmer. I can however get good inspiration from other scripts. Could someone point to one of those scripts that call an INI file and repaces text within that file. Thanks again Bernie Link to comment Share on other sites More sharing options...
BigDaddyO Posted September 15, 2006 Share Posted September 15, 2006 Sorry it took so long for a responce, I don't know if you still need this but here is an example for you. $INI = @ScriptDir & "\Codes.ini" ;Creating the INI file IniWrite($INI, "RegCodes", "PhotoShopCS2", "1233-3456-7890-7654") iniwrite($INI, "RegCodes", "CorelPaint", "999-4433385865884") IniWrite($INI, "RegCodes", "MSOfficeXP", "44JU-3KSU4-KSM4-WKK45") ;Read from the INI File $PScs2 = IniRead($INI, "RegCodes", "PhotoShopCS2", "") MsgBox(0, "PhotoShopCS2 Reg Code", $PScs2) $CP = IniRead($INI, "RegCodes", "CorelPaint", "") MsgBox(0, "CorelPaint Reg Code", $CP) $MSoffXP = IniRead($INI, "RegCodes", "MSOfficeXP", "") MsgBox(0, "MSOfficeXP Reg Code", $MSoffXP) Link to comment Share on other sites More sharing options...
Bernster Posted September 16, 2006 Author Share Posted September 16, 2006 Thanks Mike, I think that this will do just fine and I think that I can follow the logic. I appreciate your time in helping me. Bernie 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