Jump to content

Help finishing off my first script - installation script


 Share

Recommended Posts

I'm starting to get a hang of this, but I still need alot of help. I don't have a good grasp of scripting yet, so my codeing might look really off. I just need a little direction, I've been banging my head on the wall with no luck. The information on what I'm trying to do is below, any direction would great! I need to know if my logic is right and what commands I should be reading about to accomplish what I'm trying to get done. (They need to put a crying Icon on this form..)

Here is what my script is surpose to do:

Purpose:

Upgrade client when the user logs into the domain if it already hasn't been updated. (Note: EVRSI.sys is a legacy file that causes issues and is not use. That's why I'm just deleting it.)

Flow:

Check to see if "EVRSI.sys" exist --> if it does exist then stop "All Rockwell Services" --> delete the "EVRSI.sys" file --> Restart Workstation

Else

Check to see if application file exist --> if it does exist then end script

Else

Run "Install App Module"

EndIF

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

'Check if the EVRSI.sys file exist --> if it does then stop all rockwell services --> delete file --> then restart the workstation automatically

If FileExists("c:\evrsi.sys") Then

("All Rockwell Services")Stop_Service

FileDelete("c:\evrsi.sys")

"Restart Workstation"

Elseif FileExists("C:\Windows\Program Files\Rockwell Software\Factory Talk Activation\ftactTool.exe") Then

EndIf

Else

' Factory Talk Activation Installation Module

' Load the execution file

FileInstall("C:\Rockwell Software\3.02 Client\setup.exe", "C:\")

'Step through the Installation Wizard

WinActive("Install Wizard") Controlsend({Enter})

Winactive("Windows2") Controlsend({Enter})

WinActive("Window3") Controlsend({Enter})

Winactive("Windows4") Controlsend({Enter})

WinActive("Window5") Controlsend({Enter})

Winactive("Windows6") Controlsend({Enter})

WinActive("Windows7") Controlsend({Enter})

Winactive("Windows8") Controlsend({Enter})

WinActive("Window9") Controlsend({Enter})

Winactive("Window10") Controlsend({Enter})

WinActive("Window11") Controlsend({Enter})

Winactive("Window12") Controlsend({Enter})

' Configure the license client to point to fileserver1

Call "C:\Program Files\Rockwell Software\Factory Talk License Client\ftuLic.exe"

Winactive("Factory Talk License Client") Controlclick("Factory Talk License Client", "Settings TAB", Click "Add", "@fileserver1")

Controlsend({Alt+E})

"Restart Workstation"

EndIf

Link to comment
Share on other sites

Check to see if "EVRSI.sys" exist --> if it does exist then stop "All Rockwell Services" --> delete the "EVRSI.sys" file --> Restart Workstation

Else

Check to see if application file exist --> if it does exist then end script

Else

Run "Install App Module"

EndIF

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

'Check if the EVRSI.sys file exist --> if it does then stop all rockwell services --> delete file --> then restart the workstation automatically

If FileExists("c:\evrsi.sys") Then

("All Rockwell Services")Stop_Service

FileDelete("c:\evrsi.sys")

"Restart Workstation"

Elseif FileExists("C:\Windows\Program Files\Rockwell Software\Factory Talk Activation\ftactTool.exe") Then

EndIf

Ive already resolved this part from your other topic :)

;' Factory Talk Activation Installation Module
;' Load the execution file
FileInstall("C:\Rockwell Software\3.02 Client\setup.exe", "C:\") 
;'Step through the Installation Wizard 
WinActive("Install Wizard")
Send("{ENTER}")
Winactive("Windows2")
Send("{ENTER}")
WinActive("Window3")
;etc .....
;' Configure the license client to point to fileserver1
ShellExecute("C:\Program Files\Rockwell Software\Factory Talk License Client\ftuLic.exe") 
Winactive("Factory Talk License Client")
Controlclick("Factory Talk License Client", "", ID, 1) ;you need to get id with au3info tool
Send("!E")
;"Restart Workstation"

Now use helpfile for get more info about functions (F1 in SciTE)

Cheers, FireFox.

Edited by FireFox
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...