Jump to content

deltron

Active Members
  • Posts

    30
  • Joined

  • Last visited

Everything posted by deltron

  1. It's possible that the firewall service might be turned on, but the firewall is disabled, checking the registry is probably the best way to check if the firewall is on.
  2. $fwstate = RegRead("HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\", "EnableFirewall") The state might also be found in HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile
  3. is there any way to have a break in the progress? I want to be able to have an OK button to stop a countdown. Also if possible, and is there any way to make the size of the _ProgressSet text box any bigger? My text is being cut off
  4. I'm wondering if anyone here has used AutoIt with XP Embedded? I am just starting to do it right now, so far I'm using Dependency Walker to get info about my autoit scripts, but I'm just wondering if anyone has any input on what components to add to make using autoit scripts viable.
  5. I gotta say though, this is pretty sweet
  6. I'm getting an error: >Running:(3.2.0.1):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\rjg2152\Desktop\Grabber.au3" C:\Documents and Settings\rjg2152\Desktop\Grabber.au3 (75) : ==> Subscript used with non-Array variable.: DllCall("captdll.dll", "int", "CaptureRegion", "str", $lPicFileName, "int", $lWinPos[0], "int", $lWinPos[1], "int", $lWinPos[2], "int", $lWinPos[3], "int", 100) DllCall("captdll.dll", "int", "CaptureRegion", "str", $lPicFileName, "int", $lWinPos^ ERROR was trying to get some window info in internet explorer
  7. sorry for resurrecting an old thread, but I'm wondering if work ever continued on updating this script.
  8. awesome, thanks Val
  9. I am wondering if there's any way to have AutoIt suppress reboots, I have an unattended install that wants to reboot. Since I am deploying this, I can't get the exit code of the final installs due to the reboot. Any ideas?
  10. yeah, I actually found that -ms switch yesterday on www.appdeploy.com. I do have several other apps that this is beneficial for, that don't have silent installs. thanks
  11. this worked for me now to figure out the actual exit codes (hopefully they're documented somewhere) and add more error checking in my code.
  12. RunWait works fine with the unattended installs, but since this is for an uninstall that needs to have buttons pushed, that is why I'm looking for a solution/advice to try and get it working. The uninstall function in my script works just fine if you replace RunWait with Run, which then pushes the necessary buttons. I'm really looking for this in the future, because RunWait works fine with my unattended installs, but the ones that need to have buttons pushed are the ones that I am looking for a solution for. thanks BD
  13. I clarified my original post, hopefully this will explain more.
  14. well my issue is that I cannot use send() while using RunWait, as stated in my first post
  15. Is it possible to use RunWait with Send() to send keys? I can use Run, but I need to get the exit code of the program for logging purposes. If I use Run(), I am able to send keys, which I need to send keys, since I cannot do this uninstall unattended. If I replace Run with RunWait, I'm not able to send any keys, because RunWait is expecting the app to close before continuing on the script. The reason I'd prefer to use RunWait, is so that I can capture the correct exit code for logging purposes, in case of any problems. Here's an example, not my whole code. $myapp = "Mozilla Firefox"; see the name of program in Add/Remove? Put it here $PID = ProcessExists("firefox.exe"); Will return the PID or 0 if the process isn't found. If $PID Then ProcessClose($PID) $UNINSTALLSTRING = GetUninstallString($myapp) If Not @error Then $ReturnCode = RemoveApp($UNINSTALLSTRING) EndIf Func RemoveApp($removeapp) RunWait($removeapp) WinWaitActive("Mozilla Firefox Uninstaller", "&Yes") Send("!y") If WinWaitActive("Attention", "&Yes") Then Send("!y") EndIf EndFunc Func GetUninstallString($app) $key = "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" $i = 0 While 1 $i = $i + 1 $subkey = RegEnumKey($key, $i) If @error Then ExitLoop $displayname = RegRead($key & "\" & $subkey, "DisplayName") If @error Then ContinueLoop If StringLeft($displayname, 15) == $app Then Return RegRead($key & "\" & $subkey, "UninstallString") EndIf WEnd SetError(1) Return "" EndFunc ;==>GetUninstallString thanks edit: clarifying a little more.
  16. lol, yeah, I figured as much
  17. ah, this is exactly what I needed, you sir, rock. I think that putting the writes on different lines makes it look a lot cleaner too. thanks again for your help! another quick question, what's the best way to concatenate strings together? I don't see anything in the help files/forum search that quickly allows you to do so. edit: $string = $string & "otherstuff" ? I think I need a coffee break
  18. as you requested log.txt
  19. edit: @herewasplato - you got it right, trying to create a custom formatted log file in seperate columns. Sorry, I was just in a meeting. There won't be a gui to this, as it's a silent install/uninstall script. Basically, let me show you my code in winbatch. each of these variables were inited with a set number, such as ComputerNameLen = strlen( ComputerName), PushNameLen = 20, etc. edit: this just sets the top columns up in WinBatch :SetLogLine Now = TimeYmdHms ( ) LogLine = StrCat (StrFix (ComputerName, ' ', ComputerNameLen), @TAB, StrFix (WinOS, ' ', WinOSLen), @TAB, StrFix (csdver, ' ', csdverLen), @TAB) LogLine = StrCat (LogLine, StrFix (PushName, ' ', PushNameLen), @TAB, StrFix (Bulletin, ' ', BulletinLen), @TAB, StrFix (KBNumber, ' ', KBLen), @TAB) LogLine = StrCat (LogLine, StrFix (Result, ' ', ResultLen), @TAB, StrFix (ReturnCode,' ',RCLen), @TAB, Now) FileWrite (MyFile, LogLine) Return here's some pseudocode to show kinda what I want to do. I really want to avoid having many if-then statements and having to call StringMid, StringRight, etc in the code and replace it with a function. $log = FileOpen("c:\temp\logfile.log", 1) $app = "Mozilla Firefox" $endpoint = @COMPUTERNAME $endpointlen = stringlen($endpoint) $os = @OSVERSION $logheader = fixedstring("ENDPOINT", " ", 20) & @TAB & fixedstring("OS", " ", 10) & @TAB & fixedstring($app, " ", 20) etc.. $logstring = fixedstring($endpoint, " ", 20) & @TAB & fixedstring($os, " ", 10) & @TAB & fixedstring($app, " ", 20) etc.. If $log = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf FileWriteLine($log, $logheader) FileWriteLine($log, $logstring) FileClose($log)
  20. I'm wondering if there's any way to create a "variable" fixed length string in autoit. What I'm wanting to do is for logging purposes to have a consistent looking log file. here's an example of the current log output we have: ENDPOINT OPERATING SYSTEM SERVICE PACK PUSH NAME BULLETIN KB NUMBER RESULT RC TIME/DATE BJC11116698 Windows XP Service Pack 2 Acrobat705 AcrRdr-705 NA Already Installed 0 2005:12:07:18:17:10 (it might look a little strange since it's a long output due to word-wrap) I'm wanting to create fixed-lenght fields, with each field being different length, say 10 characters, then 20 characters, then 3, etc. I'm not sure if there's any UDF created for this, I've tried to look for one, and there doesn't seem to be anything in the help file. In Winbatch, there's a function called strfix which allows you to set the length of strings, and also pads/truncates to fill the requested value. I hope that I stated it clearly enough, any questions let me know.
  21. ah, didn't think about looking there thanks
  22. I was wondering if it's possible to pass variables to an autoit program so I can have it use different variables at execution time. ex. c:\temp\script.exe "Mozilla Firefox". the script would take the variable "Mozilla Firefox" and call it in the program. thanks, Ryan
  23. wow, I was going to build a frontend to sysprep myself, but I was beat, and with better ideas! congrats! VVVV wow long time to lurk
  24. yeah, I was afraid of that Oh well, time to create a UDF I guess lol. I don't remember seeing one created that does what I'd like. Thanks for the help smoke
×
×
  • Create New...