Marook-Online
* 06.Feb.2012, 14:47 UTC+1
Welcome, Guest. Please login or register.
Username:
Password:

News: Back again Wink
Main Menu
  Navigation
   Downloads
     Tools
     Music Discs
     SMF Mods
     Trainer & Patches
     EgoShare Uploader
   Guestbook
   NoPaste
   User Map
   Gallery
  
   Malware Scan
   Hacker Blacklist
   Find Abusemail
Top Downloads
Support Me !
Help me by donating a small amount!



Advanced search

Google


Pages: [1]   Go Down
0 Members and 1 Guest are viewing this topic. Topic Tools  
Read
24-Feb-2007 12:56
Marook
Administrator
*****
Offline Offline

Joined: 01-Jan-2005
Posts: 224


There are 2 workstations at work. Both are configured exactly same. But only the first WS
has a share, and the second WS should map the drives. My boss does every morning the
same mistake and powers on the second WS at first. There is no share to connect, so
if you want to use it you must enter username and password and this costs time Wink
Use this script... Wink

Code:
' Create the Network object
Set objNetwork = WScript.CreateObject("WScript.Network")

'adjust this to your requirements... enter ip or name
strComputer = "192.168.2.5"

' Use WMI to connect the services
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

' Loop until the share is accessible
Do
    Set colFolders = objWMIService.ExecQuery _
    ("Select * From Win32_Directory Where Name = 'D:\\Data'")
Loop While colFolders.Count = 0

' Share found, do what you wanna do... ;)
MsgBox("Share on server found !")
Logged
 

Pages: [1]   Go Up
Jump to:  

Theme by webtechnica.net

MHD v2.1 © 2oo8 by Marook
32116 hacking attempts defended!