cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Hi there,

I've created an image which allows users to run an application from a mapped drive. This is important for two reasons. The first is the software on the remote server is greater than 2GB in size (not ideal to copy this to every computer in our organisation) and the second is the software can be maintained from one central location (kept up to date with the latest changes)

I've followed the instructions from the various postings about changing the mapped drive for a variable in order to install shortcuts. That works fine.

But my problem is if the drive mapping is missing which it is when I assign the software using Active Directory group policy I get an error message "error 1327 Invalid Drive x:\".

So how do I stop the MSI from checking for this mapped drive?

Any help would be appreciated.
(8) Replies
CostFinalize action verifies that all the target directories are writable before allowing the installation to continue. However, it cannot be simply removed.

If the mapped drive is only used to create shortcuts, what you can do is to remove that record from Directory table, and use the property in Property table instead.
Thanks for your help.

Unfortunately the msi does not just contain shortcuts to software on a mapped drive.

We have to run a setup program which sets up the computer to run the software and copies over some registry keys etc.

Any other suggestions?

What's the worst that can happen if I remove the CostFinalize action?
Another way round this would be to have a custom action that checks to see whether the mapped drive exists and if it doesn't then it maps it.
I don't believe MSI will allow that. I haven't tried removing it personally, the installation will almost definitely fail to complete.

As long as your installation does not try to access (read from, write to, etc.) the network location during installation, a property will work. Else, I don't see a way to access the network location without a connection being established.
I have a VBSCRIPT that does that. Run this as a shortcut, Use Arguments drive=X: Path=\\xxx\xxx.exe

Option Explicit

'Declare Global Variables
Dim NRArray(1,2), TempArray, objArgs, I

'Set Argument List
Set objArgs = WScript.Arguments
If objArgs.Count <> 3 then
MsgBox "Incorrect number of arguments. NRMap will not launch"
Else
For I = 0 to objArgs.Count - 1
TempArray = Split(objArgs(I), "=")
If lcase(TempArray(0)) = "drive" then
NRArray(0,0) = TempArray(0)
NRArray(1,0) = TempArray(1)
ElseIf lcase(TempArray(0)) = "path" then
NRArray(0,1) = TempArray(0)
NRArray(1,1) = TempArray(1)
Else
NRArray(0,2) = TempArray(0)
NRArray(1,2) = TempArray(1)
End If
'WScript.Echo objArgs(I)
Next

End If

CALL Network()

Function Network()
Dim clDrives, wshNetwork, wshshell, Result, TmpArray, StrPath, NRRun, oExec, MappingExist

MappingExist = 0
Set WshShell = Wscript.CreateObject("WScript.Shell")
Set WshNetwork = WScript.CreateObject("WScript.Network")
Set clDrives = WshNetwork.EnumNetworkDrives
For i = 0 to clDrives.Count -1 Step 2
'WScript.Echo clDrives.Item(i)
If ucase(clDrives.Item(i)) = ucase(NRArray(1,0)) Then
'msgbox "Drive already mapped. Deleting..."
if ucase(clDrives.Item(i + 1)) <> ucase(NRArray(1,1)) then
WshNetwork.Removenetworkdrive NRArray(1,0), True
Else
MappingExist = 1
End If
End if

Next

If MappingExist = 0 then
WshNetwork.Mapnetworkdrive NRArray(1,0), NRArray(1,1), False
End If

NRRun = NRArray(1,0) + "\" + NRArray(1,2)

WshShell.CurrentDirectory = Left(NRRun, InstrRev(NRRun, "\"))
'WScript.Echo WshShell.CurrentDirectory

WshShell.Run NRRun
'WshShell.Run NRRun,,True

'App finished, disconnecting drive...
'WshNetwork.Removenetworkdrive NRArray(1,0), True
'For BOS this could not remain because on first launch the application spawns another 'process which the script could not follow

END FUNCTION

Regards

Mike
Capturing software that is run from a DFS shares or UNC path names is ok. But a mapped drive is not.
Hi,
I'm in the same boat almost.
But my requirement goes like this. The first feature installs A and the target drive will be shared and the short cut on the desk top. In the short cut properties, AllUser Profile should be there. tThat means all the workstation people should see the shortcut icon on their desktop.The second feature before installing workStation, it asks user to select the drive and to that particular drive it mapps. Then it starts installing the stuff.
I used NET USE command to map. In the drive letter's place in this command I'm using the variable which I got from the user's input.
Any ideas please?
Thanks,
gt
Hi all, this is the exact problem I'm having. Any more ideas on this??

THanks.