I think I figured it out - An LDAP query
On error resume next
Set objRootDSE = GetObject("LDAP://RootDSE")
If Err.number <> 0 Then
wscript.quit
Else
regedit
End If
On Error Goto 0
All users no matter their security settings or just being a user and non admin should be able to get the RootDSE...
No those don't work either the problem is alot of people disconnect from the VPN and then go to shut down their computers pretty quickly.
All of these variables either stay in memory or flush out only after minutes of being disconnect both don't work in the quick shutdown method.
As far as...
Okay I need to come up with a real time way to check to see if a machine is connected to a very complex domain.
Currently I was thinking of using -
Set objADSystemInfo = CreateObject("ADSystemInfo")
strDomain = objADSystemInfo.DomainDNSName
wscript.Echo strDomain
The problem is this takes...
No nothing is wrong with that field that I can see -
I have it narrowed down though if I do a -
Set objNet = CreateObject("WScript.NetWork")
strComputer = objNet.ComputerName
This returns the good information and allows for processing. IMHO this is a kludge to get it to work however.
If...
Okay thew below code works just fine but ONLY if I got to strComputer and I type in a machine name in the field E.G. my computer is named COMPUTERNAME. I type in strComputer = "COMPUTERNAME" and it runs. If I type in strComputer = "computername" or "compUternAme" or "." I get no processing once...
I have 70+ printers that were moved from server X to server Y.
E.G.
\\X\1 now is \\Y\1
\\X\2 now is \\Y\2
\\X\3 now is \\Y\3
and so fourth.
Is there any way to switch any drive mapping easily and keep the one that was the old default still the default one.
E.G. Machine 1 has has printers 1...
Sorry this project got waylayed a little bit - putting out other fires at work and all.
And I found the solution you alluded to -
http://www.microsoft.com/technet/scriptcenter/resources/qanda/aug05/hey0810.mspx
One question how do I compare this date/time output bottom code example and...
Disabling user accounts isn't an option as alot of users have multiple machines and me making a person 100% down when they could be 50% productive ins't going to be supported by my boss. 3+ hours is the timeframe I need to determine if a machine is idle... I simply can't be taking over a PC...
Yeah but thats too short of a time.... I need some kind of counter for idle or sometehing. Our Screensaver is set to 5 minutes so if a person just walks away to get a cup of coffee the screensaver is on. I am thinking about a 3+hour idle time is more what I am gunning for. This will take care of...
I need to come up with a way to determine if a user is logged into a machine or not and if the user is logged into the machine how long the machine has been in an idle state.
We have a TON of users who leave their computers up 24/7 but we have to do maintenance on machines. On the same note...
I would be able totoss together a vb scrip easily but I do know I just hate sendkeys its too flakey and really is dependant upon how its ran. I don't want to think I can trust the people running what i am setting up to not take the window from the forefront or something like that.Also I have...
We have to setup a ton of computers all with Extranet Access Client. The entire setup is double click the setup and next next next next all the way through. Is there any switch to do this silently? The file I am working with is eac501d.exe the problem is I do a /? in there and it gives me no...
Where I used to work we had a code we punched into the phone that gave us the physical port and the extension of the phone right on the phones LCD display. Now I am in another facility and this functionality I was used to using is not there.
I am a network guy not a phone guy but attempted to...
Okay here is a simple piece of code I am playing around with I am going to tweak it ALOT but the problem I have is I can't get the binary value to output.
Dim strDate, strTime, OUTPUT_FILE_NAME, strKeyPath1, strKeyPath2
strDate = Replace(Date,"/","-")
strTime = Replace(Time,":","-")...
so if you have an if/then that isn't part of a what something is set as then the on error resume next will change how the if/then functions? I didn't think On error resume next could influence an if/then statement because you have both paths clearly defined as if or then and there can't be an...
I got it working but can you explain this?
I did find one mistake I understand -
Set objLocalGroup = GetObject("WinNT://" & strComputerName & "/" & strLocalGroup & ",group")
Had computername instad of machinename. Which was the strmachinename I listed earlier. This changed its reporting but...
Someone on our network made a HUGE mistake and I am trying to fix it. I have tried ADSI and WMI with bad results I don't know if its the query I am using I tried this with ADSI -
strLocalGroup = "Power Users"
strMachineName = "Remote PC"
strDomainGroup = "Domain Group"
strDomainName =...
Well the repository fix was what did it for me -
Stop WMI service
Deleted the C:\winnt\system32\wbem\repository directory.
Start WMI service
Wait 1 minute for it to rebuild.
This did not fix about 10 but 10 out of 400 is alot better than 75 out of 400. I think I can tell my boss these 10...
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.