+ Post New Thread
Results 1 to 2 of 2
Scripts Thread, Sharing folder on remote server in Coding and Web Development; I've got an AutoIT script that creates new users and on our old server 2003 server it would also use ...
  1. #1

    MK-2's Avatar
    Join Date
    Oct 2006
    Location
    Nottingham
    Posts
    3,237
    Thank Post
    149
    Thanked 581 Times in 307 Posts
    Blog Entries
    8
    Rep Power
    200

    Sharing folder on remote server

    I've got an AutoIT script that creates new users and on our old server 2003 server it would also use WMI to share their home folder.
    Since we upgraded to 2008 r2 I've tried running the script again and it does everything apart from sharing the folder on the server.
    it uses the win32_process command which i've read should still work on 64 bit servers.

    this is the command, which worked on server 2003 but no longer works, can anyone see why it doesn't?

    $FILE_SHARE=0
    $MAXIMUM_CONNECTIONS=-1
    $objWMIService = objGet("winmgmts:\\" & $datacomp & "\root\cimv2:Win32_Process")
    $Locator=ObjCreate("WbemScripting.SWbemLocator")
    $objWMIService = $Locator.ConnectServer($datacomp, "\root\CIMV2")
    $objNewShare = $objWMIService.Get("Win32_Share")
    $objNewShare.Create('"' & "F:\Home Directories\Junior Pupils\" & $username & '"', $username & "$", $FILE_SHARE, $MAXIMUM_CONNECTIONS, "Share for " & $username)

  2. #2

    MK-2's Avatar
    Join Date
    Oct 2006
    Location
    Nottingham
    Posts
    3,237
    Thank Post
    149
    Thanked 581 Times in 307 Posts
    Blog Entries
    8
    Rep Power
    200
    got it sorted, not quite sure how but it started working, so ignore this

SHARE:
+ Post New Thread

Similar Threads

  1. Room Booking Software, Install on Remote Office Server
    By BKGarry in forum How do you do....it?
    Replies: 9
    Last Post: 29th July 2009, 08:32 AM
  2. Replies: 3
    Last Post: 12th December 2007, 08:52 AM
  3. Replies: 6
    Last Post: 20th October 2005, 06:48 PM
  4. Replies: 20
    Last Post: 12th September 2005, 04:52 PM
  5. Replies: 24
    Last Post: 6th September 2005, 12:26 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •