Changeset 570 for branches/guitools-2.0/shared/smbtree.vrs
- Timestamp:
- May 19, 2011, 8:37:51 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/guitools-2.0/shared/smbtree.vrs
r566 r570 274 274 line = linein(smbmachine.I) 275 275 276 if left(line,5) = "Error" then ok = VRMethod('CN_smbtree', 'SetRecordAttr', smbtree.!machine, 'UserData', "SERVER|"||strip(line))276 if translate(left(strip(line),5)) = "ERROR" then ok = VRMethod('CN_smbtree', 'SetRecordAttr', smbtree.!machine, 'UserData', "SERVER|"||strip(line)) 277 277 278 278 do while(left(line,1) = '09'x) /* Share loop */ … … 333 333 end 334 334 end 335 else do /* There are multiple workgroups, we need additional */ 336 /* measures tofind out which is our workgroup */ 337 say ' 'samba.!smbclientexe' -L "'Machine'" -N 'debuglevel' 2>'samba.!msg' 1>NUL' 338 address cmd samba.!smbclientexe' -L "'Machine'" -N 'debuglevel' 2>'samba.!msg' 1>NUL' 339 infoline = linein(samba.!msg) 340 if word(infoline,1) = "creating" then do /* upcase tables are missing */ 341 say "Missing upcase tables detected!" 335 else do 336 if workgroup <> "" then do 337 /* There are multiple workgroups, we need additional */ 338 /* measures to find out which is our workgroup */ 339 say ' 'samba.!smbclientexe' -L "'Machine'" -N 'debuglevel' 2>'samba.!msg' 1>NUL' 340 address cmd samba.!smbclientexe' -L "'Machine'" -N 'debuglevel' 2>'samba.!msg' 1>NUL' 342 341 infoline = linein(samba.!msg) 343 infoline = linein(samba.!msg) 344 end 345 IF options.!debug == 1 THEN say ' Response = "'Infoline'"' 346 ok = stream(samba.!msg,'c','close') 347 ok = SysFileDelete(samba.!msg) 348 349 parse var infoline "Domain=["WorkGroup"] "Rest 350 wgh = _GetMachinehandle(workgroup) 351 if wgh <> "" & VRMethod('CN_smbtree', 'GetRecordAttr', smbtree.!machine, 'Parent') = "" then do 352 ok = VRMethod('CN_smbtree', 'SetRecordAttr', smbtree.!machine, 'Parent', wgh) 342 if word(infoline,1) = "creating" then do /* upcase tables are missing */ 343 say "Missing upcase tables detected!" 344 infoline = linein(samba.!msg) 345 infoline = linein(samba.!msg) 346 end 347 IF options.!debug == 1 THEN say ' Response = "'Infoline'"' 348 ok = stream(samba.!msg,'c','close') 349 ok = SysFileDelete(samba.!msg) 350 351 parse var infoline "Domain=["WorkGroup"] "Rest 352 wgh = _GetMachinehandle(workgroup) 353 if wgh <> "" & VRMethod('CN_smbtree', 'GetRecordAttr', smbtree.!machine, 'Parent') = "" then do 354 ok = VRMethod('CN_smbtree', 'SetRecordAttr', smbtree.!machine, 'Parent', wgh) 355 end 356 end 357 else do 358 /* The machine does not allow browsing and does not report a workgroup */ 359 say ' "'Machine'" does not allow browsing. Unable to determine workgroup.' 353 360 end 354 361 end
Note:
See TracChangeset
for help on using the changeset viewer.