|
#1
|
|||
|
|||
|
An application (written in Visual C++) resides on machine A. Data used
by this application also resides on machine A. We want to execute this application from machine B. The executable and data will reside only on machine A. Both machines are running Windows XP. A shortcut has been created on machine B to the shared folder on machine A which contains the executable. When this shortcut is clicked, the application starts properly on machine B. However, attempting to read the data gives errors. The application specifies a full path to the data (e g, C:\MyDirectory\MyData.txt). From the viewpoint of machine B, that probably means B's drive C:. That is wrong, because the data is on A's drive C:. How can the application specify that the path resides on the same machine as the executable? I have tried prefixing the path with the hostname of machine A (e g, \\MyHost\C:\MyDirectory\MyData.txt), but this gives an error when application is started on machine A. Can anyone explain how to accomplish this remote access to the data? |
|
#2
|
|||
|
|||
|
If I understand it correctly, you want local execution but remote data
access for a remotely stored executable. It might have been useful if you provided a specific error message or #, but I suspect the problem is not finding the data, but an issue of security/authorization. Btw, what is the transport protocol (tcp/ip, netbeui, smb)? I'm surprised you're not using RPC (Remote Procedure Call) for this app. Of course, this would result in remote execution, which perhaps isn't what you want. But it would avoid the current problem, it keeps data access local to execution. You could use an RPC just for data retreival, though. The reason an RPC will work is because it provides an authorization model. It's either that, or use a formal protocol like FTP, HTTP, whatever makes sense. Windows is probably not going to authorize remote data access via Windows workgroup authorization, which seems to be what you are assuming. HTH Jim "Loopy Lou" <sherwood@programmer.net> wrote in message news:1131956416.088866.88370@g47g2000cwa.googlegro ups.com... > An application (written in Visual C++) resides on machine A. Data used > by this application also resides on machine A. > > We want to execute this application from machine B. The executable and > data will reside only on machine A. Both machines are running Windows > XP. > > A shortcut has been created on machine B to the shared folder on > machine A which contains the executable. When this shortcut is clicked, > the application starts properly on machine B. However, attempting to > read the data gives errors. > > The application specifies a full path to the data (e g, > C:\MyDirectory\MyData.txt). From the viewpoint of machine B, that > probably means B's drive C:. That is wrong, because the data is on A's > drive C:. > > How can the application specify that the path resides on the same > machine as the executable? I have tried prefixing the path with the > hostname of machine A (e g, \\MyHost\C:\MyDirectory\MyData.txt), but > this gives an error when application is started on machine A. > > Can anyone explain how to accomplish this remote access to the data? > |
|
#3
|
|||
|
|||
|
Yes, local execution and remote data, with a remotely stored
executable. The error occurs with C RTL fopen. I did not note errno. The transport protocol is whatever the default is for Microsoft Windows networks. The reason for not using RPC is that the app was written to run on a local machine, and all we want to do is run another copy on a remote machine, with minimal program modifications. We can access the data from the remote machine using Windows Explorer, so it probably isn't an authorization problem. |
|
#4
|
|||
|
|||
|
"Loopy Lou" <sherwood@programmer.net> wrote in message
news:1131960733.727880.29460@g14g2000cwa.googlegro ups.com... > Yes, local execution and remote data, with a remotely stored > executable. > > The error occurs with C RTL fopen. I did not note errno. > > The transport protocol is whatever the default is for Microsoft Windows > networks. > > The reason for not using RPC is that the app was written to run on a > local machine, and all we want to do is run another copy on a remote > machine, with minimal program modifications. > > We can access the data from the remote machine using Windows Explorer, > so it probably isn't an authorization problem. > Wrong! The fact the data is accessible to Windows Explorer does NOT mean it is authorized to any application. That's why this is tricky. Even Windows Explorer needs permission, which you give by providing a logon to the remote Windows PC. That doesn't mean all application therefore inherit this authorization, each needs it own. If all you are doing is simply referencing the remote data in your local execution, it's sure to fail. Heck, if this wasn't the case, what would be the point of authorizations anyway, anyone could simply run an application remotely and access YOUR data. Again, I suspect your assuming that somehow, someway, authorization is either not needed, or happening impliciting, it's not. Jim |
|
#5
|
|||
|
|||
|
Suggestion, give BOTH machines the same username/password, and then try
again. If it now works, then its definitely an authorization problem. Jim "Loopy Lou" <sherwood@programmer.net> wrote in message news:1131960733.727880.29460@g14g2000cwa.googlegro ups.com... > Yes, local execution and remote data, with a remotely stored > executable. > > The error occurs with C RTL fopen. I did not note errno. > > The transport protocol is whatever the default is for Microsoft Windows > networks. > > The reason for not using RPC is that the app was written to run on a > local machine, and all we want to do is run another copy on a remote > machine, with minimal program modifications. > > We can access the data from the remote machine using Windows Explorer, > so it probably isn't an authorization problem. > |
|
#6
|
|||
|
|||
|
If rights are set correctly, here are a few thoughts.
Firstly, your UNC path syntax is incorrect )( \\MyHost\C:\MyDirectory\MyData.txt ). Where you show C: you should be showing the sharename or the other drive. This may be C with no colon or whatever else was chosen. It cannot be C colon). You could test yoursyntax in a command prompt with a net use command before using it with the program. Second, some older applications (I don't know if this is true in your case) may have a problem with UNC paths but can be used with a mapped drive. In that case, a batch file like the following can be used to launch the program. NET USE Q: \\server\share [/USER: username password IF NEEDED] Q: CD QAC QA1.exe NET USE Q: /delete /Yes cls exit -- "Loopy Lou" <sherwood@programmer.net> wrote in message news:1131956416.088866.88370@g47g2000cwa.googlegro ups.com... > An application (written in Visual C++) resides on machine A. Data used > by this application also resides on machine A. > > We want to execute this application from machine B. The executable and > data will reside only on machine A. Both machines are running Windows > XP. > > A shortcut has been created on machine B to the shared folder on > machine A which contains the executable. When this shortcut is clicked, > the application starts properly on machine B. However, attempting to > read the data gives errors. > > The application specifies a full path to the data (e g, > C:\MyDirectory\MyData.txt). From the viewpoint of machine B, that > probably means B's drive C:. That is wrong, because the data is on A's > drive C:. > > How can the application specify that the path resides on the same > machine as the executable? I have tried prefixing the path with the > hostname of machine A (e g, \\MyHost\C:\MyDirectory\MyData.txt), but > this gives an error when application is started on machine A. > > Can anyone explain how to accomplish this remote access to the data? > |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| RE: Remote Assistance in Windows 2000 | Amanda George | Windows XP Work Remotely | 0 | 01-05-2006 07:13 AM |
| Remote access to network storage device | Simon | Windows XP Work Remotely | 0 | 01-05-2006 07:13 AM |
| Routing and Remote Access Service, XP Home | Jojo | Windows XP Security Admin | 0 | 01-05-2006 04:17 AM |
| One-way connection: networked XP/2000 PC's | Cheryl | Windows XP Network Web | 22 | 01-05-2006 04:11 AM |
| Windows error message | Glo | Windows XP Basics | 41 | 01-05-2006 02:04 AM |