Jump to content

kodius

Members
  • Posts

    19
  • Joined

  • Last visited

kodius's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. When I run this it opens the file again and then I have two files open Local $handle = FileOpen("SAMPLE.QBI", 0) FileClose($handle)
  2. But the file has already been opened by someone else, wouldn't FileOpen imply opening the file during the scripts execution? Sorry for being dense
  3. I'm trying to close two open files but can't seem to wrap my head around the syntax, here's my script FileClose("SAMPLE.QBI", 0) FileClose("SAMPLE.QBW", 0)
  4. ProgAndy that started the parent process qbw32pro.exe but that in turn starts a child process called qbw32.exe. How do I capture that child PID which the the one I need to wait for to close? i tried ProcessWaitClose ("qbw32.exe") but it didn't work.
  5. See attached screenshot of task manager and highlighted process for Quickbooks
  6. I often use AutoIT to launch an application on my terminal server then wait for the user to exit the application and log them off. On a 32bit server this works great all day long but I have a new 64 bit server and the process name shows up with a *32 next to it. How do I call that process name up in AutoIT, I tried "processname.exe *32" but that didn't work. Help
  7. schtask schedules Windows XP, Vista, 2003, 2008 tasks. I'm trying to schedule ccleaner to run once a day and cleanup userland garbage after they leave for the day to keep the PCs clean. I just can't seemt o get the syntax write... Has anyone used schtask with ccleaner, it's the $user_password_input I'm troubled by?
  8. RunWait("schtasks /create /RU "username" /RP" & $user_password_input & "/TN "System Cleanup" /TR ""C:\Progra~1\ccleaner\ccleaner.exe" /AUTO" /SC daily /ST 19:30:00")
  9. This doesn't work but I was wondering without using another UDF I found that seemed like overkill, if there is a simple way to search either a Branch or the entire registry for a specific Key? Func _Remove_Poorly_Written_Uninstaller ($y = "RegRead(Some_Buried_Key)") RegRead("HKEY_LOCAL_MACHINE", $y) MsgBox(0,"", $y, "Found!") EndFunc
  10. We use a service account on PCs we manage, on new builds I want to setup the account and hide the account from the Welcome Screen. With Vista the SpecialAccounts and UserList don't exist so I'm not sure it'll be created using the code below, any help would be GREAT! ; Check Registry and Hide User Account from Welcome Screen RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList", $UserName) If @error <> 0 Then RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList", $UserName, "REG_DWORD", "0") EndIf
  11. Right on the money, REALLY appreciated!!
  12. How do I validate the password the end user types and make sure it is complex 8 chars, one Capital and number? ; Get password to pass later in script $user_input = InputBox("Checkpoint Charlie", "Please Enter Password for My_Special_Account Account", "", "*") If $user_input = "" Then MsgBox(4096, "Checkpoint Charlie", "Can't Continue without a Password!", 10) Exit EndIf
  13. Thanks DaRam you are DaMan! That worked perfectly!
  14. If I re-run the script it keeps appending to the PATH, thanks for your help but how do I RegRead before appending to see if the value is already in the string? something like this? If RegRead($RegPath & $Path2Append) Then @error <> 0 Then RegWrite ($RegPath, "PATH", $sType, $nPath)
  15. I found some of this code in another topic but it doesn't work on the 3rd to last line ; Append to PATH Func _ToolKit() $sSep = ";" $sType = "REG_SZ" $path = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment", "PATH") If @extended = 7 Then $sSep = @LF $sType = "REG_MULTI_SZ" EndIf $path1 = $sSep & "c:\program files\mytools" $path2 = $path & $path1 RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment", $path2) If @error <> 0 Then RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment", "PATH", $sType, $path2) EndFunc ;==>_ToolKit
×
×
  • Create New...