Subz Posted February 15, 2017 Share Posted February 15, 2017 Yes that is correct can you post the DisplayVersion value it should be under DisplayName? Link to comment Share on other sites More sharing options...
Nursultan Posted February 15, 2017 Author Share Posted February 15, 2017 Where? Link to comment Share on other sites More sharing options...
Subz Posted February 15, 2017 Share Posted February 15, 2017 Don't worry I noticed that it doesn't appear to have a display version from your screenshot, so here is the script, you'll notice that we check to see if the registry key exists RegRead('HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\{2E9A81FF-B19F-4F64-95B0-E688E09F7D7C}_is1', 'DisplayName') = '' if thats true it means NCALayer isn't installed so we then run the installer. #RequireAdmin ;~ JREx64 - Install this for x64 systems only If @OSArch = 'x64' Then ;~ ;~ Enables file system redirection for the calling thread. DllCall("kernel32.dll", "boolean", "Wow64DisableWow64FsRedirection", "boolean", 1) ;~ Turns On 64 Bit Redirection ;~ ;~ Installs Java Runtime 64 bit RunWait(@ScriptDir & '\jre-8u121-windows-x64.exe INSTALL_SILENT=Enable STATIC=Enable AUTO_UPDATE=Disable WEB_JAVA=Enable WEB_JAVA_SECURITY_LEVEL=H WEB_ANALYTICS=0 EULA=Disable REBOOT=Disable NOSTARTMENU=Enable SPONSORS=Disable', '', @SW_HIDE) ;~ ;~ Disables file system redirection from the calling thread DllCall("kernel32.dll", "boolean", "Wow64DisableWow64FsRedirection", "boolean", 0) ;~ Turns Off 64 Bit Redirection EndIf ;~ JREx86 - Install this for both x86/x64 systems RunWait(@ScriptDir & '\jre-8u121-windows-i586.exe INSTALL_SILENT=Enable STATIC=Enable AUTO_UPDATE=Disable WEB_JAVA=Enable WEB_JAVA_SECURITY_LEVEL=H WEB_ANALYTICS=0 EULA=Disable REBOOT=Disable NOSTARTMENU=Enable SPONSORS=Disable', '', @SW_HIDE) If RegRead('HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\{2E9A81FF-B19F-4F64-95B0-E688E09F7D7C}_is1', 'DisplayName') = '' Then RunWait(@ScriptDir & '\NCALayer.exe /silent /norestart') ;~ This shows a progress bar during install EndIf ;~ Complete Message Box, closes in 10 seconds MsgBox(0, 'Java Runtime + NCALayer', 'Installation Complete', 10) Link to comment Share on other sites More sharing options...
Nursultan Posted February 15, 2017 Author Share Posted February 15, 2017 Subz it ok. but it does not give me msgbox. And wil be run correct in other PC? Link to comment Share on other sites More sharing options...
Nursultan Posted February 15, 2017 Author Share Posted February 15, 2017 it is ok with msgbox Link to comment Share on other sites More sharing options...
Subz Posted February 15, 2017 Share Posted February 15, 2017 Yes that should run fine on other systems as well as long as you have you have the compiled script, NCALayer.exe and Java Runtime files in the same folder. Link to comment Share on other sites More sharing options...
Nursultan Posted February 15, 2017 Author Share Posted February 15, 2017 ok thank you Link to comment Share on other sites More sharing options...
Nursultan Posted February 16, 2017 Author Share Posted February 16, 2017 Subz can we do auto installing of sertificates to all browser ? Link to comment Share on other sites More sharing options...
Subz Posted February 16, 2017 Share Posted February 16, 2017 IE and Chrome can use Microsoft CertUtil.exe to add or remove Certificates, FireFox has its own CertUtil.exe utility. Don't know about other browsers. The best method is to use Active Directory and import the certificates in there for deployment to workstations. Link to comment Share on other sites More sharing options...
Nursultan Posted February 16, 2017 Author Share Posted February 16, 2017 Subz how it will be in code? Link to comment Share on other sites More sharing options...
Subz Posted February 16, 2017 Share Posted February 16, 2017 Unfortunately I don't have the time to take you through the full process, but here is some old code I used for importing certificates for Windows, these were Trusted Certificates, you will need to look up Firefox CertUtil.exe Certificates.ini nb: Certificates01 - Certificates03 need to be in the same folder as Certificates.exe [Add_Certificates] Certificate01 = Certificate01.cer Certificate02 = Certificate02.cer Certificate03 = Certificate03.cer [Del_Certificates] ;~ Key : - Any Value is valid for example Certificate Name (must be unique) ;~ Value : - Certificate Serial Number that requires removed ;~ Key=Value ;~ Example ;~ Certificate Name to be Deleted = 00x0xx0x000000000000 Certificates.au3 $sIniCertificates = @ScriptDir & '\Certificates.ini' $aAdd_Certificates = IniReadSection($sIniCertificates, 'Add_Certificates') $aDel_Certificates = IniReadSection($sIniCertificates, 'Del_Certificates') If IsArray($aAdd_Certificates) Then For $x = 1 To $aAdd_Certificates[0][0] Run('certutil.exe -addstore root ' & $aAdd_Certificates[$x][1], '', @SW_HIDE) Run('certutil.exe -addstore TrustedPublisher ' & $aAdd_Certificates[$x][1], '', @SW_HIDE) Next EndIf If IsArray($aDel_Certificates) Then For $x = 1 To $aDel_Certificates[0][0] Run('certutil.exe -delstore root ' & $aDel_Certificates[$x][1], '', @SW_HIDE) Run('certutil.exe -delstore -user root ' & $aDel_Certificates[$x][1], '', @SW_HIDE) Run('certutil.exe -delstore TrustedPublisher ' & $aDel_Certificates[$x][1], '', @SW_HIDE) Run('certutil.exe -delstore -user TrustedPublisher ' & $aDel_Certificates[$x][1], '', @SW_HIDE) Next EndIf Link to comment Share on other sites More sharing options...
Nursultan Posted February 21, 2017 Author Share Posted February 21, 2017 Subz hi! i want to install bat file automatically. in bat file i wrote command for installing dll. before installing i should to check via regedit? like this: HKEY_USERS\S-1-5-21-211339543-2664027446-3282843347-1001\SOFTWARE\Microsoft\Windows\CurrentVersion\Search\RecentApps\{DD6F2B95-197E-47E2-9842-18EEAB5CC950}\RecentItems\{F4BB9DDD-68D0-4839-B0D3-24D0689FF5A6} Link to comment Share on other sites More sharing options...
Subz Posted February 21, 2017 Share Posted February 21, 2017 No that key is specific to your account, plus its also a dynamic key meaning it won't always exist on your system note "RecentItems". Can you post your batch file? Link to comment Share on other sites More sharing options...
Nursultan Posted February 21, 2017 Author Share Posted February 21, 2017 start /d "C:\idocs" vcredist_x86.exe regsvr32 C:\idocs\iDocsDll.dll regsvr32 C:\idocs\KalkanCryptCOM.dll cd C:\Windows\Microsoft.NET\Framework\v4.0.30319 regasm /codebase /tlb "C:\idocs\NC.dll" fist line for microsoft visual c++, but i did it like a NCALayer via regedit, is it correct? Link to comment Share on other sites More sharing options...
Subz Posted February 21, 2017 Share Posted February 21, 2017 (edited) Untested but can you try, make sure that vcredist_x86.exe + iDocsDll.dll + NC.dll are in the same folder as your script. RunWait(@ScriptDir & '\vcredist_x86.exe /quiet /norestart', '', @SW_HIDE) RunWait(@ComSpec & ' /c regsvr32 "' & @ScriptDir & '\iDocsDll.dll" /s', '', @SW_HIDE) RunWait(@ComSpec & ' /c regsvr32 "' & @ScriptDir & '\KalkanCryptCOM.dll" /s', '', @SW_HIDE) Local $DotNetFx = @WindowsDir & '\Microsoft.NET\Framework\v4.0.30319\regasm.exe' If FileExists($DotNetFx) Then RunWait(@ComSpec & ' /c "' & $DotNetFx & '" /codebase /tlb "' & @ScriptDir & '\NC.dll" /silent', '', @SW_HIDE) Else MsgBox(64, 'Error', 'Unable to detect: ' & $DotNetFx) EndIf Edited February 21, 2017 by Subz Link to comment Share on other sites More sharing options...
Nursultan Posted February 21, 2017 Author Share Posted February 21, 2017 Before running dll i should check the visual c++, i did it like this, then i should check dll is it exits or not, because if it exist i should not to install dll, it will be error in working RegRead('HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\{2E9A81FF-B19F-4F64-95B0-E688E09F7D7C}_is1', 'DisplayName') = '' Then RunWait(@ScriptDir & '\NCALayer.exe /silent /norestart') ;~ This shows a progress bar during install EndIf Link to comment Share on other sites More sharing options...
Subz Posted February 21, 2017 Share Posted February 21, 2017 You can check VCRedist installation versions here: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\<Version>\VC\VCRedist\[x86/x64]' Link to comment Share on other sites More sharing options...
Nursultan Posted February 21, 2017 Author Share Posted February 21, 2017 what about dlls? Link to comment Share on other sites More sharing options...
Subz Posted February 21, 2017 Share Posted February 21, 2017 I don't know what you mean by "dlls", are you copying these dlls to the location? PS: Also updated my script above as I missed registering the KalKanCryptCom.dll. Link to comment Share on other sites More sharing options...
Nursultan Posted February 21, 2017 Author Share Posted February 21, 2017 I put dll to the location with bat, when I run bat it should check during installation is dll installed or not? how to do it? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now