Can I specify a custom Drive Mapping in the CustomSettings.ini ?
-
Thursday, June 21, 2012 5:06 PMCan I specify a custom Drive Mapping in the CustomSettings.ini ?
All Replies
-
Thursday, June 21, 2012 5:10 PM
Nope, but it's easy to do.
I posted one solution here - http://social.technet.microsoft.com/Forums/en-US/mdt/thread/2ad9cce4-9e5f-43db-b7d2-2d3268fd58ef/#c11d3f6a-9f7e-4317-b845-34970df0d7aa
Create the script below and call it with the command line cscript %scriptroot%\ZTIMapDrive.wsf /DriveToMap:"\\server\path"
<job id="ZTIMapDrive"> <script language="VBScript" src="ZTIUtility.vbs"/> <script language="VBScript"> ' // *************************************************************************** ' // ' // Andrew Paterson 02/06/2012 ' // ' // Microsoft Deployment Toolkit Solution Accelerator ' // ' // File: ' // ' // Version: 1 ' // ' // Purpose: ' // ' // Usage: ' // ' // ' // *************************************************************************** Option Explicit RunNewInstance '//---------------------------------------------------------------------------- '// Global Constants '//---------------------------------------------------------------------------- ' No global constants needed '//---------------------------------------------------------------------------- '// Main Class '//---------------------------------------------------------------------------- Class ZTIMapDrive '//---------------------------------------------------------------------------- '// Class instance variable declarations '//---------------------------------------------------------------------------- Dim iRetVal '//---------------------------------------------------------------------------- '// Constructor to initialize needed global objects '//---------------------------------------------------------------------------- Private Sub Class_Initialize End Sub '//---------------------------------------------------------------------------- '// Main routine '//---------------------------------------------------------------------------- Function Main oUtility.ValidateConnectionEx oEnvironment.Item("DriveToMap"), True End Function End Class </script> </job>
- Marked As Answer by TheSuperman76 Thursday, June 21, 2012 5:30 PM
-
Thursday, June 21, 2012 5:30 PMThanks, I'll try that.
-
Thursday, June 21, 2012 5:47 PMCan I assume that this part: /DriveToMap:\\server\path cannot be a DFS share? We use them exclusively in our company so it'd sure be nice to map a drive (several, actually) within a TS.
Mike
south-central Nebraska -
Thursday, June 21, 2012 5:58 PM
Can I assume that this part: /DriveToMap:\\server\path cannot be a DFS share? We use them exclusively in our company so it'd sure be nice to map a drive (several, actually) within a TS.
Mike
south-central Nebraska
I have to admit that I've not tried a DFS share as I don't have one to hand. On the face of it I can't see any reason why it wouldn't work, but without trying there's no guarantee.
I'd suggest giving it a shot yourself, it should only take 2 or 3 minutes to do from the time you read this, you don't need to run it through a TS or anything, just treat it as a standalone script as a first test.
-
Thursday, June 21, 2012 6:05 PMWell, I've never scripted so I really hesitate to try. My reason for asking was that a reply to another recent post on this forum said that a DFS-R domain-based namespace couldn't be used as a network resource to install apps from; it had to be server-based.
Mike
south-central Nebraska -
Thursday, June 21, 2012 6:24 PM
Well I'm in no position to argue that it is supported/will work although I am curious now. I've had a look in the help and can see references to replication but not the namespaces so I can't see where it say's its explicitly not supported.
On the other hand, mapping a drive (which is what this is discussing) isn't the same as hosting a deployment share and building from it so I'd say to try it out and see what happens. You really don't have to worry about the scripting, it's just a matter of copying some text into notepad then saving it then running a command line.
-
Thursday, June 21, 2012 6:30 PMThanks, I think I'll give it a try. What you say makes sense.
Mike
south-central Nebraska

