AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Copy Log files - not permitted

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
bpmb



Joined: 13 Sep 2009
Posts: 30

PostPosted: Thu Oct 08, 2009 6:58 pm    Post subject: Copy Log files - not permitted Reply with quote

Hi there!

I'm trying to copy all the Log files in %A_WinDir%\System32\winevt\Logs to a temporary folder which contains additional information about the computer. I can't get this to work, this is the syntax:

Code:
FileCopyDir, %A_WinDir%\System32\winevt\Logs, C:\tmp\Logs, 1


I can see the ErrorLevel returns 1 and the copy is never done. I'm guessing this has to do with permissions eventhough I added this line at the top:
Code:
if not A_IsAdmin
{
DllCall("shell32\ShellExecuteA", uint, 0, str, "RunAs", str, A_ScriptFullPath
, str,0, str, A_WorkingDir, int, 1)
ExitApp
}


Does anyone know how to copy this folder? I'm testing this on Win 7 and Vista by the way..

I'm collecting this folder in order to support systems I build so I can quickly gather as much info as possible. If anyone knows a better way of collecting log files I'm all ears (or eyes Shocked )

Thanks!
Back to top
View user's profile Send private message
Zeromod



Joined: 01 Oct 2009
Posts: 55
Location: PA

PostPosted: Thu Oct 08, 2009 7:26 pm    Post subject: Reply with quote

Just a complete stab in the dark here, but I know that many have posted issues in vista especially where ahk needed to be run as admin. If that is an option perhaps that would give better results?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group