Jump to content
Sign in to follow this  
YOUF

bat to autoit,what?

Recommended Posts

YOUF

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

Share this post


Link to post
Share on other sites
YOUF

I am sorry, network problems caused by repeated.

Share this post


Link to post
Share on other sites
YOUF

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~!

Share this post


Link to post
Share on other sites
PsaltyDS

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

Share this post


Link to post
Share on other sites
Jos

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

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
YOUF

yes,duplicate were removed

I still want to know how the two bat code into autoit code, we hope to get help.

Share this post


Link to post
Share on other sites
YOUF

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 »

Share this post


Link to post
Share on other sites
Zedna

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()

...

Share this post


Link to post
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
Sign in to follow this  

×