PDA

Click to See Complete Forum and Search --> : [RESOLVED] Run Executable file from network drive?


chriskhan
Oct 13th, 2005, 11:59 AM
I have created an application that is to be stored on the network drive. We'll use a third application to create the link so that any user can go and run it form the shortcut. The issue is that it can't be run if it's from a network drive. It can be run locally on all machines.

The error messege I get is as followed:

Application has generated an exception that could not be handled.
Process id = 0x860(2144), Thread id=0x874(2164)


Please help.

Hack
Oct 13th, 2005, 12:56 PM
What is the third application that creates the link, and, after having been created, have you verified that it is a valid link?

randem
Oct 14th, 2005, 01:52 AM
chriskhan,

There are lots of reasons that this can happen:

You do not have all the dependencies that the app needs.
The files your app needs are at the wrong location
You are attempting to access a protected drive on the server

These are just a few. Without knowing more about your application it just guessing for now.

chriskhan
Oct 14th, 2005, 06:46 AM
Thanks for the response. Let me clarify this a little bit. I've created a standalone application that access our database to retreive the necessary records and export it to a text file. From the third party application we use for our every day business process, we can add a link to the file so that our users can just click on that link to get to the program that I created, which is stored in a shared network drive.

I guess my question is how would I get this program, it's just a standalone .exe file, to run off a network drive? I can't even put it in a shared folder and run it off from another machine. I was thinking that it might have to do with the internet option settings in the control panel, but I'm not sure if that might be. If I run the application from where the file is located, it runs fine. Is there a setting that I need to configure where the file is located to let it run off a network drive?

Hack
Oct 14th, 2005, 07:04 AM
randem hit on an important issue. Perhaps, does this application require dependency files to be present in the same folder as the exe in order for the exe to function properly?

randem
Oct 14th, 2005, 07:08 AM
chriskhan,

Each computer that wants to run your application will need a "Client" installed on it. The "Client" consist of all the support files for the exe (dll/ocx).

Please read Installation Problems in my signature.

chriskhan
Oct 14th, 2005, 03:36 PM
I tried using the Inno Setup 5 to create a setup.exe file and install it on the Server within that shared folder. I then install a copy on one of the client machine. I can run both locally, but when I try to run the one I installed on the server from the shared folder it gives me that error from my first post.

I have not done installation package before, but like the dll and ocx files that I need, how would I know which one it is or how do I specifiy those files. In my reference from my vb project, I have not reference anything other than
System dll files.

Anyone know if there are file permission issues with this?

randem
Oct 14th, 2005, 03:40 PM
chriskhan,

We will need to see you script in that case. How did you create your script? Did you use **********?

chriskhan
Oct 17th, 2005, 08:38 AM
Here is a copy of the script generated from Inno Setup 5. I'm not clear on what dll and ocx files to include in the project. As stated from previous post, I had not reference anything other then what's by default. I did not use the **********. I will look into that and see what it does.

The application does work when run locally for both machines, but the problem seems to come when running it from a shared folder/drive. I can put the application in the C drive and run it, but if I put it inside a shared folder(drive M) and run it, then I get the error as stated from my first post.


; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

[Setup]
AppName=Positive Pay
AppVerName=Positive Pay v.1.0
AppPublisher=Carlisle
AppPublisherURL=http://www.carlisle.com
AppSupportURL=http://www.carlisle.com
AppUpdatesURL=http://www.carlisle.com
DefaultDirName={pf}\Positive Pay
DefaultGroupName=Positive Pay
OutputDir=C:\Documents and Settings\ckhan\Desktop\Positive Pay
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes

[Languages]
Name: "eng"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "C:\Documents and Settings\ckhan\My Documents\BankOfAmerica\bin\BankOfAmerica.exe"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{group}\Positive Pay"; Filename: "{app}\BankOfAmerica.exe"
Name: "{group}\{cm:UninstallProgram,Positive Pay}"; Filename: "{uninstallexe}"
Name: "{userdesktop}\Positive Pay"; Filename: "{app}\BankOfAmerica.exe"; Tasks: desktopicon

