Jump to content

tletourneau

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by tletourneau

  1. Thanks!!! I didn't even think of Wix for some reason. That helps immensly! Tom
  2. Ok, so this has morphed to an app that can be unistalled that we will use to drop some scripts and reg key updates. We will use a script the app drops to remove the app after the maintenance window ends so it will be avalible again during the next update session. We do not need to worry about the app requiring a restart, we are going to do that with a reg key change using the script the app drops instead. So I just need to compile to be able to remove using an uninstaller and show in add/remove programs. Any tutorials for that? I normally just drop a script with my stuff, I don't actually do installs or uninstalls. I love active projects! Thanks for the help!!!
  3. We are transitioning to Config Manager from a combination of ECM and WSUS. We need to ensure that a reboot occurs during the maintenance window even if one is not required.
  4. Hello all, I am looking to create a small program of some type (scripting is an option) that I can setup to require a restart and deploy through WSUS. The point of it is just to force a reboot at the end of a maintenance window so I would just increment the version each time it is "installed" to have the systems (Microsoft Servers) reboot. I can't seem to find anything in compile that I can select to tell the system that the program requires a restart. Am I missing something or is this not possible? Thanks, Tom
  5. Ok, how would I add the output from win32_IP4PersistedRouteTable (from CIM_LogicalElement or CIM_ManagedSystemElement) to a scrollable table in the output box? I'e tried adding another execquery for the class and adding an isString but that fails. Esentially I'm trying to display the persistent routes in a table under the IP information. Pointers, please... Thanks, Tom
  6. Hi guinness, the changes that Robjong made did what I asked in my previous post and it is working as expected. The only thing I'm trying to figure out now is how to have it show all gateways for an adapter, not just the default gateway. I'll take any pointers on that!
  7. That is perfect, thank you! I was able to see the changes you made, that helps a lot too.
  8. First I'd like to thank everyone that has worked on this code! I was looking for something just like this. I have two questions. The first question is: when I run the code I get an array box that opens and when I close that I get the message window with the data. Is there a way to supress the array window and just have the message window open? Also, is it possible to have the text in the message box selectable so it could be copied and pasted? Here is the code I'm working with: #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #include <Array.au3> Global $aArray = _IPDetails(), $sData _ArrayDisplay($aArray) For $A = 1 To $aArray[0][0] $sData &= "Description: " & $aArray[$A][0] & @CRLF & "IP Address: " & $aArray[$A][1] & @CRLF & "MAC: " & _ $aArray[$A][2] & @CRLF & "Default Gateway: " & $aArray[$A][3] & @CRLF & "DNS Servers: " & $aArray[$A][4] & @CRLF & @CRLF Next $sData = StringTrimRight($sData, 4) MsgBox(0, "_IPDetails()", $sData) Func _IPDetails() Local $iCount = 0 Local $oWMIService = ObjGet("winmgmts:{impersonationLevel = impersonate}!\\" & "." & "\root\cimv2") Local $oColItems = $oWMIService.ExecQuery("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True", "WQL", 0x30), $aReturn[1][5] = [[0, 5]] If IsObj($oColItems) Then For $oObjectItem In $oColItems $aReturn[0][0] += 1 $iCount += 1 If $aReturn[0][0] <= $iCount + 1 Then ReDim $aReturn[$aReturn[0][0] * 2][$aReturn[0][1]] EndIf $aReturn[$iCount][0] = _IsString($oObjectItem.Description) $aReturn[$iCount][1] = _IsString($oObjectItem.IPAddress(0)) $aReturn[$iCount][2] = _IsString($oObjectItem.MACAddress) $aReturn[$iCount][3] = _IsString($oObjectItem.DefaultIPGateway(0)) $aReturn[$iCount][4] = _IsString(_WMIArrayToString($oObjectItem.DNSServerSearchOrder(), " - ")) ; You could use _ArrayToString() but I like creating my own Functions especially when I don't need alot of error checking. Next ReDim $aReturn[$aReturn[0][0] + 1][$aReturn[0][1]] Return $aReturn EndIf Return SetError(1, 0, $aReturn) EndFunc ;==>_IPDetails Func _IsString($sString) If IsString($sString) Then Return $sString EndIf Return "Not Available" EndFunc ;==>_IsString Func _WMIArrayToString($aArray, $sDelimeter = "|") If IsArray($aArray) = 0 Then Return SetError(1, 0, "Not Available") EndIf Local $iUbound = UBound($aArray) - 1, $sString For $A = 0 To $iUbound $sString &= $aArray[$A] & $sDelimeter Next Return StringTrimRight($sString, StringLen($sDelimeter)) EndFunc ;==>_WMIArrayToString Any and all help will be greatly appreciated! I'm not a coder but I'm starting to learn. Thanks, Tom
×
×
  • Create New...