How to open a .exe file on another computer. (1 Viewer)

PCandNetworking

New member
Local time
Today, 17:44
Joined
Dec 17, 2002
Messages
5
Ok, I new, and working on a DB which will have a COMMAND button that will launch a EXE on another computer. That's pretty easy to do for 1 computer, but I have 40 different computers, that I want to launch an EXE on.

For example:

I made a Macro that launches \\ComputerName\SharedFolder\.exe

Now this path is consistent through out all of the computers, but the ComputerName changes.

So how can I accomplish this so it knows what the computer name is??

Either:

#1 - Grabs the ComputerName field from the current form, and executes the PATH using that ComputerName.

Or

#2 - Prompts me to enter a computer name

Thanks
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 16:44
Joined
Feb 28, 2001
Messages
27,511
Even though the information is in a shared folder, there is an implicit assumption that the shared folder on the targeted computer happens to be mapped at the moment. If not, you will have to write some serious code to do the mapping.

In fact, if you are new to Access, I might respectfully suggest that the magnitude of this effort might be beyond the skills of an Access beginner. Heck, I've been doing Access for a long time and I'm not sure how to approach this other than with some pretty ugly code that does WinAPI32 calls to do drive mapping and unmapping. I see LOTS of VBA code in your future.

There is another issue. If someone tried to do that in our environment, our network security person would probably bring armed guards to politely but very firmly escort you from the building. Along with whoever was silly enough to give you a hacker's assignment - because that is what you are talking about.

Running code on someone else's computer is ALWAYS suspect. Opening the hole in security that would allow you to launch a program remotely is based on something called a Remote Procedure Call. I suggest you look up that topic on the Internet and in the Access help files. Also, consider the Shell command as a way to launch a program from a mapped drive.

Don't get me wrong, I understand it is possible to legitimately have such an assignment. It is just that I, as a 30 year+ system administrator, would never open up my environment wide enough to allow it. And if a supervisor told me I had to, I would get it in writing and notarized, with many witnesses.
 

Users who are viewing this thread

Top Bottom