When download files in a browser, I prefer to save all the files to a specific location instead of allowing the browser to "open" the file. This means that to invoke the download I have to go to an Explorer window or command prompt and manually select/run the file.
So I chose to create a shortcut on my Quick Launch (yes I still use it in Windows 7) to automatically launch my "most recent download".
This isn't a particularly complex task or hard to figure out, but I thought I'd document it here anyway. There are probably better ways to do it too, but I'm most familiar with Windows Batch approaches to automation.
Step 1: Write a Batch File
I created a NEW_DOWNLOAD.BAT file and placed it on my system somewhere. The contents are:
@echo off
call :latest e:\download\*.exe ^
e:\download\*.rar ^
e:\download\*.zip ^
e:\download\*.pdf
if "%LATEST%"=="" goto :eof
echo E:\DOWNLOAD\%LATEST%
if "%1"=="" "E:\DOWNLOAD\%LATEST%"
if not "%1"=="" copy /y "E:\DOWNLOAD\%LATEST%" "%1"
goto :eof
:latest
FOR /F "delims=" %%I IN ('DIR %* /B /O:-D') DO (
SET "LATEST=%%I"& goto :eof
)
goto :eof
Basically what this does, is search my E:\DOWNLOAD folder for all .EXE, .ZIP and .RAR files, and launches the most recent one. You could add additional file types here if you wanted to.
Step 2: Add a Shortcut
I added a shortcut to NEW_DOWNLOAD.BAT and placed it on my Quick Launch bar. I configured it to launch Minimized, and gave it a custom icon from SHELL32.DLL to distinguish it. I also added a keyboard hotkey for the shortcut (CTRL-SHIFT-L.)
Step 3: Set it and Forget it
Now, when I download something, I just click on the Quick Launch shortcut or press my keyboard hotkey, and automatically my most recent download starts running.
For reference, I use a similar script now to "Display the most recent PDF file" in another folder, in combination with CreatePDF as my default print driver, to print/save and verify document output.
Friday, November 16, 2012
Tuesday, September 4, 2012
Linux "Welcome to GRUB" hang on IBM x3200 Server
I recently had to migrate a working linux/debian server image over to a "new" machine, an IBM x-Series M3 x3200 (machine type m/t 4362-PAT.)
Normally server installations of Linux are decent about body transplants across the same architectures, so I was surprised to find that the disk wouldn't boot on the new system.
The symptom was a very slow display of "GRUB" then "GRUB loading" then finally a hang on the "Welcome to GRUB" screen.
The first thing I did was boot on the Debian netinst CD for my install and choose the rescue option, and re-install GRUB onto the boot partition, but this did not fix the problem.
After further research, I cam across this post which suggested the cure to my problem: I needed to disable the graphical mode for GRUB and only use the traditional console mode boot. On my system, this was done by editing the file /etc/default/grub, and enabling the following setting:
# Uncomment to disable graphical terminal (grub-pc only)
GRUB_TERMINAL=console
After making this change, the system boots like a champ!
Normally server installations of Linux are decent about body transplants across the same architectures, so I was surprised to find that the disk wouldn't boot on the new system.
The symptom was a very slow display of "GRUB" then "GRUB loading" then finally a hang on the "Welcome to GRUB" screen.
The first thing I did was boot on the Debian netinst CD for my install and choose the rescue option, and re-install GRUB onto the boot partition, but this did not fix the problem.
After further research, I cam across this post which suggested the cure to my problem: I needed to disable the graphical mode for GRUB and only use the traditional console mode boot. On my system, this was done by editing the file /etc/default/grub, and enabling the following setting:
# Uncomment to disable graphical terminal (grub-pc only)
GRUB_TERMINAL=console
After making this change, the system boots like a champ!
Monday, August 13, 2012
A canonical list of Windows service names for antivirus and antimalware tools
I had a need to modify some code to check for the presence of a range of anti-virus and anti-malware tools running as a service on a Windows system.
As a background, my purpose was to find different AV services and, if multiple AV tools are starting up and running, to delay an operation until the services had finished initialising (ie, in the RUNNING state.)
As part of this exercise, I could not find a list of Windows services names for the common anti-virus tools available [let me know if you know where one is!] So while the information is not too hard to dig up for each tool, I decided to document this list here for future reference.
Note that this is a reference to the Windows "Service name" value for the tool, as opposed to the Display name or Executable/Process name.
Many of these are based on web searches and information found online and have not been verified personally. Certainly, this list is by no means complete or guaranteed accurate!
If I receive corrections or additions to this list or need to extend it, I will edit this post!
As a background, my purpose was to find different AV services and, if multiple AV tools are starting up and running, to delay an operation until the services had finished initialising (ie, in the RUNNING state.)
As part of this exercise, I could not find a list of Windows services names for the common anti-virus tools available [let me know if you know where one is!] So while the information is not too hard to dig up for each tool, I decided to document this list here for future reference.
- symantec antivirus:: Symantec Endpoint Protection
- mcshield:: McAfee Security
- windefend:: Windows Defender
- msmpsvc:: Microsoft Security Essentials
- msmpeng:: Microsoft Security Essentials
- savservice:: Sophos Antivirus
- aveservice:: Avast!
- avast! antivirus:: Avast!
- immunetprotect:: Immunet Protect
- fsma:: F-Secure
- antivirservice:: AntiVir
- avguard:: Avira
- fpavserver:: F-Protect
- pshost:: Panda Security
- pavsrv:: Panda AntiVirus
- bdss:: BitDefender
- abmainsv:: ArcaBit/ArcaVir
- ikarus-guardx:: IKARUS
- ekrn:: ESET Smart Security
- avkproxy:: G Data Antivirus
- klblmain:: Kaspersky Lab Antivirus
- vbservprof:: Symantec VirusBlast
- clamav:: ClamAV
- SBAMSvc:: Vipre / GFI managed AV
- navapsvc:: Norton
- AVP:: Kaspersky
Note that this is a reference to the Windows "Service name" value for the tool, as opposed to the Display name or Executable/Process name.
Many of these are based on web searches and information found online and have not been verified personally. Certainly, this list is by no means complete or guaranteed accurate!
If I receive corrections or additions to this list or need to extend it, I will edit this post!
Thursday, July 12, 2012
Windows does not use my VPN connection DNS!
I have problem on one of my systems where I frequently use my VPN connection to link to the office. The problem is that the DNS resolution always seemed to go through the main WAN connection system, and never defer to the VPN connection DNS servers.
It may be related to newer WAN DNS that return results and do web redirection for "unknown" connections, instead of returning no match.
After some basic searching, I cam across this post that had a solution:
Force Windows to Use a VPN's DNS Server
Going through these instructions solved my problem. I am running Windows 7 x64 and the solution took effect immediately upon restarting my VPN client.
For reference, this is what I did:
It may be related to newer WAN DNS that return results and do web redirection for "unknown" connections, instead of returning no match.
After some basic searching, I cam across this post that had a solution:
Force Windows to Use a VPN's DNS Server
Going through these instructions solved my problem. I am running Windows 7 x64 and the solution took effect immediately upon restarting my VPN client.
For reference, this is what I did:
- Open Regedit.
- Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Linkage
- In the right pane, double-click Bind
- In the value text box, select the "\Device\NdisWanIp" item, press CTRL+X, click the top of the list of devices, and then press CTRL+V.
- Click OK, and then quit Registry Editor.
- Restart your VPN connection.
Friday, March 16, 2012
New iexplore.exe processes exit immediately and the page loads in a different process!
As part of some process management software that handles multiple web pages and web-based applications, I recently encountered some problems with Internet Explorer.
The symptoms of my problem:
After a brief amount of research, it turns out this is due to a change in Internet Explorer 8 (IE8) regarding how UI components, frames, tabs, and plug-ins are isolated into different processes. This is called "loosely-coupled Internet Explorer" or LCIE, and this is documented in two MSDN IE blog posts from Microsoft:
While these changes are very useful from an end user point of view, for security and robustness reasons, they aren't what I need. Thankfully, Microsoft included a way of avoiding some aspects of this change in IE8 to mimic the process behaviour of previous versions:
The simple solution:
When manually launching an iexplore.exe process, add the following "-nomerge" command line option as part of the request.
"iexplore.exe -k -nomerge C:\path\app\index.html"
Once I modified my process manager to use this option, my existing logic that worked fine under IE6 and IE7 also works with IE8!
The symptoms of my problem:
- Attempt to launch a new page/web-app in a separate iexplore.exe process for Internet Explorer
- The process launches successfully but very quickly exits with rc=0.
- A new iexplore.exe is created that is not a child of the process I created, but of another existing Internet Explorer session.
- The requested content appears successfully under that other process
- My process/handle management logic is confused since it thinks something is broken!
After a brief amount of research, it turns out this is due to a change in Internet Explorer 8 (IE8) regarding how UI components, frames, tabs, and plug-ins are isolated into different processes. This is called "loosely-coupled Internet Explorer" or LCIE, and this is documented in two MSDN IE blog posts from Microsoft:
- http://blogs.msdn.com/b/ie/archive/2008/03/11/ie8-and-loosely-coupled-ie-lcie.aspx
- http://blogs.msdn.com/b/askie/archive/2009/03/20/how-to-i-determine-which-ie-tabs-go-to-which-iexplore-exe-process-when-using-internet-explorer-8.aspx
While these changes are very useful from an end user point of view, for security and robustness reasons, they aren't what I need. Thankfully, Microsoft included a way of avoiding some aspects of this change in IE8 to mimic the process behaviour of previous versions:
The simple solution:
When manually launching an iexplore.exe process, add the following "-nomerge" command line option as part of the request.
"iexplore.exe -k -nomerge C:\path\app\index.html"
Once I modified my process manager to use this option, my existing logic that worked fine under IE6 and IE7 also works with IE8!
Wednesday, October 19, 2011
Loose lens head on Tamron 17-50mm F/2.8
On a recent trip to Utah I brought my trusty combination of a Canon 60D and my favourite all-purpose lens, my Tamron 17-50mm F2.8 (non-VC.)
Part of my itinerary involved a backcountry ATV tour, and I had the camera gear in a padded case strapped to the Honda's rear cargo rack. By the end of the 4 hour tour, I noticed that the lens "head" on the Tamron was very loose and wobbly -- this is the part that holds the lens cap and filters.
The optics of the lens were still fine, the wobbly was only in the plastic end piece. After searching for a solution, it turns out this is a relatively common problem with this and other Tamron lenses, and the solution is quite simple.
Using a small jeweler's screwdriver, behing very careful to avoid damage to the optics, the following DIY fix is very quick and easy -- it took me under a minute.
Firefox Sluggish with newer AMD HD 4290 Video Driver
I recently upgraded my system video driver to address some video playback issues. In my case, I had been running the latest AMD 890X Chipset drivers with HD4290 GPU graphics support.
I am running Firefox 6 and FireFox 7. Prior to the video driver upgrade, Firefox ran smoothly and quickly. After upgrading to the latest HD 4290 drivers provided by Windows Update, I noticed Firefox seemed sluggish. My system is otherwise very fast (AMD 1090T X6 with 12GB of RAM and SSD) so the speed degredation seemed very related to the video driver update.
It wasn't "slow" but things like switching tabs suddenly had a very short, but noticeable, delay. Another symptom was that sometimes, when launched, Firefox would display a grey translucent screen with diagonal bars for a brief moment.
After some Google research, it became apparent that ability in recent versions of Firefox to detect and use "GPU acceleration" to speed up browsing, did not always improve things. So, in effect, disabling GPU acceleration in Forefox returned my browser to normal snappy speeds. The setting to change is:
EDIT 11apr2012: still a problem with Firefox 11 the latest Catalyst 12.3 drivers, grrr...
Many sights indicate this option needs to be unselected for "older" graphics processors, but it's odd that it affects the HD4290, which is a relatively recent onboard GPU solution that is certainly not out of date.
Oh well -- since I don't need advanced HTML5 support in Firefox yet, no problems leaving this hardware acceleration option off for now.
I am running Firefox 6 and FireFox 7. Prior to the video driver upgrade, Firefox ran smoothly and quickly. After upgrading to the latest HD 4290 drivers provided by Windows Update, I noticed Firefox seemed sluggish. My system is otherwise very fast (AMD 1090T X6 with 12GB of RAM and SSD) so the speed degredation seemed very related to the video driver update.
It wasn't "slow" but things like switching tabs suddenly had a very short, but noticeable, delay. Another symptom was that sometimes, when launched, Firefox would display a grey translucent screen with diagonal bars for a brief moment.
After some Google research, it became apparent that ability in recent versions of Firefox to detect and use "GPU acceleration" to speed up browsing, did not always improve things. So, in effect, disabling GPU acceleration in Forefox returned my browser to normal snappy speeds. The setting to change is:
- Open Firefox Tools::Options
- Go to Advanced
- Select the "General" tab
- Uncheck the option "Use hardware acceleration when available"
EDIT 11apr2012: still a problem with Firefox 11 the latest Catalyst 12.3 drivers, grrr...
Many sights indicate this option needs to be unselected for "older" graphics processors, but it's odd that it affects the HD4290, which is a relatively recent onboard GPU solution that is certainly not out of date.
Oh well -- since I don't need advanced HTML5 support in Firefox yet, no problems leaving this hardware acceleration option off for now.
Subscribe to:
Posts (Atom)
