Jump to content

Nologic

Member
  • Posts

    462
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Everything posted by Nologic

  1. I disagree, I feel its the best way to install software. Tho any debate will have to wait...time to hit the sack.
  2. hmm if its the same app I think it is...its been mentioned a few times already...but then again...AutoIt wasn't all that hip of a way to do installs at the time. Back in the day it was actually mentioned in the AutoIT thread prior to my hissy fit. Also I think Mhz made mention of it...and I think ?Zoster? posted about it prior to any of the rest of us. Any ways its a quick and dirty way to do up scripts...but effective none the less. Well hopefully it will bolster peoples comfort level to this method of doing things. So good to see it getting attention again.
  3. Batch files can not do what your needing....now if you can get a way with registry entrys...then batch's can do the trick just fine. Other wise to actually type stuff into a running application you will need to use some sort of advanced scripting. Of the main freeware ways to script application input, you have VBS, JS, and AutoIt. So no you don't have to use AutoIT if you prefer not to...but you'll then have to use VBS or JS. I frankly find AutoIT the better choose of the three for this chore. Tho honestly I have no real exprince with VBS so...my views on it directly are mute. Tho between JS and AutoIT...AutoIt is clearly the winner from my perspective. Also any thing you can do in a batch file, you can do in AutoIt...plus a whole lot more. Really I feel that AutoIt should be a main stay tool for admins every where. You get it down to an art form, along with WSH and your life can become a lot better and what you do looks a lot more professional.
  4. Well I'm changing the code around for the autoit script...got some thing thats performing transformations fine...I'll have to post an example of how to go about it...which shouldn't be a big deal at all. Then all thats needed is to buff up the CD routine...which I've gotten some code from MHz that does a good job thus far...but may seek to improve upon that as well. Any ways it will shortly be a full RunOnce batch file replacement.
  5. Well here is my answer to the problem and of course it involves AutoIt. It’s basically an AutoIt replacement for batch files normally used to perform GUIRunOnce & RunOnce operations. The script can spawn multiple independent RunOnceEx Dialogs, if one so desire…which I might add is very easy to do. The script can and does automate a lot of the normal hassle when confronting a project such as this. This ranges from auto numbering the registry keys, to combining text strings to lessen the amount of text one is required to punch into the script. This unlike many of my other scripts is not just simply altering a few user defined variables…in this one you have to actually get in and alter the true formation of the script. This really isn’t all that hard or difficult to understand, once you put your mind to it. Okay basic variables and functions, along with possible markers look like so: #Region - _CD( "" ) $PATH = "" _Title ( "" ) _Key ( "" , "" ) _RunOnce() #EndRegion Region Markers #Region - #EndRegion Then Region markers are a handy novelty for users of SciTE, this allows large chunks of code to be folded into a single line, of course with the ability to unfold it when so desired. These will not cause problems for other ASCII text editors, so they are harmless to leave in. That said feel free to remove any and all of them if you so choose. SciTE users may wish to open their “User Options” file and add the following lines, so that when opening a script that makes use of the Region markers, it is all folded and compact. fold.comment=1 fold.on.open=1 _CD( "" ) function _CD( "" ) The _CD ( “” ) function is used to search out a file passed to it, to be used to define the drive the script will then use as its root. This can be used multiple times through out the script if more than one drive is required to install the desired applications. Passing the value of "WIN51" returns the drive letter which contains the Window’s XP installation disk. If the "WIN51" file was found to be on E drive the output would be: E:\ _CD( "WIN51" ) Passing the value of "boot.ini" Returns the drive letter which contains the operating system. If the "boot.ini" file was found to be on D drive the output would be: D:\ _CD( "boot.ini" ) $PATH = "" variable $PATH = "" This is used but by no means required, its single task is to help simplify directory path input. Its value is applied to every Key below it, till it is altered to a different path, or set to no path at all. That said this is concatenated (joined) with the value returned by the _CD( “” ) function. So if we passed the following values _CD( “WIN51” ) $PATH = "Software\CD & DVD Tools\" And "WIN51" being passed to _CD( "" ) still returned E:\ We would be working with the below directory pathing information for all following Keys. E:\Software\CD & DVD Tools\ Which would mean that we are working off the installation disk in a directory called "CD & DVD Tools, that is nested in side a directory called "Software". Now if we wanted to work from the drive the operating system resides on, and from within a folder called “Security Tools” that’s nested inside of a folder called “Install” we would then have to pass the following values _CD( "boot.ini" ) $PATH = "Install\Security Tools\" Which would get us our planned result of D:\Install\Security Tools\ _Title ( "" ) function _Title ( "" ) The _ Title ( “” ) function is used to label the window title of the RunOnceEx dialog. An example would be _Title ( "Installing Applications" ) This would give the same effect as what’s shown in the image here. How ever to display what was requested in this thread one would use the following _Title ( "IT Departement " & @YEAR ) _Key ( "" , '' ) function _Key ( "" , '' ) Now time to tackle the really difficult one. The main feature’s of this are to label a task to be listed in the RunOnceEx dialog, and to link together every process required to complete that task. The set of double quotes is used to pass the desired label for the task to the RunOnceEx dialog. So if we wanted to display the first task listed in the image here. The coding would then look like _Key ( "Preparing Installation…" , '' ) Its here in the set of single quotes that things become more complex. Lets assume that our working path is still E:\ Software\CD & DVD Tools\ And that we are coding in everything for a completely updated Alcohol 120% installation. Our installation package is stored in a directory called “Alcohol 120%” currently nested inside the “CD & DVD Tools” directory. Now with the current directory path knowledge in mind, we need to added the folder “Alcohol 120%” and the installation package name. The current code would appear as _Key ( "Alcohol 120%" , 'Alcohol 120%\Alcohol_Setup.exe' ) Since we are wanting this application to install silently we need to apply its switch’s. Now when applying any thing prior or post to the path and file name, the path and file name must be encapsulated in matching carots, as is the case when applying DOS commands or switches. Now updating the code would result in the following _Key ( "Alcohol 120%" , '^Alcohol 120%\Alcohol_Setup.exe^ /qn' ) Now in this example we also have another installation package that needs to be executed to update the hardware support. To add any additional process simply requires that each process be separated with the pipe symbol “|”. The updated code appears below _Key ( "Alcohol 120%" , ’^Alcohol 120%\Alcohol_Setup.exe^ /qn|^Alcohol 120%\UpDate.exe^ /S' ) Lastly to complete this task we need to merge a registry file, in order to have the applications registration information entered. The code follows the prior routine, hence the code revision _Key ( "Alcohol 120%" , ’^Alcohol 120%\Alcohol_Setup.exe^ /qn|^Alcohol 120%\UpDate.exe^ /S|REGEDIT /S ^Alcohol 120%\register.reg^’ ) Now you can have up to 9999 _Key’s in a group, and each _Key can have up to 9999 process spawned from it. In most extreme case’s this will be enough, should there be a cause for more entries then one can always edit the source code to reflect this need. Keep in mind that file and folder names should not include pipes, single or double quotes, doing so will break the script. Transformations are now possible please check example files to see how to go about it. _RunOnce() function _RunOnce() This simply forces the execution of all keys entered under RunOnceEx, then resets the numbering of the _Key function to 0001. So fill it in how you like, compile it and forget it. Update Swapped out the orginal purpose of the single quotes, and instead replaced with carots "^". Then swapped out orginal purpose of second set of double quotes in _Key with single quotes.
  6. hmm that depends...one can force RunOnceEx to execute really at any time. Example cmdow @ /HID @echo off for %%i in (C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z:) do if exist %%i\WIN51 set CDROM=%%i SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx REG ADD %KEY% /V TITLE /D "Installing CD & DVD Tools" /f REG ADD %KEY%\005 /VE /D "Installing ASPI Layer" /f REG ADD %KEY%\005 /V 1 /D "%CDROM%\SOFTWARE\Tools_-_CD_&_DVD\ASPI\ASPI_4.71.2_au3.exe" /f start /wait rundll32.exe iernonce.dll,RunOnceExProcess EXIT Normally yes you are correct.
  7. Okay maybe I should phrase it...as I don't get the reasoning for having it there in the first place. I'm just puzzled is all.
  8. Okay now I got a silly question...why do you want the current date displayed any ways? I could to some degree understand the value of listing the files last modified date, or creation date. Heh or is this just some thing to pull the wool over management\end user's eye's to make them think the scripts are always current?
  9. Well if you use AutoIt you have these available to you - @SEC Seconds value of clock. Range is 00 to 59 @MIN Minutes value of clock. Range is 00 to 59 @HOUR Hours value of clock in 24-hour format. Range is 00 to 23 @MDAY Current day of month. Range is 01 to 31 @MON Current month. Range is 01 to 12 @YEAR Current four-digit year @WDAY Numeric day of week. Range is 1 to 7 which corresponds to Sunday through Saturday. @YDAY Current day of year. Range is 1 to 366 (or 365 if not a leap year)
  10. Not sure whats not all covered by the AutoIt Script but it might be a nice place to start from.
  11. hmm no its not pointless if your in a battle for room on your unattended disk....if your not in need of every possible byte of storage on your disk....then yes its pointless and slows things down. So really its a matter of whether or not space saving is important to you or not.
  12. Well script it in and let me know how it fairs. I have no way to test currently besides directly in windows.
  13. Okay Astalavista here is a the requested edit made. I commented out lines no longer required. There where two new lines added...one a simple comment..the other doing what needs to be done. This should show how to correctly edit my scripts so that things install using thier defaults.
  14. Well I could AutoIt up a script for it...but right now I"m tied up with other scripts...revision to my firefox script, HotKey master, but more interestingly Trillian 3, with lots of tweaks.
  15. I believe thats in the Software\Hardware forum. Tho I think there may have been one or two in this forum as well. Sorry no direct links.
  16. Hehe yes you are completely correct there. Plus not every one is a fan of AutoIt...like I am.
  17. hmm couldn't you say install\run TweakUI via a AutoIt script to alter those settings prior to the installation of the rest of your files?
  18. Astalavista - I think your coming off wrong on this...your sounding negitive. I know for a fact not one of my AutoIt scripts will fit every ones needs...tho in general they will fit most peoples needs. Just try to keep in mind its really hard if not impossible to create one size fits all code. Any ways while you Critique the use of the code...please try to phrase things more positively. Well back to my own code pounding and hair pulling.
  19. One can also use AutoIt to create shotcuts. Examples of it being done are in both Notepad2 & Metapad AutoIt scripts in the sticky thread in the App's forum.
  20. hmm I think some one posted a autoit script for this some time ago...maybe I'm mistaken.
  21. Revised script posted (page 1)...now by default works with Enhanced version rather than Professional.
  22. spachtler - I see a script here but not up in the AutoIt thread...hint hint wink wink. I've attached a file with some suggested changes...its up to you if you wish to accept such changes...and also if you are up to expanding on such changes. Feel free to raid my scripts for sample code.
  23. %systemdrive% is a symbolic link to the drive in which windows is installed on....C:\, D:\, E:\,..... (dang getting slow)
×
×
  • Create New...