Home > other >  Windows 7 perform bat file your setx not internal or external command, nor can run the program?
Windows 7 perform bat file your setx not internal or external command, nor can run the program?

Time:10-15

When to perform bat file windos10 system is able to run normally, in windos7 system cannot run normally, prompt the following error!!!!!!!!!!
Pray god to explain the problems
Below is the code
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- being -- -- -- -- -- -- -- -- -- -- -- -- -- --
@ echo off
% 1 start "" mshta vbscript: createobject (" shell. Application"). The shellexecute (" "" "" % ~ 0 ", ": :",, "runas", 1) (window. Close) & amp; The exit
The set regpath=HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Session Manager \ Environment
The set jdkpath=% \ % CD jdk1.8.0 _144
The set jrepath=% \ % CD jre1.8.0 _144
Set CD mysqlpath=% % \ mysql - 5.7.27 - winx64
The set catalinahome CD=% % \ apache tomcat -- 8.5.47
Rem LPY
Echo.
Echo * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Echo * *
Echo * JDK system environment variable is set % CD % \ % ~ dp0 *
Echo * *
Echo * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Echo.
Echo===to set the environment variable: JAVA_HOME_SFJD jdkpath=% %
Echo===note: if the JAVA_HOME exist, will be overwritten, this action is not reversible, please check carefully!!!!!===
Echo.
Echo===to set the environment variable (a.) : the classPath JAVA_HOME_SFJD=% % % % \ lib \ tools. The jar. JAVA_HOME_SFJD % % % % \ lib \ dt. The jar. .
Echo===note: if the classPath exists, will be overwritten, this action is not reversible, please check carefully!!!!!===
Echo.
Echo===to set the environment variable: JAVA_HOME_SFJD PATH=% % % % \ bin
Echo===note: PATH will increase in the front,
Echo.
Echo.
Echo.
Echo.
Echo.
Echo===new create environment variable JAVA_HOME_SFJD jdkpath=% %
Your setx JAVA_HOME_SFJD jdkpath "% %" -m
Echo.
Echo.
Echo===new create environment variable JRE_HOME_SFJD jrepath=% %
Your setx JRE_HOME_SFJD jrepath "% %" -m
Echo.
Echo.
Echo===new create environment variable CLASSPATH_SFJD JAVA_HOME_SFJD=% % % % \ lib \ tools. The jar. JAVA_HOME_SFJD % % % % % \ lib \ dt. The jar. .
Your setx CLASSPATH_SFJD "JAVA_HOME_SFJD % % % % \ lib \ tools. The jar. JAVA_HOME_SFJD % % % % % \ lib \ dt. The jar. "-m
Echo.
Echo.
Echo===MYSQL environment variable MYSQL_HOME_SFJD="% mysqlpath %
"Your setx MYSQL_HOME mysqlpath "% %" -m
Echo.
Echo.
Echo===tmocat the CATALINA_HOME environment variable="% catalinahome %
"Your setx the CATALINA_HOME catalinahome "% %" -m
Echo.
Echo.
Echo===new additional environment variables (appended to the front) JAVA_HOME_SFJD PATH=% % % % \ bin
For/f "tokens=1, * delims=:" % % a in (' reg QUERY "% % regpath"/v "path") do (
Set "L=% % a"
Set "P=% % b"
)
Set "Y=% L: : ~ - 1% % P %"

Your setx path "JAVA_HOME_SFJD % % % % \ bin; JRE_HOME_SFJD % % % % \ bin; MYSQL_HOME % % % % \ bin; % % "Y -m
Echo.
Echo.
; Echo===please press any key to exit! Run the CMD input Java and Java version - check whether the installation is successful!
The exit
; Pause> Nul
-- -- -- -- -- -- -- -- -- -- -- end -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

CodePudding user response:

Didn't go to other Windows 7 machine copy a your setx. Exe
Next, or from a trusted website,
  • Related