Showing posts with label windows xp. Show all posts
Showing posts with label windows xp. Show all posts

Tuesday, December 22, 2009

Embedding date and time into a file in windows - "But it worked last night"

I'm patching a tiny project at work with duct tape until we can get an enterprise solution. A small batch job runs on the windows scheduler doing something like this:

MyCommand.exe  --output=Saturday1201amUS_%date:~10,4%-%date:~4,2%-%date:~7,2%-%time:~0,2%-%time:~3,2%-%time:~6,5%.txt


I ran it yesterday afternoon and it worked great. It created a file named
Saturday1201amUS_2009-12-21-15-46-00.21.log. This morning I did another test with my client and it failed miserably after creating a file named 'Saturday1201amUS_2009-12-22-'. A little investigation turned up that windows does not prepend a zero in front of the hours before noon so my executable file was getting a space in front of 9 oclock:

MyCommand.exe  --output=Saturday1201amUS_Saturday1201amUS_2009-12-22- 9-47-20.31.log

It worked great after putting quotes around the file name.
MyCommand.exe  --output="Saturday1201amUS_%date:~10,4%-%date:~4,2%-%date:~7,2%-%time:~0,2%-%time:~3,2%-%time:~6,5%.txt"

Saturday, June 20, 2009

Roxio Creator 2009 not starting

I am rebuilding my home windows xp system after a disk crash. While reinstalling Roxio Creator 2009 I encountered an interesting problem. Roxio would not start. I looked in the event viewer ("Start/Programs/Administrator Tools/Event Viewer") and found the following error message:

EventType clr20r3, P1 roxiocentralfx.exe, P2 4.12.0.0, P3 48a05348, P4 roxiocentralfx,
P5 0.0.0.0, P6 48a05348, P7 17e, P8 12, P9 system.dllnotfoundexception, P10 NIL.

(The event log messages are really more like a Greek Oracles, something you only really understand, at your peril, afterwards).

I tried to install .Net 3.5 because another error hinted that a .Net library was missing. During the .Net 3.5 install I got the following less helpful error which did not have an event clue.


error

So I was stuck. Roxio won't start because of a missing .Net library and I can't install .Net because of a "Setup Error".

Realizing that Roxio Creator 2009 is only a shell over all these other programs, I tried to launch a sub-program, "Creator Classic", directly (Start/Programs/Roxio Creator 2009/Applications/Creator Classic". It did run and immediately asked to download patches from the mother ship. After those patches were installed I tried lauching the main Roxio Creator again - and it worked.
No rhyme or reason or understanding here, just trying random things, but that's what often works with Windows.