To run Bginfo to ALL users:
Now navigate to the location of the shortcut and edit the target path to be the following:
"C:\Tools\BGInfo\Bginfo64.exe" "C:\Tools\BGInfo\config.bgi" /timer:0 /nolicprompt /silent
Next Copy that shortcut and it in "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup"
Reference:
https://serverfault.com/questions/451791/run-bginfo-at-startup-for-all-users
For show active IP v4 only, there are vb script:
strMsg = ""
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set IPConfigSet = objWMIService.ExecQuery("Select IPAddress from Win32_NetworkAdapterConfiguration WHERE IPEnabled = 'True'")
For Each IPConfig in IPConfigSet
If Not IsNull(IPConfig.IPAddress) Then
For i = LBound(IPConfig.IPAddress) to UBound(IPConfig.IPAddress)
If Not Instr(IPConfig.IPAddress(i), ":") > 0 Then
strMsg = strMsg & IPConfig.IPAddress(i) & vbcrlf
End If
Next
End If
Next
Echo strMsg
IP.vbs
Reference:


No comments:
Post a Comment