tsuji,
Will the following code (extracted from the link you provided) run the same on all PCs, independent of the local date format?
If Err.Number = -2147467259 OR dtmAccountExpiration = #1/1/1970# Then
WScript.Echo "This account has no expiration date."
Else
WScript.Echo "Account...
That's what I'd like to do, but I'm not sure how.
I'm trying to avoid doing this:
a) verify the format of the PC
b) compare it to the input file
c) adjust if necessary
I don't want to have to query the local PC for the date format. I'd like to be able to pass the date value into AD and...
When working with dates with Active Directory, the date is relative to the format specified on the local PC. Does anyone know of a way to force a particular format when using Active Directory independent of the local date format?
The problem I'm having is that the input files this script will...
I'm trying to reference the 'accountExpires' property of an account and am getting the following error:
Active Directory: The directory property cannot be found in the cache.
I can access the 'AccountExpirationDate' property, but not 'AccountExpires' property. Does anyone know...
tsuji,
I tried to run your code on one of our servers here, but when it gets to the .Remove line, I get the following error:
Z:\Untitled1.vbs(23, 3) Active Directory: Not implemented
Or if I turn On Error Resume Next on and display the error:
Err 80004001: Not implemented
Any ideas what might...
Question: is there a way to close/disconnect open files on server in VBscript?
I can see which files are open by parsing through as shown below, but is there a way to close the files using the information retrieved here?
Set obj = GetObject("WinNT://domain/server/LanmanServer")
for each...
PHV,
Deselecting the 'automatic' checkbox as described solves the error issue, but the warning that previously appeared is back. Have I missed something? The HTA is on a network share (eg: \\server\share\path\HTAfilename.hta and not a website, etc).
jfdabiri,
That did the trick for IE6. Thanks. This will work for the vast majority of my team.
However, I have 2 PC's, one with IE7, which doesn't seem to let me register the intranet site properly. When I enter in \\server\share as the site to register, it truncates it to file://server and...
jfdabiri,
The HTA works fine regardless of where it's stored. It's just that if it's not saved on the local PC, the above warning pops up before the program will execute. We'd like to get rid of this warning, as it's a nuisance, but the HTA works fine either way.
I'm having the same problem. The only answers I've found so far are:
1) Copy the HTA to the local computer (eg: C: drive) and execute it from there. Apparently, when it's anywhere but local, this message will appear.
2) Export the code which causes the problem to an OCX file and use that...
Mark,
I'm getting the SID from the foreign policy; when I query a WinNT object in an LDAP group, it only gives me the SID. (User name, description, adspath, etc - everything is either blank or it shows as the SID). (I don't know why it acts this way, and I don't have the option of changing the...
I can't find the property to display the SID. It doesn't seem to be <b>.SID</b> (this spawns an invalid property error). I tried <b>.ObjectSID</b> as well, which doesn't generate an error, but only displays <b>?</b> when I <b>wscript.echo</b> it.
The SID is just a string (S-xxxx-xxxx...) and I'm trying to get the account name. I have no information on the object except the SID (no domain, no account name, etc).
Is there way to search for a user account, given it's SID, using the WinNT:// provider? (I know it's possible with the LDAP provider, but need to do it with WinNT://)
The domains can both be resolved fine. I can access both domains fine, just not the NT4 objects embedded in LDAP objects (ie: when they're group members).
How can I enumerate WinNT domain user and/or group members in an LDAP group object?
The problem I have is that when I try the above, I loop through the members of an LDAP group, and when I get to a WinNT domain object (user or group), the name of the object is displaying as the SID instead of...
I've come across the tool dsquery, but I haven't been to hone it to get the right result. It may not be able to access user log in information, although it seems to process computer names and user information very quickly.
Does anyone have any experience with dsquery?
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.