Category Archives: BATCH

Publisher could not be verified!

I hate that message!  I have a batch file set to run via a timer and every day it stops because it wants to verify the publisher.

Here is a way to disable the message:

1. Click Start–>Run and type gpedit.msc. Click OK

2. Go to User Configuration–>Administrative Templates–>Windows Components–>Attachment Manager

3. Add “*.exe” to the “Inclusion list for moderate risk file types” setting. You can also add other file types.

This should disable the “Publisher Could Not Be Verified” messages from appearing for that file type in the future.

Good luck!

(Note, this is the second method I’ve used for this and I’m waiting to see how well it works.  I used a different method yesterday via IE to trust the directory where the batch file is located and it made absolutely no difference at all)


My Favorite Windows XP Batch File of All Time

My Favorite batch file for Windows XP ever only contains one line:

net stop wuauserv

When do you use it?  You use it when you are in the middle of trying to meet a deadline and every 5 minutes, the Microsoft Updater jumps up and says “You need to reboot your machine to complete your updates.”

These three words can take away as much stress as your manager calling to say that the meeting has been canceled and you should go home early to enjoy the rest of your day.

Now, I’m not suggesting you completely ignore updates, just ignore them when they are bugging the heck out of you.


Saving all files from subdirectories to a main directory

Here is a quick batch file that will go through all subdirectories in a directory tree and copy files, ie photos, to another directory.  This works well with the Saving Vox photos post that I did recently.


for /f %%a in (‘dir /b *_files’) do call :process “%%a” “%%~dpa”
goto :eof

cd %1
copy *.jpg c:\TARGETDIR
cd ..


The main points in this are the “_files in the dir command and the C:\TARGETDIR in the copy command.  In my example case, Firefox and iMacros created a bunch of directories called (something)_files, so I want to loop through all of those.  The batch starts by building a list of all of these directory names then it starts a loop process to work through them.

The subroutine “process” changes the current directory to the subdirectory and then copies all of the JPG (picture) files up to C:\TARGETDIR.  You would call this something else, but make sure it’s created before you start.

Running instructions –

After making appropriate changes, you save this batch file in the parent directory of the subdirectories you want to read from.  I call it something simple like “DOIT.BAT” and then I shell out to DOS and run it.

Again, this works for me – there are probably other ways to achieve the same results.