TCLiven
asked on
Mapping a local folder to a drive letter in Server 2008
I would like to know if it is possible to take a local folder such as e:\development (local on server 2008) and assign a drive letter to it, so all clients see the e:\development folder as g:?
For example:
orginal path -> e:\development
Clients (scripts) that connect to the server see the above path as g: locally.
I am asking since we have an in-house app that will only recognize a hard coded drive letter not a UNC path or share. I know, I know.. not the best practice however I am not the developer, I just need to know if this is possible and if so, how to do it.
subst g: e:\development will not work in this case since it is user based and we do not want to keep a user logged into the server at all times.
Please shoot me any ideas you may have. Thanks!
For example:
orginal path -> e:\development
Clients (scripts) that connect to the server see the above path as g: locally.
I am asking since we have an in-house app that will only recognize a hard coded drive letter not a UNC path or share. I know, I know.. not the best practice however I am not the developer, I just need to know if this is possible and if so, how to do it.
subst g: e:\development will not work in this case since it is user based and we do not want to keep a user logged into the server at all times.
Please shoot me any ideas you may have. Thanks!
Use SUBST on the server. Command SUBST associates a drive letter to a local path.
Example: SUBST G: E:\DEVELOPMENT.
Example: SUBST G: E:\DEVELOPMENT.
ASKER
Good catch..
The developer states locally run scripts as well linked server activities. I asked for more detail but have not heard back as of now. Didn't know if this was enough to put you in the right direction.
The developer states locally run scripts as well linked server activities. I asked for more detail but have not heard back as of now. Didn't know if this was enough to put you in the right direction.
ASKER
@MAds: Please see my comment above...
subst g: e:\development will not work in this case since it is user based and we do not want to keep a user logged into the server at all times.
subst g: e:\development will not work in this case since it is user based and we do not want to keep a user logged into the server at all times.
Yeah you said Subst wouldnt work in your question.
IF you talking about local on the server running as a service then I am not sure how you can do it.
Is the software developed IN-House?
IF you talking about local on the server running as a service then I am not sure how you can do it.
Is the software developed IN-House?
ASKER
Yes, the app is a home grown one. :(
Then tell your developer to Write code that works in a real world :D
ASKER
:o) He actually is stating that the obstacle is getting SSAS for the storagelocation setting to accept it in SSMS and BIDS. I guess it expects a drive letter... Anyone got any insight in that? I will continue to research...
I don't understand, why can't you have a startup script with the subst command to map the folder to a drive letter? That way it will map for each user that logs onto the machine.
ASKER
Hi OriNetworks -
Users are not specifically logging into the machine. Scripts are being run via SSAS and BIDS per a SQL job. Is there a way for a script to kick off with the SQL job that will perform the subst command w/o an actual login?
Users are not specifically logging into the machine. Scripts are being run via SSAS and BIDS per a SQL job. Is there a way for a script to kick off with the SQL job that will perform the subst command w/o an actual login?
What you are trying to accomplish, literally, doesn't make sense:
"Clients (scripts) that connect to the server see the path e:\development as g: locally."
Local folder OR drives in Windows servers are perceived remotelly through shares. Drives has default administrative SHARES as C$, D$, etc. In order to map a server drive, you have to map that SHARE as "\\servername\driveletter$ ".
If there is a client that expects to use server drive G as a "local" drive G, it must map that administrative SHARE as a "local" drive letter as in "NET USE G: \\servername\G$". After that, further references to server data is done through client drive letter G:.
So, if you have a script that has that NET USE command, just change that command to "NET USE G: \\servername\DEVELOPMENT", where DEVELOPMENT is a share to server folder E:\DEVELOPMENT. After that, further references to server data is done through client drive letter G: as it was before.
Please clarify why that is not a solution.
"Clients (scripts) that connect to the server see the path e:\development as g: locally."
Local folder OR drives in Windows servers are perceived remotelly through shares. Drives has default administrative SHARES as C$, D$, etc. In order to map a server drive, you have to map that SHARE as "\\servername\driveletter$
If there is a client that expects to use server drive G as a "local" drive G, it must map that administrative SHARE as a "local" drive letter as in "NET USE G: \\servername\G$". After that, further references to server data is done through client drive letter G:.
So, if you have a script that has that NET USE command, just change that command to "NET USE G: \\servername\DEVELOPMENT",
Please clarify why that is not a solution.
ASKER
Unfortunately I cannot explain why this is not a solution. I have to rely on the developer stating if it will work or not and I am told that it does not work. We have decided to rebuild the server (thank goodness, it is not production) to what will work with the developers/SSAS coding... Thanks anyways.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Maybe the script can not work directly with a share as "\\server\share\somefile", but once a share is mapped to a drive, the file will be seen as "X:\somefile", and applications will not be aware that a share was involved. There is no way for a client to access a server drive/folder that is not through a share and rebuilding the server will not change that.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Please see comments above. Even though I added the add'l drives prior to OriNetworks suggestion, it was the same thing we came up with. So I gave him the points.
Cause you also say Clients (Scripts) That "Connect" to the server?
Some more info please.