meph’s blog


“File not found” error when opening Outlook attachments

Filed under: Outlook, Software — Tags: , , — Michael @ 14:19

(Don’t know if this has been fixed in recent Outlook versions, we use 2002 here…)

An employee called and explained the following error to me: He was trying to open different attachments from his sent mails and got randomly a “file not found” error. After some research I found out that the filenames of most attachments were “Angebot.pdf” (the German word for “offer”). So I opened up ProcMon on his system, set the filesystem filter, did a search for “Angebot”  and finally saw this:

595    15:10:31    OUTLOOK.EXE:2140    CREATE    C:\Dokumente und Einstellungen\username\Lokale Einstellungen\Temporary Internet Files\OLK121\Angebot.pdf    NAME COLLISION    Options: Create  Access: 00120196
596    15:10:31    OUTLOOK.EXE:2140    CREATE    C:\Dokumente und Einstellungen\username\Lokale Einstellungen\Temporary Internet Files\OLK121\Angebot1.pdf    NAME COLLISION    Options: Create  Access: 00120196
597    15:10:31    OUTLOOK.EXE:2140    CREATE    C:\Dokumente und Einstellungen\username\Lokale Einstellungen\Temporary Internet Files\OLK121\Angebot2.pdf    NAME COLLISION    Options: Create  Access: 00120196
693    15:10:31    OUTLOOK.EXE:2140    CREATE    C:\Dokumente und Einstellungen\username\Lokale Einstellungen\Temporary Internet Files\OLK121\Angebot99.pdf    NAME COLLISION    Options: Create  Access: 00120196

So Outlook tries to save a temporary copy of the file in temporary internet files and when a file with the same name already exists, Outlook is adding a number to the filename. In this case it looks like the user had not cleaned up his temporary internet files for quite some time. And above from that Outlook 2002 can only count up to 99 and then fails with the “file not found” error 😉

Cleaning up the temporary files isn’t the solution. Outlook’s own folder for storing temporary files (attachments and such) is stored in the variable OutlookSecureTempFolder in the windows registry (HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\Security in my case). So you have to clean up this folder which can easily done by a logon/logoff script and this little tool.



Boot DBAN with WDS

Filed under: Client Management, Software — Tags: , , — Michael @ 13:34

1. Download DBAN (Darik’s Boot And Nuke) here
2. Download Syslinux here
3.  Create a new directory ‘DBAN’ under \REMINST\Setup\German\Images on your RIS/WDS Server (I’m working on a German system, so change language appropriately)
4.  In this directory, create a new folder ‘I386’
5. In the I386 directory, create a ‘pxelinux.cfg’ and a ‘templates’ folder
6. Extract the file pxelinux.0 (found in the under the folder ‘core’) to the I386 directory
7. Extract the file ISOLINUX.CFG from the DBAN ISO, rename it to ‘default’ and put it in the pxelinux.cfg subdirectory
8. Extract the file DBAN.BZI from the DBAN ISO and put it in the I386 directory
9. Create a file called dban.sif in the templates subdirectory and put the following content in it:

Description =”DBAN”
Help =”Darik’s Boot And Nuke”
LaunchFile = “%INSTALLPATH%\%MACHINETYPE%\pxelinux.0″
ImageType =Flat

So, it should look now like this:

10. Restart the RIS/WDS service and try it out!


Thoughts about printer consolidation

Filed under: Uncategorized — Tags: , , — Michael @ 09:59

I guess that I don’t have to explain the benefits of consolidation. Regarding printer consolidation, let me tell you some facts (or just thoughts, because my mind is racing atm ;)) anyway.

I work for a company with…

  • ~80 employees (just the “office people”)
  • ~80 workstations
  • ~60 printers (including copiers with print function, excluding barcode printers for document archiving)

Some day I did read some article which said that 10-12 employees per printer is cost-effective. You see that we are far away from that.
Above from that we currently don’t have a standard printer model. We use to buy color inkjets (even photo printers :S), mono laserprinters, mono and color copier systems resulting in 98723429384723 different drivers (PCL and PS in some cases). The effort to maintain this is just too high. Furthermore most of our printers don’t support ethernet, so they are connected to workstations via USB and shared. This leads to computers running 24/7.
In order to fix that, I think about how many printers our employees really need. Considering central positioning of printers and buying printers which can handle the incurred printing volume I come to the conclusion that ~10 devices are sufficient (besides of the copiers, which won’t be replaced because they’re also used for scanning documents). Some months ago I talked to a sales guy from Konica-Minolta. The background is that we already have copiers and fax machines from them for several years now and there are existing leasing contracts for these devices and – most important – we have a good relationship to them. He offered the C20P print system, which meets our demands. We have to pay around 35 euro per month for one device, including 5000 mono pages und 1000 color pages, supplies and service/maintenance (further mono pages cost 0,012 Euro and color pages 0,05 Euro each). Unfortunately I don’t know much about the “financial” stuff, but I think that’s a fair price – particularly with regards to the simplification of the driver management and decreased cost for supplies (we order new ink cartridges and toner very often and have three boards full of them).

