01-21-2022 07:48 AM
Hello,
I would like to ask how to ensure the spread of the script. My idea was to compare the computer name, but I couldn't come up with the right command. Thank you in advance for all the answers.
Pavel
Solved! Go to Solution.
01-21-2022 09:01 AM
Hi,
If you use VBA, the code can be something like this:
Dim objNetwork
Set objNetwork = CreateObject("WScript.Network")
Dim ComputerName : ComputerName = objNetwork.ComputerName
LogFileWrite(ComputerName)
If you are using Pyhon:
import socket
ComputerName=socket.gethostname()
print(ComputerName)
02-04-2022 10:07 AM - edited 02-04-2022 10:08 AM
@panta1978 ha escrito:
Hi,
If you use VBA, the code can be something like this:
Dim objNetwork Set objNetwork = CreateObject("WScript.Network") Dim ComputerName : ComputerName = objNetwork.ComputerName LogFileWrite(ComputerName)
If you are using Pyhon: io games
import socket ComputerName=socket.gethostname() print(ComputerName)
Thank you so so much. This answer was very very useful to me.