If I change the function to one of the bellow codes,
the script will tell me that I'm connected to all 3 VLAN's.
MAC-address comparison is not correct I think. Don't see
the problem.
Function GetMac(ip) 'Begin GetMac function
'Set WshExec = WshShell.Exec("ping -n 4 -w 1000 " & ip) 'Run...
The BGinfo.exe screens are not visible, but the ping/arp commands generate the CMD screen. I want to hide those.
But when I change to WshShell.Exec to WshShell.Run the script is not working any longer..
Hi,
This code works for me. Only the CMD windows are visible.
Does somebody nows how to hide these?
Thx
Mickey
On error Resume Next
Set WshNetwork = WScript.CreateObject("WScript.Network")
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshProcessEnvironment =...
So line code below, only than with a tracert command.
Does anyone know how?
strTarget = "192.168.1.1" 'IP address or hostname
Set WshShell = CreateObject("WScript.Shell")
PINGFlag = Not CBool(WshShell.run("ping -n 1 " & strTarget,0,True))
If PINGFlag = True Then
MsgBox...
Wat I would like to do is retreive IP's from a tracert command, and if a certain IP exists in all IP's change the desktop color. We have 3 exact the same virtual server networks, only difference is a certain interconnect IP on a extra firewall (source ip on firewall). IP is pingable from alle 3...
Or use somthing like this:
'RESTORE DEFAULT DESKTOP ICONS
Set WshShell = CreateObject ("WScript.Shell")
' HIDDEN OR VISIBLE
' 1 = HIDDEN
' 0 = VISIBLE
' My Documents: "{450D8FBA-AD25-11D0-98A8-0800361B1103}"
' My Computer: "{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
' My Network Places...
Hi guys... My question is if someone has an idea how I can get een (graphical) progress bar when using robocopy to copy a large amount of files. I know a lot of people use this tool, and are missing this option.
I hope someone can help us all out here..
this code should do it
dim message, conf, stream
set message = CreateObject("CDO.Message")
set conf = CreateObject("CDO.Configuration")
set message.Configuration = conf
message.CreateMHTMLBody "http://www.nu.nl"
set stream = message.GetStream()
stream.SaveToFile "nu-nl.mht"
thx tsuji.. made the following code:
Dim oName, ODomain, oMyIP, oTo
' Get the computer name
Set WshNetwork = CreateObject("WScript.Network")
oName = WshNetwork.ComputerName
' Set the company specific information
' Company Internet Domain Name
ODomain = "my.domain"
' Set the SMTP server IP...
Does someone have a code that sends the content of a certain webpage/url as a html email automatically? I have a script that sends an attachment automatically, but I cannot figure out how to send any html content of a certain url.
Try something like this:
StrDomain = "domain.com"
set net = createObject("wscript.network")
Struser = net.username
DispUserInWhichGroup()
Function DispUserInWhichGroup()
On error resume next
Dim Group
Dim User
Set User = GetObject("WinNT://" & strDomain & "/" & strUser & ",user")
For Each...
I was more or less thinking of the sendkey function with
1. Windows key
2. All Programs
3. Right mouse
4. Sort on name
But since I do not know alle the right sendkey commands, I thought that maybe someone else knew ;)
Do you ??
I know. And I can't do this with RegDelete so I have a different code for this. However, this only works after you restart your computer or maybe login again. I'm looking for a way to do this on the fly. So without a logoff and login...
Const HKEY_CLASSES_ROOT = &H80000000
Const...
Thx for the reply tsuji !
But I'm looking for a way to build that function in VBS so I can let it run while users logging in. Do you know the code for this? Can remember that I saw it once with some sendkey commands. A shame that deleting certain registry keys is not enough anymore ;)
Try this to remove all subkeys too:
Const HKEY_CLASSES_ROOT = &H80000000
Const HKEY_CURRENT_USER = &H80000001
Const HKEY_LOCAL_MACHINE = &H80000002
Const HKEY_USERS = &H80000003
' Object used to get StdRegProv Namespace
Set wmiLocator = CreateObject("WbemScripting.SWbemLocator")
'...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.