CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2011
    Posts
    2

    Question Need CMD file help

    Sorry in advance if this is posted in the wrong forum. I'm trying to write a CMD file to be run once a minute with windows scheduler. I have some recent experience programming in VBA (under Excel), but have never written a (complex) CMD file. Below is a pretty good explanation of the logic (uploaded in TXT also). I'd appreciate if someone would get me started in the right direction (or write the whole thing if you want!) I'd use that as a learning tool too.


    IF "particular web pages" ARE NOT being visited
    OR particular processes ARE NOT running
    AND "MyEXE" IS NOT running THEN
    GOTO END

    ELSE

    IF "particular web pages" ARE being visited
    OR particular processes ARE running
    AND "MyEXE" IS running
    GOTO END

    ELSE

    IF "particular web pages" ARE being visited
    OR particular processes ARE running
    AND "MyEXE" IS NOT running THEN
    RUN "MyEXE"

    ELSE

    IF "particular web pages" ARE NOT being visited
    OR particular processes ARE NOT running
    AND "MyEXE" IS running THEN
    STOP "MyEXE" REM[ by command line switches...not process end]

    SET resulting "MyEXE" file atribute to hidden

    ENDIF

    END
    Attached Files Attached Files

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: Need CMD file help

    [ thread moved ]
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    May 2002
    Posts
    10,943

    Re: Need CMD file help

    A batch file is not going to allow you to detect visited websites unless you plan to dig into the temporary internet files folder for each user.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  4. #4
    Join Date
    Jan 2011
    Posts
    2

    Re: Need CMD file help

    There is only one "user" on the computer. That is, each individual does not have a seperate user name and password. Although it's sounds like it may complicate things, this would be the prefered method. Another option would be to simply check for "iexplorer.exe" process (reducing IF/THEN/ELSE statements?), athough this would initiate "MyEXE" no matter what page was visited. Thanks for the quick respose and relocation of the post. Let me know what you think my options are.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured