YOUF Posted May 17, 2008 Posted May 17, 2008 (edited) Link : (bat) @echo off cls title Linking...... color 1b echo Please Wait........... :set set x=0 set iscsi_name=0 set svrip=192.168.1.248 :ready iscsicli ListTargets>%temp%\name.isc for /f "skip=1" %%a in (%temp%\name.isc) do set iscsi_name=%%a if %iscsi_name%==0 goto add goto logon :add iscsicli AddTargetPortal %svrip% 3260>nul :logon iscsicli ListTargets>%temp%\name.isc for /f "skip=1" %%a in (%temp%\name.isc) do set iscsi_name=%%a iscsicli LoginTarget %iscsi_name% T * * * * * * * * * * * * * * * 0 >nul ping -n 10 127.1>nul exit Disconnect :(bat) @echo off c: echo **********disconnecting********** for /l %%a in (1,1,10) do ( iscsicli sessionlist>session.isc for /f "tokens=1,3,4" %%b in (session.isc) do ( if %%b==Session ( iscsicli logouttarget 0x%%d>session.isc ) if %%b==Total ( if %%c==0 ( echo **********Disconnect success********** goto end ) ) ) ) echo **********Disconnect failure, close the related procedures********** echo ********For example, iSCSI closed the game on the disk or procedures******** pause :end del session.isc /q iscsicli LoginTarget iqn.1991-05.com.microsoft:00 T * * * * * * * * * * * * * * * 0 ======================== This code should be converted into two bat autoit code, thank you .. Edited May 17, 2008 by YOUF
YOUF Posted May 17, 2008 Author Posted May 17, 2008 I was far away in one of China's autoit enthusiasts, when the height of the Internet, the network very slow, resulting in repeated I am Very sorry~!
PsaltyDS Posted May 17, 2008 Posted May 17, 2008 I was far away in one of China's autoit enthusiasts, when the height of the Internet, the network very slow, resulting in repeated I am Very sorry~!If this is a duplicate post, I don't see the other one. Have you solved your issue already? If not, how far have you gotten? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Developers Jos Posted May 17, 2008 Developers Posted May 17, 2008 If this is a duplicate post, I don't see the other one. Have you solved your issue already? If not, how far have you gotten? dups were removed ... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
YOUF Posted May 17, 2008 Author Posted May 17, 2008 yes,duplicate were removed I still want to know how the two bat code into autoit code, we hope to get help.
Developers Jos Posted May 17, 2008 Developers Posted May 17, 2008 (edited) what have you tried and working and what do you have issue with ? Jos Edited May 17, 2008 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
YOUF Posted May 17, 2008 Author Posted May 17, 2008 Jos, Which the bat is the normal work. What I mean is: these two pieces of code into autoit code, it can be achieved » How to do »
Zedna Posted May 17, 2008 Posted May 17, 2008 Jos,Which the bat is the normal work. What I mean is: these two pieces of code into autoit code, it can be achieved » How to do »Open AutoIt helpfile and start reading at Run() For/Next loop FileDelete() ... Resources UDF ResourcesEx UDF AutoIt Forum Search
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now