[Run]
Filename: "{app}\BankOfAmerica.exe"; Description: "{cm:LaunchProgram,Positive Pay}"; Flags: nowait postinstall skipifsilent



I'm curious if anyone has created multi-user application to be use across a network, how do you reference the dll files? For me, I have not design an application to work across a network so all I do is go add a reference and search for the dll that I need in my application.

Also when setting up an installation package, if I do reference any dlls, don't I just include those with the installation package?

szlamany
Oct 17th, 2005, 08:55 AM
Our applications run off a network drive.

We simply use the VB app deployment wizard to install the .DLL's and .OCX's on each client machine.

We have no problems with that at all.

Seems odd to me that you can run the .EXE from the client and it works but if you run it from the network share it does not.

Is the "run-as" or "run-in" designations not available to the user. Such as does the "run-in" location point them back to the network location, where they might only have read access, but you are attempting to create a file there?

Is it a real shortcut - can you right-click on it?

Positive pay - I actually know what that is ;)

randem
Oct 17th, 2005, 12:50 PM
chriskhan,

All you are deploying is the exe. You can't expect it to work VB need more than that. Did you read the post I previously posted? Try using ********** in my signature, it will find all the dependencies that your app needs to deploy.

BTW: those dll's will need to be installed on each client in order to run you app from the network share.

szlamany
Oct 17th, 2005, 01:05 PM
Randem - did you see this post by chriskhan?

The application does work when run locally for both machines, but the problem seems to come when running it from a shared folder/drive. I can put the application in the C drive and run it, but if I put it inside a shared folder(drive M) and run it, then I get the error as stated from my first post.


Don't you think that the dll's and ocx's are installed on the client machine already?

randem
Oct 17th, 2005, 01:13 PM
szlamany,

Yes, I did. But he will still need to deploy dll's if needed to the server for if he is running on the server and the dll's he is looking for are not in the Working folder and not in the path errors will happen.

Let's say that aaa.dll is a dll he needs to operate and it is in the folder on the local drive. If you move just the exe to the shared drive then attempt to execute it it will fail unless the aaa.dll is also on the server in the same folder.

And that IS one way one would get that type of error.

wild_bill
Oct 18th, 2005, 01:58 PM
Whenever I make an install wizard, it includes the executable file. Is it possible to only deploy the dependancies?

randem
Oct 18th, 2005, 02:09 PM
wild_bill,

Inno Setup's wizard will not do that for you. You will have to use a third party tool such as ********** to do that automatically or MS's Depends.exe to do it manually. If you use depends you will need to search for and through .dep files also.

You can find ********** in my signature.

szlamany
Oct 18th, 2005, 03:23 PM
Whenever I make an install wizard, it includes the executable file. Is it possible to only deploy the dependancies?

When I use the standard deployment tool that comes with VB6, I simply uncheck the .EXE and get a setup for dll's and ocx's...

randem
Oct 19th, 2005, 01:10 AM
wild_bill,

If you remove the exe from the script the only thing that will be left is dependencies and you can create an installation package from that. But first you need to get the dependencies into your script.

chriskhan
Oct 19th, 2005, 08:07 AM
I have use Visual Studil 2003 to work my application and it's in VB.NET. When using **********, it's looking for the .VBP. Is there a way to change it in ********** to .vbproj?

randem
Oct 19th, 2005, 12:08 PM
chriskhan,

You never stated that you were using .NET, and since this forum is mainly for VB6 it was assumed. ********** is for VB6. Could you zip and post your .vbproj and exe? I will take a look.

chriskhan
Oct 21st, 2005, 11:11 AM
Sorry for not stating that this is related to VB.Net at the beginning of my post. Not sure where to post it, so I put it under Application Deployment section.

I finally got it to work now.

Thanks all. I did not realize that there's a deployment tool in Visual Studio.