Category Archives: Setting up Applications

Thunderbird Change Order of Accounts

  • Tools > Options > Tab: Advanced > Tab : General > Config editor : “I’ll be careful, I promise!”
  • search for “account”
  • edit the variable “mail.accountmanager.accounts” and change your order here
  • quit thunderbird
  • launch thunderbird, change are now effective
You find the identities when you look for “mail.identity.id<n>.useremail” and the relation between identities and accounts looking for “mail.account.account<n>.identities”. If you have several identities for an account, you can’t influence the order of these or order them separately; you can only have these identities together in a different position.

Source

.NET Framework: Re-registering key files for signing assemblies

After reinstalling Visual Studio and trying to resign an assembly with a key, I got the following error:

Cannot import the following key file: .pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name:

To fix open the directory in the Visual Studio command prompt with the pfx file and run the following command:

 sn -i pfxfilename.pfx VS_KEY_EB611118B812345

You only have to run the command once for each unique key.

Source

Windows 7 Task Scheduler does not run with “Run whether user is logged on or not” selected

I didn’t have this issue until I patched my installation with the latest updates.

You need to set the user to SYSTEM for your tasks, set privileges to highest, and then create the Desktop directory in the SYSTEM’s profile directory. The following directories need to be created:

C:\Windows\System32\config\systemprofile\Desktop
C:\Windows\SysWOW64\config\systemprofile\Desktop

Make sure the directories are created under the Administrator account. I also read this problem exists under Windows 2008 Server, but I have yet to encounter this issue in that environment.

Source (last 3 posts by BlackBeemer)

OpenVPN and Windows – Connecting and Disconnecting from OpenVPN through command line or programmatically

I decided to automate a back up task that had been completed manually for quite some time. The process was initiated manually because the server is located on a network that could only be accessed via OpenVPN connection.

The first task was figure out how to initiate the connection via command line. After digging through some documentation, I found out that you can call the ‘openvpn.exe’ file from command line and pass it’s configuration  via  *.ovpn file and the ‘–config’ parameter. Shown here on Stackoverflow in C# code.

This lead to my next problem – disconnect from the client at the end of the operation. The OpenVPN client has a telnet server that can receive a disconnect command. It can be enabled by adding the ‘management’ parameter to the *.ovpn configuration file. For example, if you want to open the telnet server on port 7000, add the following line:

management localhost 7000

After enabling the server, you need to use a telnet client to connect to the OpenVPN client. Once connected to the VPN client, disconnecting from the VPN connection can be done via the telnet command: SIGHUP

The last problem is reinitializing the localhosts’s network interface. Because disconnecting from the VPN connection from telnet does not reinitialize your primary network interface, you need to set it manually via command line.  This can be done by sending the following command:

netsh interface ipv4 set address name="Local Area Connection" source=dhcp gateway=192.168.0.1

You can find more details on this issue here in the section that references the ‘EnableLocalNet.bat’ file.

In the end, I ended up creating something similar to a Rube Goldberg Machine that used a combination of a .NET Console Application, BAT files, Unison, and AutoIt to get the backup operation working. The .NET console program was responsible for starting and disconnecting the OpenVPN connection and initiating Unison to transfer the files. AutoIt executed the console application and used a BAT file to re-initiate the local host’s network interface after disconnecting.

Source for programs is available upon request.