Can't run on Map Network Drive

  • Thread starter Thread starter kasama
  • Start date Start date
K

kasama

I will download the demo application server and install on windows 2003 server then install software ,Microsoft office it ok can run alway
And then I have the Accounting software ( Install on this server) but use this software from Map Network Drive

Can you Help me How to config software from Mapnetwork Drive ?



Thank you
 
Hi there,

In the current beta that should be out by the beginning of the next month, if the app to launch is on shared network drive, it will wait until the drive has been loaded.

Nixu
 
We have alleviated this issue by writing a script that waits for the mapped drive, then launches a shortcut to the application. This will work 99% of the time (you will very rarely get an error). I cannot speak for version 5's ability to do this on its own.

Code:
' Application Launching Script Version 1.0


Sub Delay(DelaySeconds)
SecCount = 0
Sec2 = 0
While SecCount < DelaySeconds + 1
Sec1 = Second(Time())
If Sec1 <> Sec2 Then
Sec2 = Second(Time())
SecCount = SecCount + 1
End If
Wend
End Sub

' Initialize File System Object
Set filesys = CreateObject("Scripting.FileSystemObject")
s=0

Do Until filesys.DriveExists("X:")
s=s+1
Delay 1
If s=10 Then Exit Do
Loop

If filesys.DriveExists("X:") Then
  Dim objWshShell
  Set objWshShell = CreateObject("WScript.Shell")
  objWshShell.Run """C:\Program files\Program\program.lnk""" 
  Set objWshShell = nothing
Else
  'Give user error
  msgbox "Unable to locate file. Please try again. If the issue persists, please contact support."
End If

You'll want to change this line:

Code:
objWshShell.Run """C:\Program Files\Program\Program.lnk"""

and place the path to your program. You will also need to replace x: anywhere you see it with the network drive letter you are using. Creating a shortcut to launch from this code actually seems to work much better than pointing directly to the executable on the mapped drive. The line

Code:
If s=10 Then Exit Do

means the script will wait for 10 seconds before timing out. Change that line to the wait you are comfortable with.

Just paste the code into a text file and save as a .vbs file, and point the appserver to the .vbs file on the terminal server (I usually create a folder in Program Files and set permissions accordingly)
 
Our solution

another thing we do is create custom dos batch files to connect to the network drive before launching the application - this ensure the network drive is connected then it calls the actual EXE or application. Then we setup shortcuts (*.lnk) files to those batch files so they start minimized and dont go showing the user the dos window (i know there are other cleaner solutions (hiding it all together) but this is quick and simple as well.) - We then tell the application server to use those .lnk files - we also have a directory on the ts server with icons for our applicatiosn so we can keep the same icons of the application.

Just sharing how we did it.

-D2G
 
Back
Top