Hello, In my script I'm using WriteLogfile() but having a couple machines where MyDefrag is not creating the log file.
It does not seem to be related to OS as it has happened on my Windows Server 2003, Server 2008, Windows XP, and Windows 7 machines.
My initial thought was that UAC or similar drive protection was not permitting me to write to the folder.
I'm using the MyDefrag a a scheduled task on my machine, it runs correctly except it does not create the log. It is definitely using the script because I can change colors, run times, and hide the window.
It works for most of my machines, it is just a select few it fails to create the log file for.
-Tried different destinations. C:\temp , C:\Windows\temp
-Tried different capitalization to match the machines case
-Run script as System and as User
-Run script manually
-Verified that MyDefrag isn't crashing by running for only 2min, finishes fine
-Tried a log file that only says "hello world"
I'm at a loss now. Any thoughts of what I'm missing? Haha. I feel like I'm overlooking something.
WriteLogfile("c:\WINDOWS\Temp\MyDefrag.log","
||=============[ !MountPoint! - !Date! !Time! ]=============||
Total disk space: !VolumeSize! bytes
Bytes per cluster: !BytesPerCluster! bytes
Unfragmented Items: !FILES200N!
Fragmented Items: !FILES210N!
Unfragmented Data: !FILES202N! bytes
Fragmented Data: !FILES212N! bytes
All Gaps: !GAP00N!
All gaps: !GAP10N! bytes
Average gap: !GAP13N! bytes
Median gap: !GAP14N! bytes
Biggest gap: !GAP15N! bytes
Item count as percentage of total item count
Unfragmented Fragmented All
------- ----------------- ----------------- -----------------
Files !FILES000P!%!FILES010P!%!FILES020P!%
Folders !FILES100P!%!FILES110P!%!FILES120P!%
------- ----------------- ----------------- -----------------
All !FILES200P!%!FILES210P!%!FILES220P!%
Occupied size as percentage of total size
Unfragmented Fragmented All
------- ----------------- ----------------- -----------------
Files !FILES002P!%!FILES012P!%!FILES022P!%
Folders !FILES102P!%!FILES112P!%!FILES122P!%
------- ----------------- ----------------- -----------------
All !FILES202P!%!FILES212P!%!FILES222P!%
")