electrico Posted November 1, 2009 Posted November 1, 2009 Hi all, can anyone experienced man help me with this script string? I dunno why I cannot get the logfile on my desktop. Cmd line dissapears and no file appears!!! If you can do it with @ComSpec, please provide with it. Waiting for answer, - thanks!! Run (@WindowsDir & "\system32\tasklist.exe " & @DesktopDir & ">tasklist.log")
Authenticity Posted November 1, 2009 Posted November 1, 2009 Run(@ComSpec & ' /c tasklist > "' & @ScriptDir & '\test.txt"') You must enclose the path in double quotes because otherwise if the path contains spaces you'll delimit the file path by the first space. tasklist > C:\Documents and Settings\User\Desktop\File.txt is evaluated as tasklist > C:\Documents, so it'll create this file and output it there as long as there is not folder with that name/path.
electrico Posted November 1, 2009 Author Posted November 1, 2009 Thanks, will try in now. Pls look for my answer later. Thank you again.
electrico Posted November 1, 2009 Author Posted November 1, 2009 You were right! That works. I just createing a more difficult string, and if I will have trouble I will ask you, OK?
Authenticity Posted November 1, 2009 Posted November 1, 2009 Better the forum so other users may be able to search this content in for future mini reference about the subject. good lick.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now