blog.plee.me About software, technology and random things

2Nov/140

Viewing Hidden Devices in Windows Device Manager

Hi!

If you are trying to find a device that has been hidden in your Windows Device Manager, for example because you don't have it plugged in at the moment, you might find this little guide handy.

  1. Open the command prompt ("Start" => "cmd")
  2. Enter
    set devmgr_show_nonpresent_devices=1
  3. Then start the Device Manager from the command prompt via
    devmgmt.msc
  4. In the Device Manager, click "View" => "Show hidden devices"

I hope this helped 🙂

Thanks for reading!

Source: https://support.microsoft.com/kb/241257

20May/120

Making Traceroutes Work with a Firewall (Windows)

Hi!

Even though I've had software firewalls in action for years now, I haven't really come across too many instances where I'd need traceroutes. The few times I did, however, I noticed that I only got output like the following:

>tracert example.com

Tracing route to example.com [123.123.123.123]
over a maximum of 30 hops:

  1     *        *        *     Request timed out.
  2     *        *        *     Request timed out.
  3     *        *        *     Request timed out.
  4     *        *        *     Request timed out.
  5     *        *        *     Request timed out.
  6     *        *        *     Request timed out.
  7     *        *        *     Request timed out.
  8     *        *        *     Request timed out.
  9     *        *        *     Request timed out.
 10     *        *        *     Request timed out.
 11    50 ms    50 ms    50 ms  example.com [123.123.123.123]

Trace complete.

The number of hops would of course vary for the specific host / IP address.

Today I had to use traceroute in order to analyze a couple of networking problems. That was the incentive I needed to look up why it didn't work.

The fact that not even my router was showing up was a big indicator that something was wrong with my local firewall settings.

After searching the web for a couple of minutes, I found out what I was looking for at this page: http://www.phildev.net/ipf/IPFques.html#ques34