Well, what do you think? Do you have comparable values for such environments in view of monthly costs of maintenance? Do you have experience with printer consolidation? Tell me something 😉



Filed under: Uncategorized — Tags: — Michael @ 13:59

Follow me! 😉


namebench – Open-source DNS Benchmark Utility

Filed under: Software — Tags: , , , — Michael @ 09:09


RIS/WDS – post installation script

Filed under: Client Management, Deployment, Scripting, Windows — Tags: , , , , — Michael @ 14:34

In the last weeks I did a lot in order to optimize our workstation deployment process. Well, we have been using RIS/WDS for a long time now, but we always had to do several things manually after the rollout, e. g. moving the computer object in another OU, changing the computer description to the “owner” of the PC and so on. I knew that most of this is scriptable, but never found the time to get my hands on it.
At first I had the problem that the autologon of the local administrator after applying the riprep image never worked, because the local admin account had been disabled in the installation I captured (with the local admin disabled, the autologon setting which is configured in the .sif file won’t work and so I can forget the GuiRunOnce section :(). I thought that I can fix that by editing the according riprep.sif file but it didn’t work at all (keyword: DisableAdminAccountOnDomainJoin). I finally fixed that by putting

net user Administrator /active

in the Cmdlines.txt (indeed this is quick and dirty but it works for the moment and I have to make a new image next month anyway).
So, the base for my postinstallation script was developed and I began with the script. It should do the following:

– setting the computer description (or comment) under Control Panel – System
– ask the admin for the NETBIOS name and change it
– set the description of the computer object in AD
– move the computer object in the correct OU

After reading the first point you’ll probably ask “Why the hell don’t you set the correct computer name at the time you install it?”. It’s simple: Our computernames are in the form pc-xxx-##. The xxx is the short form of the department where the computer belongs to and ## is a number.  While the installation of the computer the admin maybe doesn’t know for which department the computer will be, so WDS just chooses a more random name (pc1, pc2, pc3, …).

The computer description is stored unter HKLM\System\CurrentControlSet\Services\lanmanserver\parameters\srvcomment. I do that in the script by importing a key (overwriting the old):

set /p description=Description of the computer:
reg add HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\lanmanserver\parameters /v srvcomment /d "%description%" /f

Well, this is simple. I’ve found a hint here.

Let’s continue with changing the Netbios name of the computer. As you probably know this can be done with netdom.exe, which is part of the Windows XP support tools. I have already written about it in another post. For a description how to use it I suggest you read this article. Instead of simply changing the computer name I want to check first if a computer account with the same name already exists in the directory.  For this I use the dsquery command. At that point I came across my first “problem”. First of all this command (and also the other ds* commands like dsadd etc.) isn’t available under Windows XP and this command doesn’t support a parameter to pass a username and a password (in order to run the command as an user who has the permission to change AD objects) unlike Netdom, which has the /userd and /passwordd parameters. I realized that it could be done by running dsquery remote with psexec:

\\server\util\psexec.exe -accepteula \\server -u\Administrator -p password cmd.exe /c dsquery computer -name %newname% ^| dsget computer

The variable newname is filled by another set /p-line in my script, which asks the admin for the new name. Please notice that you have to escape the pipe by adding a ^ in front of it!

In the case that dsquery finds a computerobject with this name the errorlevel is 0, otherwise… well, I guess you know how to script that 😉
When an object with this name has been found, I want to offer the option to delete the old computerobject. Deleting is done with piping the output of dsquery to dsrm:

\\server\util\psexec.exe -accepteula \\server -u\Administrator -p password cmd.exe /c dsquery computer -name %newname% ^| dsrm -noprompt

Remember that it takes some seconds until the changes take effect and the object is deleted in AD, so better add a little sleep (for example:  ping localhost -n 30 >NUL or something) after that line. At last the actual renaming is done with:

\\server\util\psexec.exe -accepteula \\server -u\Administrator -p password  cmd.exe /c start/wait \\server\util\netdom.exe renamecomputer %oldname% /newname:%newname% /\Administrator /passwordd:password /force

Of course it is necessary to reboot the computer after renaming it, but we don’t do it yet. Before we care about the other two points.

The description of the computerobject in the directory can be modified with dsmod. This is simple too, we take the value of %description% and use it:

\\server\util\psexec.exe -accepteula \\server -u\Administrator -p password cmd.exe /c dsquery computer -name %computername% ^| dsmod computer -desc "%description%"

For moving the computerobject to another OU I wrote a batch, moveou.bat with the content below:

@echo off
REM Move computerobjects to according organisational units
for /f "Tokens=*" %%s in ('dsquery computer "OU=Departments,DC=companydomain,DC=de" -scope onelevel -name pc-dep1*') do (DSMOVE %%s -newparent "OU=Department1, OU=Departments,DC=companydomain,DC=de")
for /f "Tokens=*" %%s in ('dsquery computer "OU=Departments,DC=companydomain,DC=de" -scope onelevel -name pc-dep2*') do (DSMOVE %%s -newparent "OU=Department2, OU=Departments,DC=companydomain,DC=de")
for /f "Tokens=*" %%s in ('dsquery computer "OU=Departments,DC=companydomain,DC=de" -scope onelevel -name pc-dep3*') do (DSMOVE %%s -newparent "OU=Department3, OU=Departments,DC=companydomain,DC=de")

You have to use ‘for’, because piping more than one result from dsquery to dsmove doesn’t work (usually there should be just one object to move, but who knows). By the way, the OU “Departments” is the OU where RIS/WDS creates the computerobject while installation.

I put the batchfile on the same network share as my other utils. In the mainscript I added a line

\\server\util\psexec.exe -accepteula \\server -u\Administrator -p password cmd.exe /c start/wait \\server\scripts\moveou.bat

So we are finally done with the script. The last thing we have to do is rebooting the computer by

shutdown -r -t 0

Of course you can put a lot more things in the script, e. g. software installations using msiexec etc.
Thank you for reading this post and sorry for my bad English and the many line wraps 😉


Some scripts

Filed under: Client Management, Scripting, Windows — Tags: , , — Michael @ 13:43

In case someone finds it interesting…

Run cctk and set BIOS options for Dell workstations

@echo off
REM Check if wmic is available on this system
WMIC.EXE /? >NUL 2>&1
echo ERROR: WMIC.EXE not found.
REM Check for Dell workstation
wmic bios get manufacturer /format:list | find /I "Dell" > NUL
if %ERRORLEVEL% == 1 (
echo ERROR: No Dell workstation!
REM Check architecture
REM Check if cctk for X86 is installed
echo ERROR: CCTK not installed.
REM Run cctk and set options
cctk.exe --wakeonlan=enable > NUL
cctk.exe --lowpowers5=disable > NUL
REM Check if cctk for AMD64 is installed
echo ERROR: CCTK not installed.
REM Run cctk and set options
cctk.exe --wakeonlan=enable > NUL
cctk.exe --lowpowers5=disable > NUL
REM Finished!

Load predefined Outlook profile for any new user

@echo off
REM Check for Windows XP
ver | find "XP"
if %ERRORLEVEL% == 1 goto exit
reg load hklm\temp "%systemdrive%\documents and settings\default user\ntuser.dat"
reg add hklm\temp\Software\Microsoft\Office\10.0\Outlook\Setup /v ImportPRF /d \\server\share\Outlook.prf
reg unload hklm\temp


Windows 7

Filed under: Software, Windows — Tags: — Michael @ 18:01

I like it 😉 (except the start menu, but who cares, I use my own symbol bar)


WOL and Dell Optiplex 740

Filed under: Client Management — Tags: , , , — Michael @ 09:48

This is kinda “WTF?”. I wanted to use Wake-On-LAN (WOL) with our Dell Optiplex 740 workstations. By default, WOL wasn’t enabled in BIOS, so I set the two relevant options by disabling the low power mode and enabling the wake-up option of the NIC. After some testing with Dameware’s WOL function (which didn’t work) and some other tools (wol, winwol, wolcmd also didn’t work) I finally woke up my testclient successful out of hibernate with Magic Packet Sender. Also WOL worked out of standby mode. But only with Magic Packet Sender, although I configured other tools to use port 9 UDP too (can anyone explain me that?). At last I tried to wakeup the PC from poweroff. I got frustrated – it didn’t work. Hibernate and standby was never a problem, poweroff = no reaction. I called the Dell business support, but unfortunately they also had no clue. After some googleing I found this forum link, where other users report similar problems with other workstation models. Up to now Dell did not respond to their posts…


Okay, the Dell support guy I talked to has also no solution. In the meantime I discovered that all our Dell workstations (also the Precision T3400 and older Optiplex) don’t wake up from poweroff. Seems that I’ve to investigate… I will post updates here.


Dell Client Configuration Toolkit

Filed under: Client Management — Tags: , , , — Michael @ 11:20

Managing Dell workstations with the Dell Client Configuration Toolkit is great 😉 Just install it on your workstations or boot from a WinPE disk including it and you are able to modify your BIOS settings using really simple commands. For example to enable Wake-On-LAN:

cctk.exe –wakeonlan=enable

That’s it.

Older Posts »

Blog at