Open external application from access - ms-access

I have been looking online how to open an application through Access using VBA. I have since found the below example code, that does work:
Application.FollowHyperlink "J:\Prepay\GE Debt logger.accdb"
I have resolved my problem, but I did notice that whilst trying to find my answer, most advice online suggested the below method or something similar:
Shell "Z:\DATA\METRO\ComTool\Update\Update.mdb"
My questions is, the methods I was finding online involved modules, or the use of shell, I wonder why? Why not just use the .followhyperlink, is there a reason not to?

The shell function doesn't work only with executables.
I tried it with MSAcesss 2010 and it not worked.
FollowHyperlink is working, but start an executable with a security question.

Related

NativeScript, Code Sharing and different environments

Note: this is not a dupe of this or this other question. Read on: this question is specific to the Code-Sharing template.
I am doing some pretty basic experiments with NativeScript, Angular and the code sharing templates (see: #nativescript/schematics).
Now I am doing some exploration / poc work on how different "build configuration" are supported by the framework. To be clear, I am searching for a simple -and hopefully official- way to have the application use a different version of a specific file (let's call it configuration.ts) based on the current platform (web/ios/android) and environment (development/production/staging?).
Doing the first part is obviously trivial - after all that is the prime purpose of the code sharing schematics. So, different versions of the same file are identified by different extensions. This page explain things pretty simply.
What I don't get as easily is if the framework/template supports any similar convention-based rule that can be used to switch between debug/release (or even better development/staging/production) versions of a file. Think for example of a config.ts file that contains different parameters based on the environment.
I have done some research in the topic, but I was unable to find a conclusive answer:
the old and now retired documentation for the appbuilder platform mentions a (.debug. and .release.) naming convention for files. I don't think this work anymore.
other sources mention passing parameters during the call to tns build / tns run and then fetching them via webpack env variable... See here. This may work, but seems oddly convoluted
third option that gets mentioned is to use hooks to customize the build (or use a plugin that should do the same)
lastly, for some odd reason, the #nativescript/schematics seems to generate a default project that contains two files called environment.ts and environment.prod.ts. I suspect those only work for the web version of the project (read: ng serve) - I wasn't able to get the mobile compiler to recognize files that end with debug.ts, prod.ts or release.ts
While it may be possible that what I am trying to do isn't just supported (yet?), the general confusion an dissenting opinions on the matter make me think I may be missing something.. somewhere.
In case this IS somehow supported, I also wonder how it may integrate with the NativeScript Sidekick app that is often suggested as a tool to ease the build/run process of NativeScript applications (there is no way to specify additional parameters for the tns commands that the Sidekick automates, the only options available are switching between debug/release mode), but this is probably better to be left for another question.
Environment files are not yet supported, passing environment variables from build command could be the viable solution for now.
But of course, you may write your own schematics if you like immediate support for environment files.
I did not look into sharing environment files between web and mobile yet - I do like Manoj's suggestion regarding modifying the schematics, but I'll have to cross that bridge when I get there I guess. I might have an answer to your second question regarding Sidekick. The latest version does support "Webpack" build option which seems to pass the --bundle parameter to tns. The caveat is that this option seems to be more sensitive to typescript errors, even relatively benign ones, so you have to be careful and make sure to fix them all prior to building. In my case I had to lock the version of #types/jasmine in package.json to "2.8.6" in order to avoid some incompatibility between that and the version of typescript that Sidekick's cloud solution is using. Another hint is to check "Clean Build" after npm dependency changes are made. Good luck!

VBA Access - Find early binding code

I am working on some software, and due to bad practice by me (sorry) and a surprise update in software, the new software will be ran accross two different versions of office, which wouldn't be an issue if I had put some dependencies on certain object libraries in the references.
I plan on converting this to "late binding" in order to solve this problem, though the problem is that I have a lot of code already written, and im not 100% sure where all of the code that requires this library is.
Is there an easy way to find everything that creates a dependancy on this object library?
I know that the only object library that gets updated when the software is opened is MS word 14.0 to MS word 15.0, so I'm guessing it's only the macros i have which interact with MS word, is there an easy way to narrow this down?
Thanks for the help,
To all those wanting to scream at for me for such a rookie mistake, I'll promise i'll do better next time,

Injecting into an EXE

I really want to inject my C++ program into another (compiled) program. The way I want to do this is changing the first part of bytes (where the program starts) to goto the binary of my program (pasted into an codecave for example) and when it is finished running to goto back where it went before the injected program started running.
Is this is even possible? and if it is, is it a good/smart idea todo so?
Are there other methods of doing so?
For example:
I wrote a program that will write the current time to a file and then terminates, so if i inject it to Internet Explorer and launch it, it will first write its current time to a file and then start Internet Explorer.
In order to do this, you should start reading the documentation for PE files, which you can download at microsoft.
Doing this takes a lot research and experimenting, which is beyond the scope of stackoverflow. You should also be aware that doing this depends heavily on the executable you try to patch. It may work with your version, but most likely not with another version. There are also techniques against this kind of attack. May be built into the executable as well as in the OS.
Is it possible?
Yes. Of course, but it's not trivial.
Is it smart?
Depends on what you do with it. Sometimes it may be the only way.

Bolt CMS - posix_getuid()

I've seen that there are other bugs which mention this issue but I think this one is slightly different. I have 3 folders in the files directory and when using the file manager I can access the first folder 2015-04 fine and as expected. However when I attempt to access the other two folders 2015-05 and 2015-06 I receive the following error.
Call to undefined function Bolt\Filesystem\posix_getuid()
If this is a result of PHP posix not being installed, then why can I access the first folder fine. Which is what leads me to think the issue is something else, but I could be wrong.
Thanks in advance for any help.
Yes, it is php-posix not being installed causing the error to be thrown.
The posix_getuid() function is called to check file read/write access under certain circumstances.
The files/ folder is checked fairly early in the bootstrap, and I am guessing that 2015-04 has read/write and that 2015-05 and 2015-06 allow read, but not write access to the web server's user context.
There was a workaround for this fairly late in 2.1.x from memory, but you're better off to install/enable the POSIX extension if at all possible.

Sharing VB code between several Access 2013 Projects

I am working on several different access projects that share a lot of code. Right now what I do is importing modules, which is fine as long as I'm the only one working on it, but for the future I need a better solution (also better than password protection).
What would be the best way to share code? I have Visual Studio 2013 for that purpose. I have tried creating a dll and com objects, but I couldn't add the files as a reference to Access, I think maybe it's because it was .NET, I'm not really sure.
As you can see I am not familiar with this subject, and so any hints/links/buzz words would bee highly appreciated.
Thanks, Yotam
One way to share code among VBA projects is to store the common code in a separate .accdb file (say, "CommonCode.accdb") and then add a Reference to that file in the various VBA projects that will use those common procedures and functions.
To add such a reference you need to click the "Browse..." button in the References dialog and then choose "Microsoft Access Databases (*.accdb)" from the "Files of Type" drop-down:
I believe that the best way to share a VBA code is not to let it readable, but compiled.
You can do this by creating an Access Runtime, .accdr.
version control with ms-access: check here and there
well ... these are the links to my own answers to this question, but I do not mind if you check and prefer other's answers