Could not modify HALCON-21.11-Progress - failed-installation

I will prompt this message when I uninstall Halcon and reinstall it
Try: I manually delete the registry files, and then the installation still fails

You should read the Halcon manual, chapter 3.
You could also delete this version manually from your pc.
Delete the '%HALCONROOT%/HALCON-21.11-Progress' folder.
Then go to 'Environment variables'.
Remove these variables:
And remove this line -> "%HALCONROOT%\bin%HALCONARCH%" from the 'Path' variable.

Related

Use VS Online "Command Line" task with relative paths

I'm trying to use the new VS Online Build process and, specifically, package my app as a NuGet package.
To do so I have to execute something like "nuget pack". My source code is in GitHub and there, under the root folder, I have a folder called .nuget with all necessary to do the packaging.
I've added to my build template a "Command Line" step with this parameters:
tool: C:\a\9ea8689c\myusername\myproject.nuget\nuget.exe
arguments: pack
Everything else is defaults, included working folder. This works. However when I've tried to replace the absolute path for something like ".nuget/nuget.exe" or .nuget/nuget.exe or even changing the working folder to .nuget and from there just type "nuget.exe" it repeatedly fails because it can't find the tool.
Am I missing something? Should the task work with relative paths?
You should use absolute paths leveraging TFS Environment Variables like TF_BUILD_BUILDDIRECTORY.
In a batch file it is something like
echo Launching my own NuGet copy
%TF_BUILD_BUILDDIRECTORY%\myproject.nuget\nuget.exe
This worked for me: $(BUILD.SOURCESDIRECTORY)\NuGet.exe.
Notice the dot instead of underscore. I have put my NuGet.exe in the main repository folder, in my case NuGet 3.5 Beta.

How to read Gradle's registry.bin?

I was working on Android studio (on the Mac) when I got the following message:
Error:Could not read cache value from
'/Users/Friso/.gradle/daemon/2.2.1/registry.bin'.
I don't know what caused it, since I didn't do anything to the build files.
How can I fix this?
Try deleting the /Users/Friso/.gradle directory and rebuild.
In my case, the registry.bin file was empty. However, there was a lock which seemed to be causing the issue. I deleted the lock file - registry.bin.lock from the /Users/varun/.gradle/daemon/2.8/ directory and it worked.
Hope this helps.
It also happened in my Linux environment. Deleting .gradle folder and rebuilding the project worked again.
The gradle directory (or one of its caches) is likely corrupted in some way. The easiest way to proceed is to delete the directory entirely. Navigate to /Users/Friso and run:
sudo rm -r .gradle
sudo rm -r ~/.gradle
This recursively removes the directory and all files within it. The latter is your home gradle cache.
In my case I had stopped the grade in between and turned off my laptop.The next time I opened and ran my gradle it gave error of could not read cache value from registry.bin.
The error was coming in every project of mine.
I did the following:
Go to C:\users\username.gradle\daemon\gradle version and delete registry.bin.lock file.
Hope this will solve your problem.
Delete registry lock file from c:\users{username}.gradle\demon{version} and then build again

wsimport is not recognized as internal or external command

I am trying to generate the files using wsimport and i am getting the above error. I have done the following steps:
1) JAVA_HOME -set to C:\Program Files\Java\jre7
2) c:\Desktop\Temp>wsimport http://www.w3schools.com/webservices/tempconvert.asmx?WSDL -extension -keep
running the above command results in error.
I have also tried appending /bin to the JAVA_HOME but it does not remove the error.
You need a JDK, not JRE. XJC is not a part of JRE bin.
JAVA_HOME variable does not include bin:
JAVA_HOME=C:\Programme\Java\jdk1.6.0_29
However PATH should include %JAVA_HOME%\bin.
This is where my jdk is, works for my system:
Go to My computer >> right click and select properties.
On the properties tab select Advanced system settings (Windows 7)
Click enviroment variables
select path and click edit option
add
";C:\Program Files\Java\jdk1.7.0_60\bin"
at the end.
Done.
This fixed my problem:
If you are 100% sure that everything is set-up.Try to close cmd and reopen it. It should start recognizing it.

