Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

How do I map a drive without logging in?

  • 23-05-2006 8:50am
    #1
    Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭


    Heres the deal I have an application running as a service, however it needs to contact a mapped drive.

    I have set a persistent drive when logged in as that user but the service still doesn't work.

    Is there a way to get a service to make the persistent connections?


Comments

  • Registered Users, Registered Users 2 Posts: 68,317 ✭✭✭✭seamus


    I'm not sure if this is possible, but the one thing I can think of is a computer startup script. Set the service startup type to manual, then write a script along the lines of
    NET USE G: "\\path.to.share\Sharename"
    NET START servicename
    
    Then add that script as a computer startup script in (Local) Group Policy .
    In theory that should work, but it may not be possible to map drives without logging a user on. You could also use VBScript for the above, which has a good deal more power.

    I've always though that windows should allow you to mount a network folder in a local directory.


  • Registered Users, Registered Users 2 Posts: 2,426 ✭✭✭ressem


    According to MS
    http://support.microsoft.com/default.aspx?scid=kb;en-us;Q180362

    shouldn't use mapped drive letters with services, only UNC.

    SouperComputer asked something similar recently
    http://www.boards.ie/vbulletin/showthread.php?t=2054927305
    maaybe he found something better, but I suggested
    would you be comfortable altering and building the c++ program
    http://windowssdk.msdn.microsoft.com...to_a_share.asp

    to connect to a different path, and different user, using a config file if you prefer.

    Then setup to run as a service using instsrv and srvany
    http://support.microsoft.com/kb/q137890/

    Set service to run as local system account in the services control panel.

    Notice bit for XP only that states
    However, drive letters that are mapped from a service that is running under the local System account are visible to all logon sessions.


Advertisement