Sign in to follow this  
Followers 0
electrico

Command line help

5 posts in this topic

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")

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

Thanks, will try in now. Pls look for my answer later. Thank you again.

Share this post


Link to post
Share on other sites

You were right! That works. I just createing a more difficult string, and if I will have trouble I will ask you, OK?

Share this post


Link to post
Share on other sites

Better the forum so other users may be able to search this content in for future mini reference about the subject. :) good lick.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0