Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dadigang
Ventoy
Commits
f9c56c66
Commit
f9c56c66
authored
Oct 22, 2022
by
longpanda
Browse files
update vtoyjump
parent
1ab1799b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
0 deletions
+22
-0
INSTALL/ventoy/vtoyjump32.exe
INSTALL/ventoy/vtoyjump32.exe
+0
-0
INSTALL/ventoy/vtoyjump64.exe
INSTALL/ventoy/vtoyjump64.exe
+0
-0
vtoyjump/vtoyjump/vtoyjump.c
vtoyjump/vtoyjump/vtoyjump.c
+22
-0
No files found.
INSTALL/ventoy/vtoyjump32.exe
View file @
f9c56c66
No preview for this file type
INSTALL/ventoy/vtoyjump64.exe
View file @
f9c56c66
No preview for this file type
vtoyjump/vtoyjump/vtoyjump.c
View file @
f9c56c66
...
...
@@ -2482,6 +2482,22 @@ End:
}
static
int
vtoy_cmd_delete_file
(
char
*
File
)
{
CHAR
szCmd
[
MAX_PATH
];
STARTUPINFOA
Si
;
PROCESS_INFORMATION
Pi
;
GetStartupInfoA
(
&
Si
);
Si
.
dwFlags
|=
STARTF_USESHOWWINDOW
;
Si
.
wShowWindow
=
SW_HIDE
;
sprintf_s
(
szCmd
,
sizeof
(
szCmd
),
"cmd.exe /c del /F /Q %s"
,
File
);
CreateProcessA
(
NULL
,
szCmd
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
Si
,
&
Pi
);
WaitForSingleObject
(
Pi
.
hProcess
,
INFINITE
);
return
0
;
}
int
real_main
(
int
argc
,
char
**
argv
)
{
int
i
=
0
;
...
...
@@ -2562,6 +2578,12 @@ int real_main(int argc, char **argv)
sprintf_s
(
LunchFile
,
sizeof
(
LunchFile
),
"%s"
,
"cmd.exe"
);
}
if
(
IsFileExist
(
ORG_PECMD_BK_PATH
))
{
Log
(
"Delete backup file <%s>"
,
ORG_PECMD_BK_PATH
);
vtoy_cmd_delete_file
(
ORG_PECMD_BK_PATH
);
}
Log
(
"Backup log at this point"
);
CopyFileA
(
LOG_FILE
,
"X:
\\
Windows
\\
ventoy.backup"
,
TRUE
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment