Jump to content

bat to autoit,what?


Recommended Posts

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 by YOUF
Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • Developers

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.
  :)

Link to comment
Share on other sites

  • Developers

what have you tried and working and what do you have issue with ?

Jos

Edited 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.
  :)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...