New Drive Snapshot build released.

Discussion in 'backup, imaging & disk mgmt' started by Aaron Here, Dec 10, 2010.

  1. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,175
    Location:
    NSW, Australia
    Open Task Scheduler and click Task Scheduler Library on the left and Create Basic Task on the right.

    Name ... Full image or whatever
    Daily, weekly, whatever
    Time
    Start a Program
    Browse to full.cmd or full.bat
    Put a tick in Open the Properties dialog for....
    Finish
    Tick in Run with highest privileges
    Configure for Windows 10 (or your OS)
    Run only when user is logged on
    Conditions tab, put a tick in Wake the computer to run this task
    Click OK
     
  2. Hadron

    Hadron Registered Member

    Joined:
    Apr 1, 2014
    Posts:
    2,145
    Thanks, Brian.
    So, you can also use .cmd extension, hey?
    I guess it doesn't matter.
     
  3. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,175
    Location:
    NSW, Australia
    I always use .cmd.
    .bat works but it's from DOS days.
     
  4. Hadron

    Hadron Registered Member

    Joined:
    Apr 1, 2014
    Posts:
    2,145
    Thanks, Brian.


    Take care. :thumb:
     
  5. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,175
    Location:
    NSW, Australia
    hadron, you could use an image filename like this for unique images in the same folder...

    $DISK-$DATE.sna
     
  6. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,175
    Location:
    NSW, Australia
    Or if your filename was hadron_c.sna you could add these lines to the backup batch file so it's renamed to...

    hadron_C-2019-Apr-25_070128.sna

    That does add a time which DS apparently can't do.

    Code:
    set hh=%time:~0,2%
    if "%time:~0,1%"==" " set hh=0%hh:~1,1%
    set timestamp=%time:~0,8%
    if @%timestamp:~0,1% == @ set timestamp=0%timestamp:~1,7%
    set timestamp=%date:.=%_%timestamp::=%
    echo.Timestamp :: %timestamp%
    ren hadron_C.sna hadron_C-%timestamp%.sna
    In Control Panel, Region, must have yyyy-MMM-dd, not yyyy/MMM/dd for the Short date.
     
  7. Hadron

    Hadron Registered Member

    Joined:
    Apr 1, 2014
    Posts:
    2,145
    That looks good, Brian. A date would be good. Can time ($TIME) be done?
    How do I stop it clearing the Recycle Bin and the Command Prompt windows sitting on the Desktop?

    Drive Snapshot Command Prompt.jpg
     
    Last edited: Apr 24, 2019
  8. Hadron

    Hadron Registered Member

    Joined:
    Apr 1, 2014
    Posts:
    2,145
    I see on this page a few command line options.
    I'd like it to start minimized. I see the Gm command, but will it exit automatically like Go and Gx?
     
  9. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,175
    Location:
    NSW, Australia
    OK. Forget #1256. It's overkill.

    Remove -R from the command line.

    I haven't used Gm. Let me know if you like it. If not, this works at the start of the batch file...

    Code:
    @echo off
    if not defined RunTask set RunTask=1 & start "Snapshot" /min %SystemRoot%\system32\cmd.exe /c "%0" & goto :EOF
    This code makes any batch file run minimized. Just change "Snapshot" to any word you like. It is only a title.

    No. I can't make it work.
     
    Last edited: Apr 24, 2019
  10. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,175
    Location:
    NSW, Australia
    I usually right click a batch file (if running manually) and Run as Admin. Some batch files won't run from a double click.
     
  11. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,175
    Location:
    NSW, Australia
    You mentioned running the Command Window minimized. With a Scheduled Task you can run it completely invisible, if you desire. That's how I run my IFW backups as I don't need to see them at all. But while you are learning you would want to see the action.
     
  12. Hadron

    Hadron Registered Member

    Joined:
    Apr 1, 2014
    Posts:
    2,145
    Yes, I don't want the command window at all, but running Drive Snapshot minimized is OK.
     
  13. Hadron

    Hadron Registered Member

    Joined:
    Apr 1, 2014
    Posts:
    2,145
    OK. I added the code.
    It makes the command window start minimized and the Drive Snapshot window sit on the Desktop.
    Ideally, it would be nice to have the command window closed and the Drive Snapshot window minimized. I don't know if it can be done.
     
    Last edited: Apr 24, 2019
  14. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,175
    Location:
    NSW, Australia
    Your backup batch file would be...

    Code:
    @echo off
    CD /d %~dp0
    if not defined RunTask set RunTask=1 & start "Snapshot" /min %SystemRoot%\system32\cmd.exe /c "%0" & goto :EOF
    snapshot64.exe HD1:* "D:\DS_backup\$DISK-$DATE.sna" -Go -o -L0
    Edit your path from D:\DS_backup\ to your own path.
     
  15. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,175
    Location:
    NSW, Australia
    Try this as an experiment. You can have this batch file anywhere.

    Code:
    @echo off
    CD /d %~dp0
    if not defined RunTask set RunTask=1 & start "Snapshot" /min %SystemRoot%\system32\cmd.exe /c "%0" & goto :EOF
    echo Hadron
    pause
    
    It should run minimized. Bring it up and it should say Hadron.
     
  16. Hadron

    Hadron Registered Member

    Joined:
    Apr 1, 2014
    Posts:
    2,145
    No. It required me to press any key to continue.

    Command.jpg
     
  17. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,175
    Location:
    NSW, Australia
    Try this...

    Code:
    @echo off
    CD /d %~dp0
    if not defined RunTask set RunTask=1 & start "Snapshot" /min %SystemRoot%\system32\cmd.exe /c "%0" & goto :EOF
    snapshot64.exe HD1:* "D:\DS_backup\$DISK-$DATE.sna" -o -L0
    I removed -Go. There will be no DS GUI. The Command Window must be present (even if minimized) for the entire backup.
     
  18. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,175
    Location:
    NSW, Australia
    That's correct. "Pause" does that. But it did say Hadron.

    Using Pause is handy if your batch file is failing. It allows you to see where things are going wrong.
     
  19. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,175
    Location:
    NSW, Australia
    I don't use -Go and I think DS runs faster without it.
     
  20. Hadron

    Hadron Registered Member

    Joined:
    Apr 1, 2014
    Posts:
    2,145
    OK. I can live with a minimized command window without a DS GUI.
    The command window actually displays it's progress.
     
  21. Hadron

    Hadron Registered Member

    Joined:
    Apr 1, 2014
    Posts:
    2,145
    I think it's quicker, too.
     
  22. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,175
    Location:
    NSW, Australia
    You are on top of this already.
     
  23. Hadron

    Hadron Registered Member

    Joined:
    Apr 1, 2014
    Posts:
    2,145
    So, the -Gm switch wouldn't have worked as stated here.
     
  24. Hadron

    Hadron Registered Member

    Joined:
    Apr 1, 2014
    Posts:
    2,145
    I'm starting to like DS.
    Now, if only restorations are reliable. That's my number 1 priority. :isay:
     
  25. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,175
    Location:
    NSW, Australia
    I still haven't tried -Gm and I'm not really interested.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.