Jump to content

can7

Members
  • Posts

    8
  • Joined

  • Last visited

can7's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Thanks for your help! Ijust had to fix one typo "$sTxt &= @Year & @Mon & @MDay & " " & @Hour & ":" & @Min & ":" & @Sec" It works great!
  2. Hi Everybody I trying to write a script to get the PC info on my network and input in a text file. I would like to name the text file with the computername. How would I do this? I have been searching this forum and came up with this script so far. #include <file.au3> $UserName = @UserName $LogonDomain = @LogonDomain $PCName = @ComputerName $IPAdress = @IPAddress1 $WinVer = @OSVersion $ServicePack = @OSServicePack Func _GetMACFromIP($sIP) Local $MAC, $MACSize Local $i, $s, $r, $iIP $MAC = DllStructCreate("byte[6]") $MACSize = DllStructCreate("int") DllStructSetData($MACSize, 1, 6) $r = DllCall("Ws2_32.dll", "int", "inet_addr", "str", $sIP) $iIP = $r[0] $r = DllCall("iphlpapi.dll", "int", "SendARP", "int", $iIP, "int", 0, "ptr", DllStructGetPtr($MAC), "ptr", DllStructGetPtr($MACSize)) $s = "" For $i = 0 To 5 If $i Then $s = $s & ":" $s = $s & Hex(DllStructGetData($MAC, 1, $i + 1), 2) Next Return $s EndFunc ;==>_GetMACFromIP $IP = $IPAdress $MAC = _GetMACFromIP($IP) FileWrite(@ScriptDir & "\Text.txt", $UserName & @CRLF) FileWrite(@ScriptDir & "\Text.txt", $PCName & @CRLF) FileWrite(@ScriptDir & "\Text.txt", $IPAdress & @CRLF) FileWrite(@ScriptDir & "\Text.txt", $WinVer & @CRLF) FileWrite(@ScriptDir & "\Text.txt", $MAC & @CRLF) ; FileWrite(@ScriptDir & "\Text.txt", $PCName & @CRLF) ; FileWrite(@ScriptDir & "\Text.txt", $IPAdress & @CRLF) _FileWriteLog(@ScriptDir & "\Text.txt","date and time") Can7
  3. Thanks again smartee! I been trying use the help files. I'm very new to programming so I'm pretty lost when it comes to putting all the commands to get there. I'm going to give your script a go and see if it works for me. many thanks again. Can 7
  4. Yes this is want I was looking for! Thank you for your help. I just found out the GUID:[d0f4861b-5dbc-44d6-a84d-ac7e64b5f7b9]is listed in the registry. I think it is much easier to just look in the registry for that value and launch the update, instead of checking a bunch of log files. My new question is how do I change your script to check the registry instead for the following key? "HKEY_LOCAL_MACHINE\SOFTWARE\xxx\xxx\CurrentVersion", "GUID", "REG_SZ", "d0f4861b-5dbc-44d6-a84d-ac7e64b5f7b9" Can7
  5. Hi everyone I need some help and advice with script to read Log files in a folder and to find if a certain string is in the log file if the string exist launch an program. The log files are named and created by date example name would be Conn_20091119.log I need to be able to run this script via the network to PCs which has a certain string in these log file. an example of the string I'm searching for is GUID:[d0f4861b-5dbc-44d6-a84d-ac7e64b5f7b9] If this string is found it will launch the update.exe file. Thank you for your in advance. Can7
  6. Thanks spudw2k!
  7. Hi all I'm trying to write a script which loops until I get a reply from a server. I want to add this script to a stand image for deploying PCs. I want this script to ping to see if it is on the network if so run a series of command. If it is not then keep looping until it is on the network. I been also reading about the _SelfDelete() and trying to figure out if that could be added to the end of my script so it will remove itself from the PC once the script has completed the commands needed. Thank you for your help in advance. Jo
  8. This is something I been searching for. your script work great. But, I work with a very large network with different vlans. I'm new to any type of scripting. I need to use wake on lan to turn on multiple PCs. I need to wake over 1000 PCs to run a virus scan during the night. How would I modify your script to wake multiple PCs or import a list or database of PCs to wake up. Can7
×
×
  • Create New...