Sign in to follow this  
Followers 0
tempasdf

Where is my code wrong ?

7 posts in this topic

Code Begin:

----------------------------------------------------------------------------------

; ----------------------------------------------------------------------------

; AutoIt Version : v3.1.0

; Language : English

; Platform : WIN98

; Original Author : SYJ

; Edited by :

; Create Date : 06/14/2005

; Script Function : Setup Recovery Genius

; Chinese ReMark : 安装还原精灵

; ----------------------------------------------------------------------------

; ----------------------------------------------------------------------------

; Finding CDROM

; ----------------------------------------------------------------------------

$var = DriveGetDrive( "cdrom" )

$idUser = 1

; ----------------------------------------------------------------------------

; Windows Minimize

; ----------------------------------------------------------------------------

WinMinimizeAll()

; ----------------------------------------------------------------------------

; Checks The path Does not Exists and Process Does not runing

; ----------------------------------------------------------------------------

If ProcessExists("Setup.exe") Then

MsgBox(0, "Example", "Recovery Genius Setup Program is running.")

Exit

EndIf

While $idUser <= $var[0]

If FileExists($var[$idUser] & "\RG\SETUP.EXE") Then

; ----------------------------------------------------------------------------

; Run The RG

; ----------------------------------------------------------------------------

run($var[$idUser] & "\RG\SETUP.EXE")

WinWaitActive("还原精灵 安装","请阅读下面的许可协议")

Send("{ALTDOWN}an{ALTUP}")

Sleep(1000)

Send("yuanvrt5tq3qv8w8n36s{ALTDOWN}nnuna{ALTUP}")

Send("{TAB}qtempsys{TAB}{ALTDOWN}cin{ALTUP}")

Send("qtempsys{ENTER}")

Send("{ENTER}")

Send("{ALTDOWN}n{ALTUP}")

WinWaitActive("还原精灵 安装","(&R)现在就重新启动计")

Send("{ALTDOWN}n{ALTUP}{ENTER}")

Exit

EndIf

$idUser = $idUser+1

WEnd

MsgBox(0,"warning","Recovery Genius Setup path does not Exisit.")

Exit

----------------------------------------------------------------------------------

Code End:

The software does not run after restarting

The question is on this sentence ( run($var[$idUser] & "\RG\SETUP.EXE") )

Could you tell me how to revise

Share this post


Link to post
Share on other sites



Hi,

Check with this

$var = DriveGetDrive( "cdrom" )
$idUser = 1
MsgBox(4096,'Testing',$var[$idUser] & "\RG\SETUP.EXE")

To see if this is what u want....

Andre


What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!

Share this post


Link to post
Share on other sites

Thank andre

The question is not here

---------------------------------------------------

(windows key +R) cdrom:\rg\setup.exe

Installation software that can be successful

----------------------------------------------------

dos prompt c:\windows\cdrom:\rg\setup.exe

Like code , can't succeed in installing the software

--------------------------------------------------------

My English is very poor, I am sorry

Share this post


Link to post
Share on other sites

I think Andre is correct... maybe you should take a seond look at his comments

also.... maybe this could help (not sure exactly of your problem)

To run DOS (console) commands, try...

Run(@ComSpec & " /c " & 'commandName', "", @SW_HIDE)

or maybe this...

RunWait(@ComSpec & " /c " & ' c:\windows\cdrom:\rg\setup.exe

', "", @SW_HIDE)

i did not test this.... but may be a dorection for you

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Need to restart the computer after the code is operated, the software could be installed normally,

The question wrong in here :

run($var[$idUser] & "\RG\SETUP.EXE")

There is the mouse that doubles click and operates the installation procedure , the software can be installed successfully

It use run (),it can't have succeeded in it install by software

Share this post


Link to post
Share on other sites

Hi,

Perhaps u could ask someone to translate your question to (better) english :)

Andr


What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!

Share this post


Link to post
Share on other sites

:">

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  
Followers 0