Newbee in NSIS, I was trying to implement the nsProcess plugin to check whether the current application is working or not ! I was successful in implementing the same in an example code, but when i tried implementing the same in my project i am getting an un expected output as shown in the Image message box below !! why am i getting this ?? please can anyone guide me. Thanks for the help in advance :)
Project Snipet!
!include "MUI2.nsh"
;!include "MUI.nsh"
!include LogicLib.nsh
!include "StrFunc.nsh"
!include "FileFunc.nsh"
!include WinMessages.nsh
!include "nsProcess.nsh"
;!include "FindProcess.nsh"
#Dummy Section
...
#EndSecton
!macro CheckAppRunning_ _FILE _ERR
App_Running_Check:
${nsProcess::FindProcess} "MyApp.exe" $R0
MessageBox MB_OK "$R0"
${If} $R0 == 0
MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION "Please stop App.exe before continuing" /SD IDCANCEL IDRETRY App_Running_Check
Quit
${EndIf}
notRunning:
!macroend
Function .onInit
!insertmacro CheckAppRunning_ `MyApp.exe` $R0
FunctionEnd
$R0 returns this value!!! why ???
This is most likely a ANSI vs Unicode compiler/plug-in mismatch.
If you are using NSIS v2 then you need to extract the correct plug-in version from the .zip (ANSI unless you are using a 3rd-party NSIS fork) into the plugin folder. If you are using NSIS v3 then there is a plug-in subfolder for each type, make sure you put the correct plug-in in each subfolder. The Unicode plug-in .dll is often in a Unicode subfolder or has a 'W' suffix in the filename in the .zip archive.
Related
I am trying to debug issues with dll version and paths.
I have a dump which shows this output for lmfsm which shows no path for few dlls.
Some of these dlls are app specific so i know they should be coming from same folder as MainEXE but i am not sure about others.
There is no path shown for dll present in same dir as main exe (dllPresentInSameDirAsMainExe.dll) and dll coming from gac (dll_from_gac.dll).
So, which dll is being picked up for System.IO.COmpression.dll which is present in my local MainEXE folder as well.
0:000> lmfsm
00000000`00220000 00000000`00228000 MainEXE D:\ABCPATH\MainEXEPkg.Code.1.0.0.20200323.1\MainEXE.exe
00000000`1aab0000 00000000`1ac3c000 dllPresentInSameDirAsMainExe dllPresentInSameDirAsMainExe.dll
00000000`1db50000 00000000`1dbcc000 dll_from_gac Dll.From.GAC.dll
00000000`20350000 00000000`2036e000 System_IO_Compression System.IO.Compression.dll
00007ffb`d0250000 00007ffb`d025e000 System_IO_Compression_FileSystem_ni C:\Windows\assembly\NativeImages_v4.0.30319_64\System.IO.Cf61e09c5#\c4e0a673a512f8626f9b499f8574dc90\System.IO.Compression.FileSystem.ni.dll
00007ffb`d7700000 00007ffb`d8344000 System_ni C:\Windows\assembly\NativeImages_v4.0.30319_64\System\66a8a818dfb2a81d684cd89cd3b83a80\System.ni.dll
So, how to find the path of System.IO.Compression.dll loaded in the process dump ?
WinDbg help says:
f
Displays the full image path. (This path always matches the path that is displayed in the initial load notification, unless you issued a .reload -s command.) When you use f, symbol type information is not displayed.
And indeed, a .reload -s seems to fix the problem:
0:000> lmf
start end module name
00f50000 00f58000 DebuggingEnumDefinition DebuggingEnumDefinition.exe
71640000 71692000 MSCOREE C:\WINDOWS\SysWOW64\MSCOREE.DLL
74e50000 74eef000 apphelp C:\WINDOWS\SysWOW64\apphelp.dll
751a0000 7539e000 KERNELBASE C:\WINDOWS\SysWOW64\KERNELBASE.dll
759a0000 75a80000 KERNEL32 C:\WINDOWS\SysWOW64\KERNEL32.dll
777c0000 7795a000 ntdll ntdll.dll
0:000> .reload -s
......
0:000> lmf
start end module name
00f50000 00f58000 DebuggingEnumDefinition C:\...\bin\Debug\DebuggingEnumDefinition.exe
71640000 71692000 MSCOREE C:\WINDOWS\SYSTEM32\MSCOREE.DLL
74e50000 74eef000 apphelp C:\WINDOWS\SYSTEM32\apphelp.dll
751a0000 7539e000 KERNELBASE C:\WINDOWS\System32\KERNELBASE.dll
759a0000 75a80000 KERNEL32 C:\WINDOWS\System32\KERNEL32.dll
777c0000 7795a000 ntdll C:\WINDOWS\SYSTEM32\ntdll.dll
i have installed Saxon/C extension step by step, by this documentation: http://zf4.biz/blog/installing-the-saxon-c-php-extension
I must install it for PHP5, so this documentation was great. It all works fine and if i use this "php -m | grep saxon -i" command they shows me the extension:
PHP Warning: Module 'Saxon/C' already loaded in Unknown on line 0
Saxon/C
But in the phpinfo(); the extension is not listet on.
Anybody know why this dont works?
This bug issue is related to the issue #4151. The call to the method getUnderlyingValue() should take not arguments
On line 836 of the file php5_saxon.cpp please replace:
obj = ooth->xdmNode->getUnderlyingValue(NULL);
With the following:
obj = ooth->xdmNode->getUnderlyingValue();
Alternatively you can download the following file which contains the fix:
php5_saxon.cpp
You should then be able to build the Saxon/c extension for PHP5. Installation instructions given here http://www.saxonica.com/saxon-c/doc/html/index.html
I installed the latest cygwin x86-64. I added diffutils to get the basic diff(1) linux command. When I now run it, I get:
diff.exe: error while loading shared libraries: cygsigsegv-2.dll
I did a search for the dll here, but there are zero matches, not found.
I then re-ran the installer and did a search in the installer search box on this dll, and nothing came up.
Can you please advise?
cygsigsegv-2.dll is part of package libsigsegv2, which is required by
diffutils:
# diffutils
sdesc: "A GNU collection of diff utilities"
category: Utils
requires: cygwin libiconv2 libintl8 libsigsegv2
Installing that package should fix the problem.
I am using CI and facing a problem while uploading file.
It gives a message mentioned below.
==================================================
Severity: Warning
Message: escapeshellarg() has been disabled for security reasons
Filename: libraries/Upload.php
Line Number: 1066
In some answers, I found that it is a server issue and CI has nothing to do with it. Now, is there any way to upload file bypassing the escapeshellarg() or is there any libraries I can use that doesn't require escapeshellarg()?
Please help.
I'm not sure which specific version of CI you're using, but the latest version does a check for that function before using it.
Take a look at the code here:
$cmd = function_exists('escapeshellarg')
? 'file --brief --mime '.escapeshellarg($file['tmp_name']).' 2>&1'
: 'file --brief --mime '.$file['tmp_name'].' 2>&1';
I'd say either upgrade or update the code manually.
I want to validate the username and password before proceeding with the NSIS install.
When I click on the next button, I want to check whether the user is authorized to install the application. For this check, I want to make a WCF call from my .NET application. It will return true or false.
Based on that, I will proceed or abort my installation. I tried using the CLR::Call /NOUNLOAD plugin. Since I am referring to a service reference, it is throwing the exception:
Error calling .net dll method
Here is the NSIS script that I have so far:
Name "Test CLRDLL MakeLogEntry"
OutFile "TestCLRDLL.exe"
Page instfiles
Section
start InitPluginsDir
SetOutPath $PLUGINSDIR
File "MyDll.dll"
CLR::Call /NOUNLOAD "MyDll.dll" "namespace.classname" \ "ValidateLogin" 3 "Myserviceaddress/Servicename.svc"; "username" "password"
pop $0
MessageBox MB_OK $0
sectionEnd
Function .onGUIEnd
CLR::Destroy
FunctionEnd
You should also know, that CLR::Call plugin works only with .Net 2.0 assemblies (not higher).
So maybe you should recompile your dll.
You cannot do this.
The CLR::Call plugin only supports .Net 2.0 assemblies.
WCF was introduced in .NET 3.0.