electrico Posted November 1, 2009 Share 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") Link to comment Share on other sites More sharing options...
Authenticity Posted November 1, 2009 Share 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. Link to comment Share on other sites More sharing options...
electrico Posted November 1, 2009 Author Share Posted November 1, 2009 Thanks, will try in now. Pls look for my answer later. Thank you again. Link to comment Share on other sites More sharing options...
electrico Posted November 1, 2009 Author Share 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? Link to comment Share on other sites More sharing options...
Authenticity Posted November 1, 2009 Share 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. Link to comment Share on other sites More sharing options...
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