NSIS play with InstalldirRegKey

From NSIS documentation, we have
root_key subkey key_name This attribute tells the installer to
check a string in the registry, and use it for the install dir if that
string is valid. If this attribute is present, it will override the
InstallDir attribute if the registry key is valid, otherwise it will
fall back to the InstallDir default.
So, if I have these lines in a .nsi file:
InstallDir "D:\myFolder\myFile"
InstallDirRegKey HKCU "Software\${PRODUCT_COMPANY}\${PRODUCT_NAME}" "Install_Dir"
I understand that I set my install directory to D:\myFolder\myFile as default directory, but if Software\${PRODUCT_COMPANY}\${PRODUCT_NAME} is a valid path, then I will use it instead. Is that correct?
From another post, I understand that the InstallDirRegKey instruction is used to overwrite previous installation at same location. How is it working more precisely? If I have the following,
InstallDir "D:\myFolder\myFile"
InstallDirRegKey HKCU "D:\myFolder\myFile" "Install_Dir"
will a new .exe file generated by the NSIS script overwrite the previous one? Or does it mean that the executable will overwrite the previous one?
InstallDirRegKey only reads from the registry, it never writes.
Before your .onInit is executed NSIS does:
If InstallDir is set, that path is copied to $Instdir
If InstallDirRegKey is set and the registry key exists, the path from the registry (With the filename removed) is copied to $Instdir
So if you want InstallDirRegKey to have any effect the next time a user runs the installer you must point it to a key that your installer creates in one of your sections. It can be the UninstallString command in your uninstall key or a application specific key like HKLM\Software\My Company\My App.
The whole point of this is that when the user re-installs or installs a new version of your app it will be installed in the same folder (overwriting/upgrading the existing install).

Where can I set path to make.exe on Windows?

When I try run make from cmd-console on Windows, it runs Turbo Delphi's make.exe but I need MSYS's make.exe. There is no mention about Turbo Delphi in %path% variable, maybe I can change it to MSYS in registry?
The path is in the registry but usually you edit through this interface:
Go to Control Panel -> System -> System settings -> Environment Variables.
Scroll down in system variables until you find PATH.
Click edit and change accordingly.
BE SURE to include a semicolon at the end of the previous as that is the delimiter, i.e. c:\path;c:\path2
Launch a new console for the settings to take effect.
Here I'm providing solution to setup Terraform environment variable in windows for beginners.
Download the terraform ZIP file from Terraform site.
Extract the .exe from the ZIP file to a folder eg C:\Apps\Terraform
copy this path location like C:\Apps\terraform\
Add the folder location to your PATH variable, eg: Control Panel -> System -> System settings -> Environment Variables
In System Variables, select Path > edit > new > Enter the location of the Terraform .exe, eg C:\Apps\Terraform then click OK
Open a new CMD/PowerShell and the Terraform command should work
Or you can just run this PowerShell command to append extra folder to the existing path:
$env:Path += ";C:\temp\terraform"
To add a PERSISTENT path (eg one that's permanent), you can do this one-liner in PowerShell (adjust the last c:\apps\terraform part)
Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value (((Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).path) + ";c:\apps\terraform" )
Alternatively, you can jump directly to the Environment Variables dialog by RUNning/CMD/PowerShell this:
rundll32.exe sysdm.cpl,EditEnvironmentVariables
I had issues for a whilst not getting Terraform commands to run unless I was in the directory of the exe, even though I set the path correctly.
For anyone else finding this issue, I fixed it by moving the environment variable higher than others!
Why don't you create a bat file makedos.bat containing the following line?
c:\DOS\make.exe %1 %2 %5
and put it in C:\DOS (or C:\Windowsè or make sure that it is in your %path%)
You can run from cmd, SET and it displays all environment variables, including PATH.
In registry you can find environment variables under:
HKEY_CURRENT_USER\Environment
HKEY_CURRENT_USER\Volatile Environment
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment
just copy it to system32 call make1 or whatever if the name conflicts.