Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: WntAccessAdd access NT
AddExtender("WWWNT34I.DLL") server = "\\C999SRV3" ;Doesn't work with drive letter ;resdir = "D:\USERDIRS\CSYS\CSYSMEH" ;Doesn't work with drive letter ;wntAccessAdd(server,resdir,"CSYSSFG",300,"DirNT:Read") ;wntAccessAdd(server,"%resdir%","CSYSSFG",300,"DirNT:Read") ;wntAccessAdd(server,"D:\USERDIRS\CSYS\CSYSMEH","CSYSSFG",300,"DirNT:Read") ;Works with UNC resdir = "\\C999SRV3\D$\USERDIRS\CSYS\CSYSMEH" wntAccessAdd(server,resdir,"CSYSSFG",300,"DirNT:Read")
AddExtender("WWWNT34I.DLL") server = "\\C999SRV3" resdir = "\\C999SRV3\D$\USERDIRS\CSYS\CSYSMEH" wntAccessAdd(server,resdir,"CSYSSFG",300,"DirNT:Read")Note that the second parameter, the resource/share-name (identifies the object to be modified) does not need to be a share or a full path. I.e., you can specify a directory here.
To use wntAccessAdd to change the permissions on a file on a remote server (ie, not the local machine), you need to specify the file name as a UNC, eg:
wntAccessAdd("server2", "\\server2\C$\test", "Everyone", 300, "DirNT:Read")("C$" and "D$" are standard admin shares to "C:\" and "D:\", etc.)
wntAccessAdd("","D:\","%domain%\Administrators",300,"DirNT:Full")I'm trying to set perms for the domain group Administrators. When I tried this specifying the localgroup Administrators -- replacing the variable 'domain' with 'boxname', I received the same error. Eliminating the variable preceeding the group solved the localgroup problem.
I am trying to add the domain group "Administrators" using wntAccessAdd. Does this function support global and local groups or only global groups? I can do anything I want with globals, but all my localgroup adds fail.
For windows Nt workstation, I am using the network extender WwwNT34I.dll, and for Windows 95 I am using WWW9x34I.dll.
When I run this script from windows NT it works fine, but when I run from 95, it goes to create the directories but when it gets to assigning rights, I get error 547 or 548. Syntax can not be wrong because the same statement runs perfectly from NT workstation.
My code NT workstation which works:
if (groups == "Admin_Asst") then resdir = ("%servername%\%volname%\books\%ISBN%\author") wntAccessAdd(server,resdir,"Admin_Asst",300,"DirNT:READ")and my code for Windows95 which doesn't:
if (groups == "Admin_Asst") then resdir = ("%servername%\%volname%\books\%ISBN%\author") w9xAccessAdd(server,resdir,"Admin_Asst",300,"DirNT:READ")I have a group name "Admin_Asst". I am trying to see if the variable group is equal to Admin_Asst, and if it is, it should go and assign rights to the folder, Author, whose UNC path is defined in the variable resdir.
Before it does this, it goes and creates folder on the server whose name is \\carmas004, and in the NTFS directory whose share name is "prog_db". In that share there is a folder named, books, which already exists in that share, "prog_db". So the statment "resdir=" will look like this:
servername=\\carmas004 volname= prog_db books=the folder which is already there ISBN= the number user is inputting in the system Author=folder which got created before this statement is run.
The w9x functions transfer the information to the NT machine and the AccessAdd is executed on the NT machine so it would need different path information.
This program will run fine on another computer but on 3 computers it crashes and with the error 548 or 547. If I plug in the laptop on the same jack where it's not working from, it will work on the laptop but not on the machine which the user is using. Any ideas?
(Can you log on as one of the users with your laptop?)
Article ID: W13571
Filename: wntAccessAdd versus w95AccessAdd Tips.txt
File Created: 2001:03:01:14:17:24
Last Updated: 2001:03:01:14:17:24