Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
May 24, 2013, 03:33:16 am *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Log file not being created.  (Read 844 times)
TheBox193
Newbie
*
Posts: 3


If I start beeping, just reboot me.


View Profile WWW
« on: June 21, 2012, 10:09:37 pm »

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.



Code:
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!%
  ")
Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #1 on: June 23, 2012, 07:55:13 am »

The most likely cause would be a permissions problem, make absolutely sure that the userid you are running MyDefrag on has write permissions for the logfile folder. Have you tried running the original MyDefrag scripts, is the logfile being created? Have you tried the debug logfile (see I have a problem!), perhaps it shows the reason?
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!