w95ShareAdd and 528 Error Creating Share
Keywords: wntShareAdd w95ShareAdd Error 528 RMTSHARE
Question:
I've written a WinBatch that creates a directory on the c: drive and then shares it on the network with the "w95ShareAdd" function. It works correctly in both interpreted and compiled versions on the Windows95 workstation where I've installed Winbatch. But if I run the compiled version on other Windows 95 workstations it reports "error 528: Error creating share." I have included the www9534I.dll with the "addextender" function. Any suggestions about how to resolve this? Thanks.Answer:
- On the workstations where the w95ShareAdd fails...an you create the share manually?
Win95 needs the appropriate drivers installed to create shares.
- File sharing must be enabled.
Question:
I am trying to write a program that creates a share on an NT server from my NT workstation. When I use the following command I get error 528: Error creating share...wntShareAdd(servername, sharedir, username,0,-1)Any ideas?Answer:
Looks vaguely ok. Not sure what the various variables are set to from the code fragment. A hardcoded test might be easier to debug. Can you create the share manually? It might be a security issue or something.Question (cont'd):
Yes I can create the share manually using winfile.exe. The path I am using is a mapped network drive. The reason I am doing this is to share a directory I have created on an NT server from my desktop. I am administrator on the domain... Thanks in advance.Answer:
It probably the parameters are incorrect. From your example I can't tell what the variables are set to.The sharedir parameter must be set from the point of view of the machine the share is being created on. In other words, the NT shares MUST be done from the point of view of the NT Server. However, there IS a workaround which I have used in the past. Get the RMTSHARE program from the WinNT resource kit. This allows creating NT shares (including share rights) from the command line, which means that you should be able to ask for/read parameters from within WinBatch. We used this recently to allow creating shares for a CD ROM tower on an NT server.
Article ID: W13559Filename: wxxShareAdd - 528 Error Creating Share.txt