Jump to content

MHz

Member
  • Posts

    1,691
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Australia

Everything posted by MHz

  1. For CD install, create $OEM$ folder beside the I386 folder. For Network install, create $OEM$ folder inside the I386 folder.
  2. This is a basic example: Within your $OEM$ directory, you will need Cmdlines.txt, UserRunOnce.cmd and FirstLogon.cmd. Cmdlines.txt: [COMMANDS] "UserRunOnce.cmd" UserRunOnce.cmd: REM ~ Execute this from Cmdlines.txt within the same directory. REM ~ Requirement is also FirstLogon in same directory. @echo off Copy /y FirstLogon.cmd %SystemRoot% Attrib +RSH %SystemRoot%\FirstLogon.cmd Reg Add HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce /v FirstLogon /d FirstLogon.cmd /f FirstLogon.cmd: @echo off echo this is a test of runonce execution of a cmdfile pause 1. Cmdlines.txt will execute at T12 and execute UserRunOnce.cmd. 2. UserRunOnce.cmd will copy FirstLogon.cmd to the Windows directory and will hide it with attributes. An entry will be added to the HKCU Runonce key which will execute for each account upon first logon (even accounts created later). 3. FirstLogon.cmd has only test code but you can add cleanup commands or other suitable commands for your needs. To simply test, just put UserRunOnce.cmd and FirstLogon.cmd on your desktop and execute UserRunOnce.cmd. Log off and logon. When entering the desktop, you should see FirstLogon.cmd execute from the Windows Directory. Test OK. Go to Run and type del %systemroot%\firstlogon.cmd to remove the file from your Windows directory. Do note: The HKCU RunOnce entry will be redirected to the default user part of the registry when no one is logged on.
  3. You add an entry into HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce which will runonce for each user account. This is only achieved when no one is logged on. Cmdlines.txt is a good time to add the entry into registry. btw, run was not mentioned. Hopefully, this explaination is easier to understand.
  4. Comes down to a basic Start /? This will not work: start /wait "notepad" This will work: start /wait "title" "notepad" Even this will work: "notepad" The 1st pair of double quotes is reserved for the title with using Start. To be honest, why use the Start command on an executable installer as it will wait by default ? If you install an msi, just call msiexec to install it, again no Start command used. If you want to run a file that has an associated executable to run it, then you could use the Start command which will search the registry for the associated executable to run the file. To run a txt file without specifing the executable to run it, then use Start /wait to run it with the default executable for the association of txt files. @echo off & echo "Just a test" >> "%systemdrive%\test.txt" & @echo on start /wait "" "%systemdrive%\test.txt" Choosing the correct method should return expected results. @ECHO Installing RealVNC "t:\laptop installation\vnc\vnc.exe" /silent @ECHO Installing Password Regedit /s "\\headofficedc\it\laptop installation\vnc\vncremotepass.reg"
  5. The download links in this thread are like apples on a tree. So many to pick. Simply amazing effort to do all this, RogueSpear.
  6. There is another that i do not use much at all. ControlCommand('title', 'text', 'classnamenn', "EditPaste", 'string') Hmm, Pushing you some code for a 2 week old AutoIt user. ControlCommand does some numerous tricks. This is it's EditPaste function to try.
  7. Yeh, I could see you used ScriptWriter. Try AutoMacroGenerator also. When you have finished playing with Send and MouseClick, then you can progress to the more reliable Control* functions. The Latest AutoIt Beta, released today is 3.1.1.93. If ControlSend or ControlSetText do not work, and since you mentioned beta, then you could test my Wsh Sendkeys UDF ? Run('notepad') WinWait('Untitled') _WshSend('Untitled', 'abcDEF') ; Usage _WshSend ( "title", "text to send" ) Func _WshSend($title, $string) $WshShell = ObjCreate("WScript.Shell") If Not @error Then $WshShell.AppActivate( WinGetTitle($title) ) $WshShell.SendKeys($string) $WshShell = '' Return True EndIf EndFunc It may send better then Send. Have not had a reason to use it yet.
  8. HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce When an entry is applied when no one is logged on, the entry goes to the HKU\.DEFAULT part of the registry. This allows for the RunOnce operation for each account as each logon happens. An ideal time is from Cmdlines.txt to add the entry into this registry key.
  9. UnattendSwitch Specifies whether Setup skips Windows Welcome or Mini-Setup when preinstalling Windows XP Home Edition or Windows XP Professional using the CD boot method. (from Ref.chm)
  10. I see 2 c's in each Send. Indeed an odd behaviour with that installer. Some installers tend to show some wierdness in response. Test script used: For $i = 1 To 10 $pid = Run('notepad') WinWaitActive('Untitled') For $j = 1 To 10 Send("C:\Install\Cryptoexpert\liccense.key") Send('{ENTER}') Next ProcessClose($pid) Next You could try ControlSend or ControlSetText ?
  11. IMHO, that external forces are at play, causing your installations to fail. This SpySweeper starts with Windows, correct? which maybe causing problems? You may also have an overactive AV program that is interfering ? Or something else in your OS that is causing issues with installations. I cannot see a fault from my postion of installing DT4. As for spyware installing, unless the installer adds something regardless, then no spyware is installed from the spyware installer that it adds to the program folder. If you manually install with the spyware checked then you will know that it has been added to your system. The spyware installer will popup after about 30 seconds and follow the steps of a normal installer. You will get a ugly searchbar popup on your taskbar shortly after. My script takes out the installer before anything can happen, but as you have mentioned SpySweeper, I am guessing that SpySweeper is stepping in when SetupDTSB.exe is seen and interupting the AutoIt script. What about the Daemons Tools directory, maybe SpySweeper removes the whole lot ? Sounds like a good theory ? Picture of spyware installer which I do not receive after scripted installation. I cannot fault the script so I do not know how to help you further on this. Thanks. I am sure you can write good enough code after the amount of code that I have written. I like basic languages and sometimes do some Lua and have done some Visual Basic. Learning any language takes alot of willingness and devotion, but it can be done OK. Alot of that code was generated by my CMenu program FYI. No sense retyping the same stuff oner and over, right?
  12. Not anymore, AFAIK. Offline PDF version that I use does. The online version is a hit and miss on whether some pages are available.
  13. Removed ? Go to Run in Startmenu and type services.msc and press Enter. You can right click on any service and select properties to check it's dependencies on the last tab.
  14. Just add your registry entries as normal from Cmdlines.txt. If you are logged on then you would go to extreme and use an idea that Bendes suggests. It is also mentioned in the Unattended Guide. Simple.
  15. Debug Script attached in 1st post. I cannot fix a script that is working. I need any information of failure to fix any issues that cause it. The Debug Script will log as such: 16:54 16:54 Start: Install(2) 16:55 Win: "Welcome to the DAEMON Tools" 16:56 Win: "License Agreement" 16:57 Win: This program will install SCSI 16:58 Reg: "_DTools", "C:\_Daemon_Tools_v4.00.exe" /postrun 16:58 Win: "Setup must restart Windows" = Cancel 16:59 Dir: "C:\Program Files\DAEMON Tools" does not exist 17:00 17:00 Start: Install(2) 17:01 Win: "You must reboot after previous operation" 17:01 Reg: "_DTools", "C:\_Daemon_Tools_v4.00.exe" /postrun 17:21 Win: "You must reboot after previous operation" = Restart 17:21 Dir: "C:\Program Files\DAEMON Tools" does not exist 18:04 18:04 Start: Install(2) 18:07 Win: "Welcome to the DAEMON Tools" 18:08 Win: "License Agreement" 18:09 Win: "Choose Components" 18:10 Win: "Choose the folder" 18:34 Win: "Completing the DAEMON Tools" 18:34 Time: 29 seconds 18:34 Clean: Remove shortcuts 18:35 Clean: Delete spyware installer 18:35 Dir: Size = 816498 | Files = 12 | Dirs = 4 It will create the log on the user's Desktop.
  16. When you create only 1 user with Oobeinfo.ini, that user has autologon set and has Admin priviledges. Because you are using Winnt.sif to autologon into the main Administrator account first, you are possibly not even entering the Oobe part of setup, so you get no created accounts. RunOnceEx runs fine in an Oobeinfo.ini created account so I do not understand the AutoLogon to main Admin account ? Most people will have no need to use AutoLogon to main Admin account. If you need AutoLogon to main Admin account 1st, then I would suggest using a script and using the Net command to setup your users, groups, priviledges, passwords etc. AutoLogon to main Admin account 1st would be a need if you were setting up a corporate network environment or some other heavily involved setup.
  17. SplashText box can accept variables so you can have a similar effect. Demo: For $i = 30 To 1 Step -1 SplashTextOn("", "" & @CRLF & "Restarting the machine in " & $i & " seconds" & @CRLF & "", 300, 58, -1, -1, 1, "Arial", 12, 12) Sleep(1000) Next SplashOff()
  18. Another AutoIt script offering: Execute to add registry entries to run script later from HKCU\RunOnce. #NoTrayIcon If StringInStr($cmdlineraw, '/shutdown') Then Sleep(10*1000) For $i = 30 To 1 Step -5 If MsgBox(1+262144, 'Installation is fully complete', 'System Shutdown in ' & $i & ' seconds', 5) = 2 Then Exit Next Shutdown(6) Exit EndIf $key = 'HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce' If @Compiled Then RegWrite($key, 'SystemShutdown', 'Reg_sz', '"' & @ScriptFullPath & '" /shutdown') Else RegWrite($key, 'SystemShutdown', 'Reg_sz', '"' & @AutoItExe & '" "' & @ScriptFullPath & '" /shutdown') EndIf Or add your own HKCU\RunOnce entries to execute the script. #NoTrayIcon Sleep(10*1000) For $i = 30 To 1 Step -5 If MsgBox(1+262144, 'Installation is fully complete', 'System Shutdown in ' & $i & ' seconds', 5) = 2 Then Exit Next Shutdown(6) Exit I do not compile a single AutoIt script as blinkdt has mentioned about using AutoIt3.exe to run a Au3 script.
  19. You need: [Unattended] OEMPreInstall = Yes Oobeinfo.ini has never failed me yet in all the installs that I have done.
  20. An AutoIt script: If StringInStr($cmdlineraw, '/wfp') Then For $i = 1 To 10 If WinExists('Windows File Protection', 'Files that are required') Then ControlClick('Windows File Protection', 'Files that are required', 'Button3') If WinWait('Windows File Protection', 'You chose not to restore', 5) Then ControlClick('Windows File Protection', 'You chose not to restore', 'Button1') Exit EndIf EndIf Sleep(1000) Next Exit EndIf AdlibEnable('_Adlib') RunWait(@ScriptDir & '\UXTheme Multi-Patcher (Neowin Edition) 4.0.exe /s') AdlibDisable() If @Compiled Then Run('"' & @ScriptFullPath & '" /wfp') Else Run(@AutoItExe & ' "' & @ScriptFullPath & '" /wfp') EndIf Exit Func _Adlib() If WinExists('Install', 'This system must be restarted') Then WinClose('Install', 'This system must be restarted') EndIf EndFunc It will run itself a second time to check on WFP windows for 10 seconds while the next installation can start installing. The patcher runs completely silent except for the restart msgbox.
  21. How does licensed Altiris Rapid Installer compare to the free InstallRite in creating these installers ? Edit: watch out for runtime problems when using these types of programs as the original installer may add runtimes on 1 machine but none on another.
  22. I do not think that AutoIt supports Chinese language as it is an ANSI based software. Window titles and text in the scripts are case sensitive and will only work if the window titles are exactly the same for the installers that you are using. This does mean that if you have your window title set to show full path in the title bar then the scripts may not work as they would have been made for the default folder name only. Your keyboard layout (not english) could also be a problem with using Send() in the scripts. Send() does work like the keyboard. I am not sure of anything else with the information mentioned, other then using Au3Info tool to check the titles and text of the installer with the script. You could try AutoMacroGenerator within Scite4AutoIt3 to create some new scripts for you, but you may need to refine the output for a good final script.
  23. Ok, so it does not automate for some reason. You should not need to click through the installation manually. Does it start the installer ? If it does start, does it stop sometime during the automation ? Is your installer using the same langauge and version that the script supports ? Is this one particular script or more ? A better description will save me asking lots of questions to knowing what the actual problem that you are having.
  24. You mean that the compiled script that executes the installer and the installer does not run silent ? The installation is being automated by the AutoIt compiled script clicking through the windows of the installer perhaps ? AutoIt can automate installations that may not be able to silent install otherwise. This is one of AutoIt's strengths with installation scripts.
  25. If you look at the icon of the imgburn, you will see NSIS written on it. You may need a magnifier to see clearly. Use /S for NSIS installers. NSIS is case sensitive btw.
×
×
  • Create New...