locked
Logman at startup RRS feed

  • Question

  • I'm trying to get logman to run at system startup, but so far it has not worked.

    I can add entries to  " HKLM>Software>Microsoft>Windows>CurrentVersion>Run " so that's what I'm using to try and force logman to run on system startup.

    I made a simple logman.cmd file that is called to execute the line ' logman start "New Data Collector Set " ' and that appears in a command window during startup, but it never says 'The command completed successfully.' as would be expected.

    I have tried looking up additional information concerning logman and it's use.  A lot of references say that ' logman start "New Data Collector Set" -u %user& %password% ' ought to work, but in my case it just keeps throwing ' Argument 'u' is not allowed with the other arguments specified. '

    So I really dont know what I'm doing wrong and would generally like to have this run properly so I can compare system performance logs.

    Thank you for the help.


    -Aaron

    Monday, January 18, 2010 8:32 PM

Answers

  • Thank you for the reply, I found that the fix was disabling the UAC before reboot. (either via registry // msconfig, same thing either way) Allowed the logman to execute without the administrative prompt. -Aaron
    • Marked as answer by Cheshire43 Tuesday, January 19, 2010 8:51 PM
    Tuesday, January 19, 2010 8:51 PM

All replies

  • Does logman.cmd works fine when you execute it by double-clicking on it? If not, then correct it so it would work. I assume you have created a data collector set that is supposed to be executed (logman create).
    I would suggest that in the registry the Data value for the logman entry looked something like this:
    c:\windows\system32\cmd.exe /k [full_path_to_logman.cmd]

    It might look like this:

    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
    "logman"="c:\\windows\\system32\\cmd.exe /k c:\\windows\\logman.cmd"

    The /k parameter keeps the command prompt open after the executing the logman.cmd file. This way you could check what the error message is. Use /c to close the window after command is executed.
    Should you choose to use environment variables (for example %comspec% instead of c:\windows\system32\cmd.exe) you must change the registry value type to expandable string (REG_EXPAND_SZ).
    In logman.cmd I would use full paths as well:
    C:\Windows\System32\logman.exe start "New Data Collector Set".
    Hope it helps somehow.

    Tuesday, January 19, 2010 7:19 PM
  • Thank you for the reply, I found that the fix was disabling the UAC before reboot. (either via registry // msconfig, same thing either way) Allowed the logman to execute without the administrative prompt. -Aaron
    • Marked as answer by Cheshire43 Tuesday, January 19, 2010 8:51 PM
    Tuesday, January 19, 2010 8:51 PM