domingo, 24 de diciembre de 2023

Windows 11: restore My documents off One Drive

"Onedrive" took control of my personal folders. Even after removing the PC connection and uninstalling "One Drive". All of them could be changed by going to the "One Drive" folder in "My Documents" and right-clicking on Properties and choosing the Location tab. Use the "Restore default" option. But "My Documents" and "My Pictues" gave each other problems because an error appeared every time.



The only solution was to edit the Windows Registry and change these keys, basically delete "\OneDrive" and then move the respective files, if necessary.


HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

Key for My Pictures:

{0DDD015D-B06C-45D5-8C4C-F59713854639}

OneDrive Path:

C:\Users\MyUserName\OneDrive\Pictures

Changed to:

C:\Users\MyUserName\Pictures


The Same for My Documents folder, this is the key for OneDrive:

{F42EE2D3-909F-4907-8871-4C22FC0BF756}

OneDrive Path:

C:\Users\MyUserName\OneDrive\Documents

Changed to:

C:\Users\MyUserName\Documents

Restart computer so changes applied.

Just in case I reinstalled OneDrive in the future, I'll rename the OneDrives keys, adding a "-" before each special name:

-{0DDD015D-B06C-45D5-8C4C-F59713854639}

-{F42EE2D3-909F-4907-8871-4C22FC0BF756}


martes, 7 de noviembre de 2023

Mac OsX start Real VNC Viewer in listening mode

 Real VNC Viewer doesn't have an option to start in listening mode.

To accomplish this, we need to start a Terminal window and use this command:


 /Applications/VNC\ Viewer.app/Contents/MacOS/vncviewer -listen


No window or confirmation is shown.


Just use VNC Server's option "Attach to listening vnc viewer" and use the proper address on your Mac.

You may need to add an IP Forwarding rule on your router to allow communication from external port 5500 TCP to insternal port 5500 TCP, if you want this to work from Internet.


miércoles, 3 de mayo de 2023

Time Machine External Disk very slow on Mac OS Ventura (SSD External disk slow after Mac OS Update)

 Suddenly, my external SSD Time Machine becomes very slow after one Ventura Update. I tried everything. Default format: APS format, encrypted. 


I connected it and Finder took long time to read it, looks like hung for several minutes.


Had to use Finder, right-click on my backup drive name, choose "Decrypt"... this may take several hours/days. My 500GB SSD with 80% space occupied, tooks 3 days (connecting the disk 8 hours a day, I didn't want to keep it working overnight because it turns hot without. After that, Time Machine didn't accept my disk because "previous specified disk was encrypted, and current disk is not", so I removed from Time Machine and added again. Works very fast.

But I don't want a backup disk unencrypted so I use Finder, right-click on my backup disk and use the "Encrypt" option (this requires to specify a secure password, can't forget). Process begins and it looks almost 3 days (at eight hours a day) to encrypt. Finally, Time Machine again didn't accept my disk (because encrypted) so I removed from Time Machine, added again, and now, AT LAST, connecting my external SSD will not hangs Finder and backups now runs very faster. Also Finder is now responsive just after connecting disk.


MacBook Pro M1 now with Ventura 13.3.1

viernes, 17 de febrero de 2023

Windows 11: unable to connect to SQL 2008 [Microsoft][ODBC SQL Server Driver][DBNETLIB]SSL Security error

 Suddenly this error appears on ODBC connections to legacy SQL 2008 servers.


Apparently, latest updates on Windows 11 (some Windows 10 reported too), "breaks" connections to SQL 2008.


Resolution


Update your Cipher Suite on Windows.


Since Windows 22H2, the default TLS Cipher Suites changed. 


The following were removed from the default:


 "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_3DES_EDE_CBC_SHA"


So I updated the SSL Cipher Suites on Windows 11 x64 (more information about this: https://support.microsoft.com/en-us/topic/update-to-add-new-cipher-suites-to-internet-explorer-and-microsoft-edge-in-windows-548427db-ed06-5521-fe8b-d525ab573022


The list I used was the one that was used for Windows prior to the 22H2 (22621.819) update (Please be advised that this response is to answer the question that was given and obviously does not follow best practice procedures. Microsoft disabled this encryption for a reason. If you are like me and have older servers that need to keep running while you come up with a long-term solution to discontinue them then the above solution will keep you operational.):

 TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_3DES_EDE_CBC_SHA,TLS_RSA_WITH_NULL_SHA256,TLS_RSA_WITH_NULL_SHA,TLS_PSK_WITH_AES_256_GCM_SHA384,TLS_PSK_WITH_AES_128_GCM_SHA256,TLS_PSK_WITH_AES_256_CBC_SHA384,TLS_PSK_WITH_AES_128_CBC_SHA256,TLS_PSK_WITH_NULL_SHA384,TLS_PSK_WITH_NULL_SHA256 


REG KEY FILE

You may use this to create a .REG file, load it on Windows 11:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Cryptography\Configuration\SSL\00010002]