Traceroute is using ICMP packets (plus UDP on Linux systems, but that's outside the scope of this blog entry. You can read more about it on the page I linked above). But even for an outgoing traceroute you need to accept incoming ICMP packets.

Which ones? These:

  • ICMP TTL Expired (Type 11, Code 0)
  • ICMP Port Unreachable (Type 3, Code 3)

Once you've enabled these types of packets for incoming traffic in your firewall(s), you'll see that your traceroute will now function as it should.

If your firewall does not allow you to configure accepting specific types of ICMP packets, try allowing incoming ICMP packets altogether (if that's not too much of a compromise for you).

Anyway, long-ish story short: It's working now 🙂

Thanks to the webmaster of the page I linked above! And thanks to you for reading.

30Jun/100

Adobe Premiere Pro CS5 and the Long Loading Splash

Hi!

If you have used Adobe Premiere Pro CS5 (or several other CS5 products as I've read), you might have encountered long waiting times during the program launching. In the case of Premiere Pro CS5, the splash screen shows "Loading ExporterQuickTimeHost.prm" and sticks with it for a couple of minutes (yes, minutes). This is not even a one-time thing or a once-per-Windows-session, it happens each and every program launch.

When I researched this, I quickly found the answer in Adobe's forums: Premiere CS5 takes 5 minutes to start up

In fact, what's causing this is not just the Adobe program, but rather the combination of a firewall and the Adobe program. If you are as restrictive in terms of Internet access as I am, you might have forbidden Adobe Premiere Pro.exe outgoing IP connections altogether. However, it is trying to establish a TCP connection to localhost / 127.0.0.1.

The fix is to allow outgoing TCP (I chose IP, which of course includes TCP) to 127.0.0.1 for the following executables:

  • <Premiere Directory>\Adobe Premiere Pro.exe
  • <Premiere Directory>\32\Adobe QT32 Server.exe
  • <Premiere Directory>\32\dynamiclinkmanager.exe

with <Premiere Directory> of course being the path to your Adobe Premiere directory.

Note: Of course you can still stop every other outgoing traffic. Regard the 127.0.0.1 rule as an exception.

If you are trying to apply this fix to other Adobe programs, you are on your own to find out which .exes require 127.0.0.1 TCP connections. With modern firewalls, however, this shouldn't be that big of a problem. Just look at the prompts your firewall pops up and/or determine the .exes via logging.

I hope that helps you enjoy your respective Adobe program(s) all the more. 🙂

Good luck and, as always, thanks for reading.

Update (2010-03-28):
I recently found out that with my kind of firewall "Adobe Premiere Pro.exe" would prompt me again for a rule for outgoing traffic to addresses different from the localhost zone. If that happens to you, make sure you don't accidentally replace or override the localhost rule you added above. Rather add an additional rule for all the remaining outgoing traffic and forbid it (or allow it, depending on what you want).

29Apr/100

Internet Connection Reset on the Speedport W 722V (Type B)

Hi!

Since I've recently found out that my new router, the T-Home Speedport W 722V Type B, apparently does not support automatic disconnecting at a specific time (in order to circumvent the 24-hour connectionreset by my ISP), I took a route that my good friend Pool has been using for quite some time.

It is a batch script, so in order to use it, you have to be able to execute it.

On a side note, the Type A model of this router does support automatic disconnecting! Make sure you choose "Other provider" when you're in the internet configuration menu in order to be able to see the setting for that. The "T-Online" option sadly does not show it.

What you need:

  • A Windows machine that is running at the given time (has to execute the script)
  • cURL for Windows, preferably the win32-ssl-sspi version (download page). win32-ssl should be fine as well.
  • Configure a scheduled task for the script, which is not covered in this guide (but quite simple. Just make it execute the script.)

The batch script:

REM Speedport W 722V Type B Internet Reset Script v1.0 - 2010-04-29
REM Written by pl (plee.me)
REM
REM Works with the T-Home Speedport W 722V Type B home router.

REM START CONFIGURATION
REM Adjust these variables to your own ones!
SET PWD=12345678
SET COOKIEFILE="routercookies.txt"
REM END OF CONFIGURATION

@echo off
curl -k https://speedport.ip/cgi-bin/login.cgi -d "pws=%PWD%" -e "https://speedport.ip/hcti_start_passwort.stm" -c "%COOKIEFILE%"
curl -k https://speedport.ip/cgi-bin/status_startseite.cgi -d "connect=0&disconnect=1&block=0&nonblock=0&abc=0" -e "https://speedport.ip/hcti_startseite.stm" -b "%COOKIEFILE%"
curl -k https://speedport.ip/cgi-bin/status_startseite.cgi -d "connect=1&disconnect=0&block=0&nonblock=0&abc=0" -e "https://speedport.ip/hcti_startseite.stm" -b "%COOKIEFILE%"
curl -k https://speedport.ip/cgi-bin/logoutall.cgi -e "https://speedport.ip/hcti_startseite.stm" -b "%COOKIEFILE%"
del "%COOKIEFILE%"

What this script does:

It logs on the web administration interface, uses a hidden option to disconnect the internet connection, then uses a hidden option to connect, and finally logs out again.

Because the cookie is cached in a text file, it is deleted at the end of the script.

Additional information:

The lines beginning with REM are comments, so you might as well leave them out.

If you run the script, make sure that you either have the cURL directory in the PATH environment variable, or that you set its folder as the working directory, so that it can find the curl.exe and actually execute the (central) steps of the script.

I'm sure that this script can be optimized (probably a lot), but for now, it's doing the job.

I hope that was of any help to you, and thanks for reading! 🙂

13Oct/090

OpenVPN on Windows Vista / 7 – Ping says: TTL expired in transit

Hi there!

When I set up my VPN with OpenVPN yesterday, I found out about a little difficulty under Windows Vista and 7. Thankfully it was not that much of a hurdle as the UAC was the reason for this bug just like for a series of other bugs with different software I experimented with over the last few weeks. Nevertheless I hope that this piece of information helps you get rid of the following problem.

If you have set up your VPN and got it running without any major problems, and everything seems to be running just fine (connecting works), but you still can't establish connections to the other machines, you might find that pinging returns the error message "TTL expired in transit". This is due to the fact that Vista (or Windows 7) needs administrator privileges to adjust your computer's settings properly in order to function when you've connected to the VPN successfully. I think it's about the route.exe process, but I'm not 100% sure.

Windows Vista and 7 have the equally famous as infamous UAC (User Account Control) that prevents even administrator privileged accounts from executing programs with administrator rights by default. In order to enable these rights you have to right-click the program (or program shortcut) and click on "Run as administrator" next to the yellow-blue shield if it does not run with administrator rights exclusively anyway (in which case you'd see the yellow-blue shield in the bottom right corner of the program icon itself and would be asked for administrator privileges automatically when you launch it as any other program).

Please note that the following steps are for on-demand OpenVPN connections. For automatic connections, read further below.

OpenVPN on-demand connection

So what you need to do is launch the connection with UAC. But how do you do that if you usually launch OpenVPN connections with a right-click and "Start OpenVPN on this config file"? Even creating a shortcut to the .ovpn file doesn't give you the "Run as administrator" option.

A simple solution is to create a batch file that simply changes to the work directory and executes .ovpn with the openvpn.exe.

Example file "ovpn_connection1.bat":

@echo off
D:
cd \Programs\OpenVPN\config-ondemand\
D:\Programs\OpenVPN\bin\openvpn.exe D:\Programs\OpenVPN\config-ondemand\connection1.ovpn

This batch file has the following parameters/assumptions:

  • Your OpenVPN dir is on the D: partition (otherwise change the drive letter in the respective paths and leave the "D:" line out altogether).
  • The path to your OpenVPN dir is D:\Programs\OpenVPN.
  • Your connection configuration file is located in the config-ondemand subdirectory.

Basically, you just switch to the work directory and execute OpenVPN's openvpn.exe located in its bin dir on the configuration. In a way, this works as a shortcut, but just as an executable batch.

The @echo off part is just so that you won't see the other commands displayed in the window each time you start the connection.

Now you either make a shortcut to this batch file or use it itself.

Whenever you want to start the connection, right-click on it and select "Run as administrator".

Done! Test your ping and it should be fine.

OpenVPN automatic connection

All you need to do is to move the .ovpn configuration file and all the other required files into the config subdirectory of your OpenVPN installation.

When the OpenVPN service (Start => Run => services.msc) is started, it will look for .ovpn files in its config subdirectory and execute them all - with SYSTEM privileges. No UAC circumvention needed.

So just set your OpenVPN service to "Automatic" and you're good to go!

OpenVPN on-demand connection with OpenVPN service

Just do what is described under the "OpenVPN automatic connection" paragraph except for setting the service to "Manual".

Now each time you want to launch the connection, you just need to type "net start OpenVPNService". To stop it, type "net stop OpenVPNService".

Note on using connections with the OpenVPN service

As the OpenVPN service feature executes *all* .ovpn configuration in the config subdirectory, there is no way to manually interfere with one particular connection of that directory and let's say disable it shortly. All config-connections are handled as a group with the OpenVPN service.

So if you need manual independency, look at the on-demand section.

I hope this wasn't all too fuzzy with the wordings and such.

Please comment or contact me if you have any questions on this matter.

Thanks for reading!

13Aug/090

Disabling Windows Vista / 7 / 8 / 10 Explorer’s Automatic Folder Type Discovery

Hey!

Update from 2015-09-06: I just used this for Windows 10 and it still works!

I very recently installed Windows 7 on my desktop computer and I'm loving it so far.

One of the major things that bugged me though was the new Explorer behavior. The automatic folder type discovery just goes ahead and tries to determine a folder type just by looking at how many (or if there are) files of a certain type (pictures, videos, songs, ...) are in the current folder, and then it adjusts the viewing settings accordingly. For example, if you open a folder that contains mainly video files, it would show those with big icons instead of my default, a detailed list. Pictures are displayed as thumbnails.

Disabling this behavior proved to be interestingly difficult. As with most things that have been declared a default setting by Microsoft, it luckily can be done - but only via registry.

First we need to delete our current folder type settings.

  • Close all open Explorer windows.
  • Open the registry editor with Start => Run => regedit and browse to HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell.
  • Delete and confirm the deletion of the keys BagMRU and Bags.
  • Now create a Key (right-click on the current key in the left pane and select New => Key) called Bags.
  • Create a subkey for Bags called AllFolders.
  • Create a subkey for AllFolders called Shell.
  • Create a String value (right-click in the right pane and select New => String Value) called FolderType and set the value to NotSpecified.
  • That's it for Windows 7. Please read the note for Windows Vista x64 below. Otherwise, just reboot and your new settings should be applied.

That's it for Windows 7. If you're using Windows Vista x64, it might be possible that there is a copy of (or a similar) the Local Settings\Software\Microsoft\Windows\Shell key in HKEY_CURRENT_USER\Software\Classes\Wow6432Node. I could not confirm this for Windows 7, though I am using the 64 bit version (it just had a CLSID subkey, nothing more). In that case, delete the Shell\Bags and Shell\BagMRU folders like I told you above before finishing your modifications with a reboot.

Warning: as always, playing around with the Windows registry can be dangerous when done incorrectly. If you do not feel safe about it, make sure to back up the keys you're about to modify via File => Export, or leave it altogether. I do not take any responsibility for any damage, nor do I give any guarantee that the steps I provided here will work for you. At least they worked for me.

Hopefully that was of help to you 🙂

I discovered the initial instructions on mydigitallife.info. Thank's so much 🙂 Had a hard time finding a guide for that.

%d bloggers like this: