DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Secure the copy of the script to other computers

Solved!
Go to solution

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

0 Kudos
Message 1 of 3
(1,360 Views)
Solution
Accepted by topic author KOPA

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)
Message 2 of 3
(1,353 Views)

@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.

0 Kudos
Message 3 of 3
(1,284 Views)