"Functions"="TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_3DES_EDE_CBC_SHA,TLS_RSA_WITH_NULL_SHA256,TLS_RSA_WITH_NULL_SHA,TLS_PSK_WITH_AES_256_GCM_SHA384,TLS_PSK_WITH_AES_128_GCM_SHA256,TLS_PSK_WITH_AES_256_CBC_SHA384,TLS_PSK_WITH_AES_128_CBC_SHA256"


Restart Windows to apply changes.


jueves, 12 de enero de 2023

Facturador Electrónico SRI Gratuito de Comprobantes Electrónicos (Ecuador) para Mac no funciona adecuadamente

 MacBook Pro M1 con macOS Ventura 13.0.1

El Facturador Electrónico Gratuito de Comprobantes Electrónicos es un aplicativo en Java desarrollado por el SRI en Ecuador.

Hasta aquí ha funcionado normalmente.

Luego de instalar Visual Studio, no me percaté que la aplicación dejó de funcionar bien.

Al tratar de generar una factura, el botón de "Guardar sin firmar" no hacia nada, así como "Guardar, Firmar y Enviar". 

De igual forma al tratar de firmar un .xml que hice manualmente, tampoco podia acceder a la firma electrónica, como antes. 

Después, analizando el proceso del "ComprobantesDesktop.jar", me di cuenta que no estaba usando el JRE de Java sino un JDK de Microsoft:

/Library/Java/JavaVirtualMachines/microsoft-11.jdk


Descargué el JDK de Oracle, asumiendo que eso resolvería el problema (por alguna incompatibilidad con el de Visual Studio). Al instalarlo, se configuró como el JDK default y la aplicación del SRI tuvo el mismo comportamiento que usando el JDK de Microsoft como default. 


En /usr/libexec está java_home que se debe ejecutar con ./java_home estando en ese directorio.

Al ejecutarlo, indicaba al JDK de Oracle como el default:

/Library/Java/JavaVirtualMachines/jdk-19.jdk/Contents/Home


El JRE estaba dentro del contenedor JavaApplentPlugin.plugin en:


/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin


La única forma de hacer que la app funcione totalmente funcional es lanzar desde Terminal estando en la carpeta

/Applications/ComprobantesElectronicosOffline


Y lanzar este comando:


"/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" -jar ComprobantesDesktop.jar



Hice pruebas lanzando el java JRE apuntando al "/Applications/ComprobantesElectronicosOffline/ComprobantesDesktop.jar" pero la única funcionalidad que perdía era "Visualizar RIDE", que usa a su vez unas librerías internas para generar un PDF.

Para ahorrar tiempo lanzando el comando funcional, edité "run.sh" que se encuentra dentro de "/Applications/ComprobantesElectronicosOffline" y reemplacé el contenido por:

"/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" -jar ComprobantesDesktop.jar

Y agregar permisos de ejecución al run.sh creado con el comando: 

chmod u=rx run.sh


domingo, 24 de julio de 2022

Avast Business "On-Premise" Console failed to update on Windows Server 2012, database lost. How to restore automatic backup.

I just updated Avast Business On Premise Console on Windows 2012 R2 Standard.

From version 7.29.911.54 (functional) to 7.29.990, due to Update banner on console.

The update failed to install VC 2015 (noticed VC error message) but Avast installer "finished ok".
The updater created a backup on "C:\ProgramData\AVAST Software\Management Console\backup".

After the "update", I was unable to enter console with browser, start Avast Console service.

The new update, on Windows Server 2012 R2, if using VC 2015, requires KB2919335 (which requires KB2919442). I installed the KBs, restarted Windows Server, Avast console still unable to start.
There is no repair option on Avast Console option on Control Panel, had to reinstall (because previous upgrade was not ok).

But, after reinstall, the browser loaded a "create account page", no clue how to login with my email as before update.


Tried Avast's support for weeks, sent my case to "senior support", waste of time.

This Console uses PostgreSQL. Apparently, the Avast installer generates random password each time, so there is no default password at all.

So, the upgrade failed, the database was damaged/overwritten, unable to enter Management Console and the Avast server was not working at all.

The new installer replaced a very important file: "C:\Program Files\AVAST Software\Management Console\console\config\application-user-config.yml"

Inside that file are 2 fields: dbUsername and dbPassword. The original dbPassword was lost during failed update.


STEPS TO RECOVER

- Copy the backup folder created automatically by the updater ("C:\ProgramData\AVAST Software\Management Console\backup") to other location, just in case.

