Sharing and setinfo 
Author Message
 Sharing and setinfo

Excuse me for my stupid question but i don't understand why it doesn't
work
This is my javascript example:
Comodo = "WinNT://FINCANTIERI-MC/" + ComputerRemoto + "/lanmanserver";
                WScript.Echo("Get Object lanmanserver -" + Comodo +
"-");
                FServObj = GetObject(Comodo);
                Comodo = Costruzione+ "$";
                WScript.Echo("FServObj.create " + Comodo);
                NewShare = FServObj.create("fileshare",Comodo);
                if (NetUse.length != 0) {
                        Comodo = NetUse.substr(0,1);
                }
                else {
                        Comodo = DriveLetter.substr(0,1);
                }
                Comodo = Comodo + ":\\" + Costruzione;
                WScript.Echo("Path -" + Comodo + "-");
                NewShare.Description = "Sharing Costruzione " +
Costruzione;
                WScript.Echo("HostComputer: " + NewShare.HostComputer);
                NewShare.path = Comodo;
                NewShare.MaxUserCount = -1;
                WScript.Echo("setinfo");
                NewShare.SetInfo;
                strMsg = "Creato Sharing per Costruzione " + Costruzione
+ " come " + Costruzione + "$";
                FileLogHandle.WriteLine(strMsg);
                WScript.Echo("Creato Sharing");

This is My output:

Get Object lanmanserver
-WinNT://FINCANTIERI-MC/MC-NTS-NS01/lanmanserver-
FServObj.create 6059$
Path -D:\6059-
HostComputer: WinNT://FINCANTIERI-MC/MC-NTS-NS01
setinfo
L:\batch\CreaDirCostruzione.js: Errore di run-time di Microsoft JScript:
Proprie
t o metodo non supportati dall'oggetto

My Domain Name is FINCANTIERI-MC
My Server Name is MC-NTS-NS01
The DriveLetter on Remote Host is "D" and the created directory is in
D:\6059
The Drive letter where i do a netuse is "I"

I must use the Drive Letter of the Server or i must use the drive Letter
of the netUse.
I Can read the ADSI Help, when i double click on the .hlp file the help
say me tha it is not a correct Help File, i must have a more recent
version. Why?? I have Windows NT 4.0 Service Pack 3 and IE4.01 Service
Pack 1 .What i need?
Can someone send me a test file of the adsi??

Thank You



Fri, 06 Apr 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. ADSI SetInfo error codes

2. VB and setinfo error

3. WSH - sharing directories ( net share)

4. enumerating shares and share permissions with vbscript

5. share permissions and enumerating shares

6. List shares and share permissions?

7. Creating a share with share permissions

8. Can't get SetInfo to work on an IIS object.

9. Works as WSH, but put the SetInfo onto .ASP and it crashes with "General access denied"

10. Using WMI and VBS to share folders and set share / NTFS permissions....

11. renaming a shared folder

12. ? how do you share a variable between vb and java scripting

 

 
Powered by phpBB® Forum Software