How to call an executable with Dll from a directory without this dll - powershell

I have a working directory a and
I have a directory b with an exutable and a dll which is used by the executable.
I want to launch the executable in the working directory.
With powershell I do that:
$env::path += ";C:\path\to\the\directory b"
Now I try to launch the executable from directory a
executableName
the programm is launched but it fails to work because it can't find the dll.
How can I fix the problem?

I have contacted the company that has done this executable file.
The problem comes from the file.
It's not a path related problem.

Related

Powershell accessing executable in wrong directory despite $PATH variable being set

I was trying to get vim going in powershell, and so I added C:\Program Files (x86)\Vim\vim82 to the PATH. However, when I try to run vim in powershell, it goes to the wrong folder, C:\Program Files (x86)\vim\vim80\vim.exe (note that it is incorrectly vim80 instead of the correct folder name of vim82).
There's nothing else in the path that would send it to vim80, and the vim80 folder doesn't even exist on my computer, so I'm kind of confused as to how that might happen...
And the desired vim.exe executable does run successfully if I actually navigate to the correct vim82 folder.

Change Directory to Folder Containing PowerShell Script - Regardless of Where That Folder Is Located

I have a script that I've created to prep our customer's servers for a software install. Part of this requires the script to be run as administrator, so just instructing people to click "Run With Powershell" doesn't get the job done. The script is in a folder with a number of .ini files that the script needs to copy to different server locations. If I just right-click the Powershell script and select "Run With Powershell," it is able to find the files and copy them without issue. Unfortunately, if I open the script in ISE, it opens with a default directory of C:\users\user, and I can't seem to copy those .ini files without first running a change directory command to get us to the folder that the script and the .ini files are in. But I'd like our installation techs to be able to run this without worrying about the exact location they initially drop these folders. I'd also like them to not have to worry about changing the directory manually in PowerShell. Some of our customers have multiple drives, and it might make sense to put this stuff on something other than the C drive, so it's hard to tell where this folder might end up. But I'm not sure of a command that will get me to the directory of the *.ps1 file, without knowing where that file is beforehand... Anyone have a suggestion?
You can use $PSScriptRoot that will have the location of the directory where the script is located.
This is referenced in the following post:
How can I get the file system location of a PowerShell script?

Find path from where .exe is run Autohotkey

I have a compiled ahk script in which I use %_A_WorkingDir% to get the current working directory. But now I'm calling the .exe from another file two folders up so %_A_WorkingDir% returns the directory that is two folders up, not the location of the actual .exe. How do I fix this issue?
A_WorkingDir is the directory in which the script is currently
working. You can change it by using
the command SetWorkingDir.
A_ScriptDir is the full path of the directory where the script is in.
A_ScriptFullPath is the full path of the current script.
https://autohotkey.com/docs/Variables.htm#prop

Write temp installation.log to .install4j directory

During setup a temporary log file is written to directory %TEMP%. This file is moved as installation.log to ${installer:sys.installationDir}/.install4j after setup finished.
Is there a way to let install4j write this temp. log file always directly to directory .install4j? Having it there it would be much easier to find it in case the setup crashes.
We're still using install4j 5.0.11.
Thanks in advance!
Frank
The problem is that the installation may not exit at startup and the installation directory may be changed in the installer.
However, you can pass the VM parameter
-Dinstall4j.alternativeLogfile=[path to log file]
to the installer to specify an alternative log file.

How do I edit the system definition files for quicklisp

I'm trying to install FUF/SURGE on my windows computer, and got stuck on a step.
Instruct quicklisp where to find the system definition files to load
fuf and dependent modules. Create a file in this folder:
~/.config/common-lisp/source-registry.conf.d with this content:
(:source-registry
(:tree (:home "fuf"))
:inherit-configuration)
I was wondering how do I get to the file listed above and how do i edit it? I have emacs installed with quicklisp/slime.
OK so you need to make these subfolders in your home directory. I'm guessing you installed under windows as I saw your comment on my video! Remember that part of the install was created a home folder and setting it's path in your environment variables.
~ is the symbol for the home directory so you need to create directories for this path ~/.config/common-lisp/source-registry.conf.d\ which for my setup would be c:\home.config\common-lisp\source-registry.conf.d\
Inside that create directory creare a fuf.conf file and paste the lines from the instructions.
I haven’t got a windows machine to hand but hopefully that's enough to get you going!