- Uninstall "Avast Business Management Console ..." from Control Panel / Programs and Features.

- Make sure you installed KB2919442 and  KB2919335.

- Install "Avast Business Management Console".

- Launch Console. You'll need to create your account (again) despite already existing.

- Once you get the empty Console / Dashboard, you may proceed with restore the backup created by installer. 

- First, we need to change the "postgres" account password on PostgreSQL Database Engine, installed with Avast Management Console. Go to folder "C:\ProgramData\AVAST Software\Management Console\data" and look for file pg_hba.conf (make a copy there -select file, Copy and Paste-, just in case).

- Edit pg_hba.conf, near the end of file, it may look like:




- You need to change all "Method" column, from "md5" to "trust" (without quotes), or just the first two lines corresponding to IPv4 and IPv6:



This is to allow reset main "Super User" postgres.

- Restart "Avast Business Management Console PostgreSQL" service (on Start / Administrative Tools / Services). It warns about "Avast Business Management Console" service will restart too, just choose Yes. Restart of service is required to get your changes.

- Once restarted, you may now connect to the PostgreSQL Database Engine. Open a Command Prompt window, and then go to folder: "C:\Program Files\AVAST Software\Management Console\PostgreSQL\bin" with the CD -change dir- command, space, and path (path quoted):

CD  "C:\Program Files\AVAST Software\Management Console\PostgreSQL\bin"

- Now use the PSQL program to connect to Database Engine on Command Prompt window, parameter -U is in uppercase:

    psql -U postgres


PostgreSQL will not require a password to login now.

- Execute the following command to set a new password for the Postgres user:

    ALTER USER postgres WITH PASSWORD 'new_password';


Remember the new password you use for postgres.

Exit the PostgreSQL command prompt with command: \q

- Restore the pg_dba.conf file (revert changes from trust to md5), restart the PostgreSQL database server and connect to the PostgreSQL database server with the new password.

- Now, we'll make a backup of the empty Avast Management Console, just to get the MD5 hashed passwords. On Command Prompt window still on "C:\Program Files\AVAST Software\Management Console\PostgreSQL\bin", execute the following command (please ensure folder C:\Tmp exists first):

    pg_dumpall.exe -U postgres -c -f  C:\tmp\dump.sql



This will create a backup of current empty Avast Console's database. If you installed Avast Console to use a non default Database TCP port, you'll need to add the option -p DB_PORT (where DB_PORT is the number of assigned TCP/IP port for PostgreSQL Database Engine on Avast Console). The example shows default port 5432.

- Edit the backup dump.sql with Notepad++ or any other text editor. Look for section "Roles" and copy to clipboard the SQL code used to create "bconsole" and "postgres", look for something like this (md5 hashes are for current "bconsole" and "postgres" passwords, your md5 hashes will be different):



- Edit the old backup file (make sure you have a copy of the backup on other folder), the one created automatically by Avast Console installer when failed upgrade (in my case, was on "C:\ProgramData\AVAST Software\Management Console\backup\database.dump"). Look for the same SQL code on "Roles" section. Select that code and delete it. Then Paste from clipboard the SQL code (copied previously from dump.sql file).

- Save the modified old backup file "database.dump" to C:\Tmp

- Stop service "Avast Business Management Console" (not the one with PostgreSQL on name).

- Restore the old backup, just modified, on Command Prompt window, still on "C:\Program Files\AVAST Software\Management Console\PostgreSQL\bin":

    psql -U postgres -f C:\Tmp\database.dump



When asked for postgres password, just enter the one you choose when changed it. 

The restore process begins and ends with no user intervention.

- Once restore is complete (a few seconds), start service "Avast Business Management Console" and try to open the Avast Business On Premise Management Console as usual. If any error, wait for about 20 seconds and then restart the "Avast Business Management Console" service.

domingo, 1 de agosto de 2021

EPSON L355 Scanner (using WiFi) not detected on Windows 10 (2021)

 Suddenly Epson Scanner software on Windows 10 Computer, stopped working.

No error, no messages, it shows nothing, does nothing.

Reinstalled Epson drivers, reboot, "Epson Scan Settings" just found the Scanner and test ok, but "Epson Scan" left useless.

Noticed no "Imaging Devices" found on Device Manager, so this was strange, because to not waste more time on this, downloaded the basic and free "Microsoft Scanner" from Store.

Printer works ok.

Only way I fix Epson scanner appears on Device Manager:

Windows 10 Settings / Devices / Printer & scanners

then "Add a printer or scanner"





Need to specify your Epson's IP address (I suggest you to configure a fixed IP address for your Epson, on your router or DHCP device... must know the MAC address of your Epson, usually routers register and show it too...