Schtasks not working properly, Windows 7

Page 3 of 3 FirstFirst 123

  1. Posts : 6,285
    Windows 10 Pro X64
       #21

    Right, just as I suspected. The dir output shows

    Directory of C:\Windows\2012.10.29

    so when fs1.bat does this:

    cd.. (this backs up to the Windows directory)
    cd results (this doesn't work since there is no results directory under Windows)
    md %date% (this should create the folder under Windows)
    cd %date% (and this changes to it)

    How does Computer Detective call fs1.bat? Maybe it needs to pass the path to itself that fs1.bat can then change to.
      My Computer


  2. Posts : 17
    Windows 7 Ultimate x64
    Thread Starter
       #22

    I added full path to results folder in ks1.bat, so now it knows where to create %date% folder and txt files.
    Code:
    cd %homedrive%%homepath%\Desktop\Useful_tools (earlier osnd)\ComputerDetective\results
    I'll include in instructions of program that it needs to be put on Desktop, otherwise it won't work.

    But I still want your help how to schedule ks1.bat no matter where Useful_tools is located.

    That's how ComputerDetective calls ks1.bat:
    Code:
    schtasks /create /sc minute /mo %minutes% /tn "Computer Detective" /tr %homedrive%%homepath%\Desktop\Useful_tools\ComputerDetective\tasks\ks1.bat
      My Computer


  3. Posts : 6,285
    Windows 10 Pro X64
       #23

    I can't come up with anything that will work at the moment, sorry.

    Hopefully someone else has some ideas.
      My Computer


  4. Posts : 6,285
    Windows 10 Pro X64
       #24

    What about setting an environment variable that contains the path to the location you want the date-time folder created in? Something like ComputerDetectivePath. It could be part of the installation instructions. Then the fs1.bat file could do a

    cd /d %ComputerDetectivePath%
      My Computer


  5. Posts : 17
    Windows 7 Ultimate x64
    Thread Starter
       #25

    Good idea. Today I showed my work and got 10. Thanks for helpful suggestions.
      My Computer


  6. Posts : 6,285
    Windows 10 Pro X64
       #26

    You're welcom
      My Computer


 
Page 3 of 3 FirstFirst 123

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 10:43.
Find Us