How do I embed exe file in A MS Access Form and Run it at run time ? (1 Viewer)

mojtaba

New member
Local time
Today, 14:21
Joined
Sep 15, 2021
Messages
18
I'm using MS Access 2003 for Special and old problem with .mdb project

I want embed my file like .txt or .exe or .pdf and Run it at runtime Or write that on disk

What have I tried :
111111.png

Code:
Private Sub Form_Load()

    Dim obj As Object
    Set obj = Me.OLEBound1.Object
    obj.DoVerb (acPrimaryVerb)
  
End Sub



But I get this error :

Untitled.png


please help me
 

Attachments

  • 111111.png
    111111.png
    43.8 KB · Views: 60

ebs17

Well-known member
Local time
Today, 11:51
Joined
Feb 7, 2020
Messages
1,946
An EXE file runs the simplest, you need the full path for this:
Code:
Shell "X:\Anywhere\Special.exe"
I don't understand your actions. You must have the path ready, so save it or determine it.
 

mojtaba

New member
Local time
Today, 14:21
Joined
Sep 15, 2021
Messages
18
An EXE file runs the simplest, you need the full path for this:
Code:
Shell "X:\Anywhere\Special.exe"
I don't understand your actions. You must have the path ready, so save it or determine it.
Suppose you want to do this yourself, what exactly do you do? Can you give me the complete code?

actually I just used the code I found on internet that related to my question
 
Last edited:

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 04:51
Joined
Feb 28, 2001
Messages
27,186
Please note that many systems that have anti-viral packages will block the programmed launch of a .EXE file. Also, it is not clear to me that an embedded .EXE file can be launched quite so easily as you suggested unless you extract it first. Finally, an embedded .EXE file can easily be detected by anti-viral packages that might then block the containing file from being launched, long before you get to the point of launching anything from within the file.
 

mojtaba

New member
Local time
Today, 14:21
Joined
Sep 15, 2021
Messages
18
Please note that many systems that have anti-viral packages will block the programmed launch of a .EXE file. Also, it is not clear to me that an embedded .EXE file can be launched quite so easily as you suggested unless you extract it first. Finally, an embedded .EXE file can easily be detected by anti-viral packages that might then block the containing file from being launched, long before you get to the point of launching anything from within the file.
I wrote a C# program called BMH.exe, which I open and run through Access, but I want this file to be in my source in any way possible so that the user does not have to place this file next to the program or somewhere It has Windows,

I also don't want to do things like downloading from the site, creating an installation file, I just want to access this program in any possible way through the embedded file itself, which is in the form of OLE Object and from the Packager Shell class. Write the object to a specific address or run it directly from Access itself

Note: I accept All risks
 

Users who are viewing this thread

Top Bottom