Search found 50 matches

by Gyorgy Nemesmagasi
Sun Nov 22, 2009 4:42 pm
Forum: VBScript
Topic: swbemobjectex access denied
Replies: 6
Views: 11066

swbemobjectex access denied

It's no so many information... What has been missed by the script - the printer port, the printer or both? Does the script works stand alone without the SMS distribution in the same circumstances? Do you have any error code on the SMS distribution report? Does the SMS program run in user or admin c...
by Gyorgy Nemesmagasi
Thu Nov 19, 2009 4:09 pm
Forum: VBScript
Topic: VBScript - Delete locked files
Replies: 6
Views: 11721

VBScript - Delete locked files

The problem about the double )) when you call the run method. Try this way. You need to copy the openfiles into the folder of your script. If you don't want to check the return code of the executable you not need to use the brackets. Dim oShell Dim strScriptFolder Dim strCommand Set oShell = WScript...
by Gyorgy Nemesmagasi
Tue Nov 17, 2009 4:31 pm
Forum: VBScript
Topic: Multiple Regular Expressions
Replies: 3
Views: 6395

Multiple Regular Expressions

Create two output files, one with the original pattern and an other with without the [^n] in beginning of the pattern and check the difference in the output. In the second case you will find an empty line in the very beginning of the output file because the first day name also matched and has been c...
by Gyorgy Nemesmagasi
Sat Nov 07, 2009 8:01 am
Forum: VBScript
Topic: Junction Point destination script
Replies: 8
Views: 6851

Junction Point destination script

An other solution. Call the function with the output of the fsutil (sEcho). You can use ChrW to create a unicode char as well. Function ParseUnicode(strText)   Dim objRegEx, colMatches, objMatch, strHexText     Set objRegEx = CreateObject("VBScript.RegExp")   objRegEx.Global = True   objRe...
by Gyorgy Nemesmagasi
Tue Nov 03, 2009 11:16 pm
Forum: VBScript
Topic: AD Users: Inherit Perms From Parent
Replies: 7
Views: 5775

AD Users: Inherit Perms From Parent

You can modify the base part of the search string - strQuery.
strQuery = "<LDAP://OU=TESTUsers,OU=TEST," & strDNSDomain & ">;(&(objectCategory=person)(objectClass=user));distinguishedName;subtree"
by Gyorgy Nemesmagasi
Tue Nov 03, 2009 10:35 pm
Forum: VBScript
Topic: AD Users: Inherit Perms From Parent
Replies: 7
Views: 5775

AD Users: Inherit Perms From Parent

Code: Select all

<LDAP://OU=TestUsers,OU=Test,DC=yourdomain,DC=net>
by Gyorgy Nemesmagasi
Tue Nov 03, 2009 8:00 pm
Forum: VBScript
Topic: Junction Point destination script
Replies: 8
Views: 6851

Junction Point destination script

Regarding your script which process the fsutil output: you can not skip the 00 bytes. The subsitute name is a unicode string and every char encoded on two bytes. So if you skip 00 bytes you will be trouble with non-english/special chars in the substitute name. Mount Point Reparse Data Buffer http://...
by Gyorgy Nemesmagasi
Tue Nov 03, 2009 12:58 am
Forum: VBScript
Topic: RegEx for Versions
Replies: 2
Views: 2250

RegEx for Versions

I missed the examples. The proper ones are:
strText = "Adobe Acrobat 8.1.3"
and
strText = "Adobe Acrobat v8.1.3a"
by Gyorgy Nemesmagasi
Fri Oct 30, 2009 2:50 am
Forum: VBScript
Topic: Regular Expression question...
Replies: 2
Views: 2293

Regular Expression question...

If you processing a multiline string the situation is a bit differnet. You can change the code if you have DOS text (the line break is CrLF): objRegEx.Multiline = True objRegEx.Global = True objRegEx.IgnoreCase = True objRegEx.Pattern = "^(s*WSIDs*=s*)(S+)s*$" strText = objRegEx.Replace(st...
by Gyorgy Nemesmagasi
Fri Oct 30, 2009 1:16 am
Forum: VBScript
Topic: AD Users: Inherit Perms From Parent
Replies: 7
Views: 5775

AD Users: Inherit Perms From Parent

It's a bit different what you asked before. You would like to enumerate all users in a domain or enumerate all users in an OU (and sub OUs)? Please decide what you like to see in the script. My bet is your code try to implement the second choice. The incomplete CommandText string cause the error mes...