V1.09 - added silent switch and simplification
This commit is contained in:
parent
9098bc9538
commit
5dc9a6953b
BIN
snapcontrol.exe
BIN
snapcontrol.exe
Binary file not shown.
@ -29,9 +29,10 @@ EnableGraphicalConsole(0)
|
||||
|
||||
Dim filelist$(0)
|
||||
|
||||
Global VERSION$="V1.08"
|
||||
Global VERSION$="V1.09"
|
||||
Global updatesched = 0
|
||||
Global dryrun = 0
|
||||
Global silentmode = 0
|
||||
Global hostname$ = GetEnvironmentVariable("COMPUTERNAME")
|
||||
Global jobname$ = "snapcontrol"
|
||||
Global month$ = FormatDate("%mm", Date())
|
||||
@ -52,7 +53,8 @@ NewList DriveSnapshotVersion$()
|
||||
DriveSnapshotVersion$() = "V1.48"
|
||||
|
||||
Procedure Usage()
|
||||
PrintN ("usage: snapcontrol.exe [ /I | /V> | /D | /? ]")
|
||||
PrintN ("usage: snapcontrol.exe [ /S | /I | /V> | /D | /? ]")
|
||||
PrintN (" /S = silent mode (no user interaction!)")
|
||||
PrintN (" /I = install/update scheduler job")
|
||||
PrintN (" /V = show version")
|
||||
PrintN (" /D = dry run")
|
||||
@ -73,6 +75,8 @@ ElseIf ( UCase(ProgramParameter(0)) = "/V" )
|
||||
End 0
|
||||
ElseIf ( UCase(ProgramParameter(0)) = "/D" )
|
||||
dryrun = 1
|
||||
ElseIf ( UCase(ProgramParameter(0)) = "/S" )
|
||||
silentmode = 1
|
||||
ElseIf ( ProgramParameter(0) = "/?" )
|
||||
Usage()
|
||||
EndIf
|
||||
@ -338,6 +342,10 @@ If ( FtpBackup$ = "yes" )
|
||||
TargetPath$ = "ftp://" + TargetUser$ + "@" + FtpServer$ + TargetPath$
|
||||
EndIf
|
||||
|
||||
|
||||
; SILENT mode.
|
||||
; NO questions!
|
||||
If ( silentmode = 0 )
|
||||
;
|
||||
; ASK the user for permission to start ...
|
||||
;
|
||||
@ -364,6 +372,7 @@ Result$ = InputRequester("SnapControl",
|
||||
If LCase(Result$) = "yes"
|
||||
DoShutdown = 1
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
|
||||
; cleanup: delete old Logfile, remove old drive letter...
|
||||
@ -542,7 +551,8 @@ EndProg(e)
|
||||
|
||||
; IDE Options = PureBasic 5.73 LTS (Windows - x64)
|
||||
; ExecutableFormat = Console
|
||||
; CursorPosition = 31
|
||||
; CursorPosition = 374
|
||||
; FirstLine = 333
|
||||
; Folding = --
|
||||
; EnableXP
|
||||
; Executable = snapcontrol.exe
|
||||
|
Loading…
Reference in New Issue
Block a user