Content Type
Profiles
Forums
Events
Everything posted by MHz
-
AutoIt Macro Generator may not be perfect, nothing is, but programmically, it does fine for it's purpose. It is an admired helpers tool from my prospective. It is a part of Scite4AutoIt3 as I urged it to be so. Anyone have a problem with that ? , then speak some good facts to back it up. Ofcourse, there is times where human ability is needed fully to handle an installer, then a talent scripter does what is needed to succeed. Get Scite4AutoIt3 here to experience the ultra free deal. I know the deal as I am an associated with development of Scite4AutoIt3.
-
Pause or Wait command/switch for RunOnceEx.cmd
MHz replied to Dr3amW3av3r's topic in Unattended Windows 2000/XP/2003
RunOnceEx does wait. -
If this is a web packaged installer, then try: setup.exe /s /a /r /sms /f1"c:\setup.iss" Look in Drive C: root for the setup.iss when recorded.
-
AutoIt Macro Generator is included with Scite4AutoIt3. Download and install it. Open the editor, then look in Tools, in the Toolbar. AutoIt Macro Generator will record program installation and will output the script back to Scite4AutoIt3.
-
Thanks. So right you are. I had left it out by mistake so have changed the script in my last post to cleanup the extracted file on the scripts exit. I am happy with the last posted SPTD script if tests are proven ok. It has a sound concept to it.
-
BoardBabe, I can see that a 5 minute WinWait was no good at all for Adobe. The loop would have definitely added option to check for more windows while waiting for the expected one to show. As for someone who does not like to disappoint, if a loop is used, then I would try this one. It perhaps looks alittle neater to view then If statements being used. I will go along with whatever everyone likes best. So, another test script for SPTD install attached. SPTDLoopInstall.html Edit: Removed the _Abort() function and added the code within the loop. The timeout for the WinWaitClose functions is the timeout set minus the time difference at that moment. Added OnAutoItExit() for file cleanup. Thanks BoardBabe.
-
As for your idea, BoardBabe. Let's have a look at Select Case. Blocking functions, which WinWaits are is not a good concept for Case statements so I would use WinExists or WinActive to allow flow. As Select Case will execute the 1st correct case statement, even if more the one is correct, then I may need to add into a loop to click the last window. I would add an Exit or ExitLoop after the last window to escape the loop when successful. But what if the SPTDinst.exe does not show the windows for some reason then a timeout is needed to excape the script. I would then choose TimerInit() to store a start time in a variable and use TimerDiff() to read the variable within the loop to compare with an allowed time set. For just a couple of windows, it maybe alittle excessive? I have no doubt that it would work fine also. The 20 sec timeouts that I used are quite excessive but I like to cover for in case someone has a really slow HDD, CPU or some other reason. I would think even 5 or 10 secs would be plenty to set. Worst could be is that the windows will not show for some reason, then the timeouts would happen. Atleast the script would exit at a point of SPTD failure (not expected, but possible). As for the windows showing, then they would be executed immediately. The 1st WinWait is just in case the script is run at some other time to cleanly Exit out. The 1 sec timeout for the 1st WinWait has little effect of the good operation of the script. The last window has no condition set to close the SPTD process if it is a no show. I would expect it to show if the previous window does. I may cover for that condition later, which would be another possible, but not expected event. When you compare the 2 methods of choice, then the result should be the same but the WinWait method is simple and the sequence of the 2 windows is known. Reduce the timeouts if it suits you better, but remember that you would be very unlucky for some reason for the timeout to actually happen. Overall, both methods would need some timeout to Exit if a problem does occur, so Windows setup can atleast continue. The execution of speed would be the same with either method, for just 2 windows. I would assume that it had taken about 1.5 secs to execute until completion for my test. Wow, you got me typing alot for a small and quick install script. Hope it defines the little difference for the choice of method that is used in this script
-
1. Get SPTDInst.exe from Temp directory and place in folder A 2. Get the script from my previous post and put in folder A. 3. Compile the script in folder A. 4. Put the compiled script in your $OEM$ folder next to Cmdlines.txt. 5. Add an entry into Cmdlines.txt to execute the compiled script. [COMMANDS] "Compiled.exe" 6. Compile the DT4 script and place it in the same directory as the DT4 installer. 7. Add an entry into RunOnceEx cmdfile to execute the DT4 Compiled script. 8. Make your ISO to test. HTH
-
You having some troubles muiz? AutoIt can use FileInstall() to archive a file within itself and extract it. The AutoIt script should be the one to be using the add switch. The test script i posted above has just been tested and worked ok. Both of the SPTD and DT4 installs in a Virtual Machine. I saw both of the messageboxes for the SPTD install and neither hung. Edit: Here is a FileInstall version of the script. Have SPTDinst.exe in the same directory as the script when compiling and the file will be archived into the compiled AutoIt executable. It will extract to Temp directory when the script is run from Cmdlines.txt. No needed switches as the script does it for you. _SPTDinstFI.html
-
Does not show in AutoIt Info Window of the button to click for ControlClick, unless you did not have the mouse hovering over the button before you paused AutoIt Info Tool. To use Send(), then it would be as below: Send("!n") Notice that the !n used is not !N.
-
CLI = CommandLine dirms is perhaps only good for Win 2k users who do not have defrag.exe.
-
Thanks. Good feedback would indeed help to make DT4 better. DT4 itself installs nicely when that driver is already installed. I will see what time I can do at testing this myself, if able to.
-
I have only tested in a Virtual machine of installing SPTD separately, then installing DT4 in following reboot into RunOnceEx. It works fine. The test is what Cmdlines.txt does as to the SPTD install. Will the windows popup? There is 2 windows, and now thinking that the 2nd may not show as it may not ask for a reboot. Upon reboot into RunOnceEx, the SPTD service should hopefully be running ok and DT4, upon noticing this, will install in 1 complete install. I do not see a link between the DT4 installer needing to be run concurrently. This SPTD seems to already be in x64 systems to what I know, and DT4 does not want to alter the way it installs else it gives a sign that it is installed where software makers can pick on it. Your repacking may have broken a setting where as I still am using the original installer for the DT4 install. It does make some good sence to install this Scsi driver 1st at Cmdlines.txt if is possible. I would assume the chances are very good, touch wood.
-
I like the effort to post, blinkdt. But with No Winnt.sif to activate OEMPreInstall of $OEM$ to copy over, then it looks like your idea is cooked. Without Cmdlines.txt and SVCPack.inf that will not be available for repair install, then I do not see an option. Perhaps txtsetup.sif? Not sure.
-
Well, I consider that installing this SPTD from Cmdlines.txt will make installation smoother. Anyone up to test? Instructions: When you go through installation of DT4, the SPTD messagebox pops up. Just copy the SPTDinst.exe from the temp directory and place it in the same directory as Cmdlines.txt. Cancel the install, if wish. Then add the following script next to Cmdlines.txt for execution at T12. _SPTDinst.html Now that SPTD is installed, at T0, the OS will reboot into RunOnceEx and will execute the following script which will install DT4. That should be it, nothing further to do. _Daemon_Tools_v4.03.html SPTDinst.exe is an extra 800 kb to your UA, but it could be worth it. DT4 will install completely, 1st time. Should be no 2nd reboot for DT4 after the RunOnceEx install. Edit: small script change.
-
No, it's not. So this AutoIT script runs first, looking for an closing any Windows. It loops until it doesn't find anymore, then exits. After it exits, and the next part/next script runs. Thats how that script runs, correct? BTW, thank you all for the input, I thought I was going to be dead in the water! What you can do is just add a HKCU RunOnce entry from a HKLM RunOnceEx entry. This will run the script only once for you and the RunOnce entry clears once executed. I just tested this entry and works ok. Example: Set KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx Set RunOnce=HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce REG ADD %KEY%\099 /V 1 /D "Reg Add %RunOnce% /v ScanWFP /d \"C:\Install\Compiled.exe\"" /f
-
So do I xtremexxx. It would make installation easier. I guess the SPTD driver perhaps prevents the option of silent install.
-
Thanks for seeing the difference. Seems your interpretation of v3 is alittle better of my interpretation of v2. Been awhile since I used v2. Well, here is a timed loop version using v3. I used Select Case as all the If's were getting messy. The code below will loop for the setting of 1 minute. $allowed = 60 * 1000 $time = TimerInit() While $allowed > TimerDiff($time) Select Case WinExists('Confirm File Replace') WinActivate('Confirm File Replace') Case WinExists('Found New Hardware Wizard') WinActivate('Found New Hardware Wizard') Case Else Sleep(5000) ContinueLoop EndSelect Sleep(250) Select Case WinActive('Confirm File Replace') Send('!a') Case WinActive('Found New Hardware Wizard', 'Cannot Install this Hardware') Send('{TAB 2}{ENTER}') Case WinActive('Found New Hardware Wizard', 'The wizard has finished') Send('{ENTER}') Case WinActive('Found New Hardware Wizard', 'Completing the Found') Send('{ENTER}') Case WinActive('Found New Hardware Wizard', 'Welcome to') Send('!n') EndSelect WEnd
-
thats how i do it , works for me Yeah,but ya don't need to.. if you need to worry about the space wasted in compiling all ur scripts then there are much easier ways to save space. not to mention you actually get some added features from using a compiled script What features are better when compiled ? Compiling + Standalone executable. + Easier commandline. - Need to use compile Directives to change resource information for script version identification. UnCompiled + Easy to edit. + No Compiler Directives to worry about. + Space saving. + Easy to check the contents before burning. + Any #Include files can be shared. + No need to store script sources separately for Compile. + No need to decompile. + Less chance of curruption. + No false-positive virus alerts. + More AutoIt scripts used makes Uncompiled scripts easier to manage. + Can do anything a compiled script can do, other then the AutoIt3.exe needed to execute. To be honest, compiling absolutely sucks when not required. So does 1 line statements without some facts to show. My whole UA Disk runs on uncompiled autoit scripts and I have mentioned my simple method before shown here.
-
From my 4.00 AutoIt (which MHZ have write too) experience, it looks like hung but after 30 seconds (???) it go further... i guess it is the same as 4.03 I seen a hang of up to about 5 seconds, but 30 is abit much. Too save too many messages being sent to window which may confuse it, I have added some timed WinWaits. This means the window hung, will not receive another click for up to 15 seconds. This should indeed help your issue. I would expect the installers to behave the same and my tests show same behaviour. Thanks for the posted picture. I see annuleren on a button but hopefully the ClassnameNN's used should manage the language difference OK. Oh, bujo696, a good edit of the script. To AutoIt Thread
-
Well, I guess you have not experienced a real big, complex script then? A program can go into thousands of lines of code and become very complex (yes, even an Au3). I have not even touched on using any of the more complex concepts like using multi dimenitional arrays, DllCalls and the rest. Your evaluation of the word complex is only what you rate as, not of someone who does trivial things that you might rate as complex? A script such as this takes about 10 minutes or so to make with CMenu to create the template. For the basic actions performed, perhaps created quicker then you can create for the same task. Testing and fine tuning is what can use up time with creating these scripts. I did have to manage a reboot so extra time was needed with managing a solution. Note: CMenu is 2858 lines of code with multiple Gui's. So what is the realistic base of size comparison of install script to a Gui? Let's see what is so complex. Script variable settings for the user. (comments make this section bulky but informative) Opt('TrayIconDebug', 1) ; Installer. $executable = 'daemon403-x86.exe' ; Show progess. $splash = 0 ; Default catagory folder in startmenu. $group = 'DAEMON Tools' ; New catagory to move the default folder into. $catagory = '' ; Installation folder in Program Files. $directory = 'DAEMON Tools' ; Allowed time for installation. $allowed = 300 * 1000 ; Auto or manual reboot. (either choice will runonce the installer at next reboot) $auto_reboot = 0 Run installer and process windows. (largest part of script (with good spacing) which covers possibilites to successfully install DT4) ; Main Window Title $title = 'DAEMON Tools 4.03HE' ; Run the installer. If $auto_reboot And StringInStr($cmdlineraw, '/postrun') Then If WinWait($title, 'Welcome to the DAEMON Tools', 30) Then $pid = $executable Else $pid = _Install() EndIf Else $pid = _Install() EndIf $time = TimerInit() Do Select; 1st 3 windows are messageboxes. Case WinExists('SPTD setup V1.24', 'This program will install SCSI Pass Through Direct') ControlClick('SPTD setup V1.24', 'This program will install SCSI Pass Through Direct', 'Button1') Sleep(1000) Case WinExists($title, 'Setup must restart Windows') _RunOnce() If $auto_reboot Then $choice = 'Button1' Else $choice = 'Button2' EndIf ControlClick($title, 'Setup must restart Windows', $choice) WinWaitClose($title, 'Setup must restart Windows', 5) Exit Case WinExists($title, 'You must reboot after previous operation') _RunOnce() ControlClick($title, 'You must reboot after previous operation', 'Button1') ; Desktop Reboot after 20 seconds. Sleep(15*1000) MsgBox(262144, $title, 'System restart commencing now', 5) Shutdown(2) Exit Case WinExists($title, 'Welcome to the DAEMON Tools') ControlClick($title, 'Welcome to the DAEMON Tools', 'Button2') Case WinExists($title, 'License Agreement') ControlClick($title, 'License Agreement', 'Button2') Case WinExists($title, 'Already Installed') $text = 'Update the automated installation script for uninstall or upgrade support, If required' MsgBox(262144, $title, $text, 5) _Abort() Case WinExists($title, 'Choose Components') ControlFocus($title, 'Choose Components', 'SysTreeView321') ControlSend($title, 'Choose Components', 'SysTreeView321', '{DOWN}{SPACE}') ControlClick($title, 'Choose Components', 'Button2') Case WinExists($title, 'Choose the folder') ControlSend($title, 'Choose the folder', 'Edit1', @ProgramFilesDir & '\' & $directory) ControlClick($title, 'Choose the folder', 'Button2') Case WinExists($title, 'Completing the DAEMON Tools') ControlCommand($title, 'Completing the DAEMON Tools', 'Button4', 'UnCheck', '') ControlClick($title, 'Completing the DAEMON Tools', 'Button2') ExitLoop EndSelect Sleep(1000) If TimerDiff($time) > $allowed Then _Abort() Until Not ProcessExists($pid) Remove Shortcuts for user. (Working Directory changes by _MainShortcut() function as why the user can easily use relative addressing). _Destop() and _Quicklaunch() functions change working directory also when used for ease. If _MainShortcut('DAEMON Tools.lnk') Then FileDelete('Uninstall.lnk') _Desktop('DAEMON Tools.lnk') EndIf Delete spyware installer (if exists only) If FileExists(@ProgramFilesDir & '\' & $directory & '\SetupDTSB.exe') Then FileDelete(@ProgramFilesDir & '\' & $directory & '\SetupDTSB.exe') EndIf Optional, Remove Autorun entry for user ;~ RegDelete('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run', 'DAEMON Tools') The script will run until it reaches the Exit in the script. All the generic functions (used in all of my install scripts) below the Exit do the work, to make the above script easier to create and run. Do notice in the whole of the DT4 script of no includes being used. All of the functions could goto an include script which can be used with the rest of my install scripts, which make my script much smaller to browse as to just the code displayed above. Creating Gui's is easy, it is creating the script that does the work is when the real challenge starts. Perhaps you have a better solution to automating Daemon Tool's 4 to share for us ?
-
Jazkal, I made an AutoIt 3 conversion of your script. Try to emulate your goto methods and this is the result. I did not try to improve, but to just simply convert. For $i = 1 To 2 While 1 Sleep(5000) If WinExists('Confirm File Replace') Then WinActivate('Confirm File Replace') WinWaitActive('Confirm File Replace') Send('!a') Exit EndIf If WinExists('Found New Hardware Wizard', 'Cannot Install this Hardware') Then WinWaitActive('Found New Hardware Wizard', 'Cannot Install this Hardware') Send('{TAB 2}{ENTER}') ContinueLoop EndIf If WinExists('Found New Hardware Wizard', 'The wizard has finished') Then WinWaitActive('Found New Hardware Wizard', 'The wizard has finished') Send('{ENTER}') ContinueLoop EndIf If WinExists('Found New Hardware Wizard', 'Completing the Found') Then WinActivate('Found New Hardware Wizard', 'Completing the Found') WinWaitActive('Found New Hardware Wizard', 'Completing the Found') Send('{ENTER}') ContinueLoop EndIf If WinExists('Found New Hardware Wizard', 'Welcome to') Then WinActivate('Found New Hardware Wizard') WinWaitActive('Found New Hardware Wizard') Send('!n') ContinueLoop EndIf Sleep(10000) ExitLoop WEnd Next Exit Edit: Added a For loop to enable a second run of loop. Thanks Jazkal.
-
I posted a 4.03 script yesterday (my time). Just some window title changes were needed to make it work with the newer version. Give it a try and see how it goes. It seems to working OK by my tests. The installation routine of 4.03 is the same as 4.00, so easier, silent methods are still not available. To AutoIt Thread Edit: Added link.
-
Pause or Wait command/switch for RunOnceEx.cmd
MHz replied to Dr3amW3av3r's topic in Unattended Windows 2000/XP/2003
No switches are shown for .Net Framework. Since you have WinRAR in your list, I could assume you have repacked .Net with also patched with SP1. Below is the comment I used for my WinRAR SFX. RunOnceEx does wait for the end of installation ;The comment below contains SFX script commands Setup=Netfx.msi /qb /norestart TempMode Silent=2 Overwrite=1 If you want to use GSM's idea then it would look like below: REG ADD %KEY%\053 /VE /D ".NET Framework 1.1" /f REG ADD %KEY%\053 /V 1 /D "%CDROM%\Software\dotnet\dotnetinstall.exe" /f REG ADD %KEY%\053 /V 2 /D "ping -n 60 127.0.0.1>nul" /f REG ADD %KEY%\065 /VE /D "Sun Java 1.4.2" /f REG ADD %KEY%\065 /V 1 /D "%CDROM%\Software\jre-1_5_0_04-windows-i586-p.exe /s /v/qn" /f REG ADD %KEY%\065 /V 2 /D "REGEDIT /S %CDROM%\Software\RemoveSunJavaUpdateCheck.reg" /f -
Pause or Wait command/switch for RunOnceEx.cmd
MHz replied to Dr3amW3av3r's topic in Unattended Windows 2000/XP/2003
Welcome to MSFN, It would be helpful to know what commands you are using for these 2 installations. I do not think a 60 secs of wait is needed.