Hi all,
Many thanks to Dan Richards for this information. You can use VBScript
to run a program, and send it key strokes, and this applies to JDE also.
To prepare for this script to run, build your package, then prepare for
deployment by selecting the servers to deploy to, and activating the
package for deploy. At the end, you should be in the window titled
"Package Build - [Work With Package Deployment]", and see the folders
labelled "Deployment", and below that, one labelled "TSARF (Approved)"
(where TSARF is the package name).
At this point exit from JDE, and you are ready to deploy the package
using a script. The contents of the script are listed below, and you
need to change the password and package name to suit your individual
case. Also, I think you need to run the script interactively, so you
need to remain logged in at the console of the server where you will
deploy, and not use a password-protected screen saver. I deploy from the
deployment server, but this is not strictly required.
Some useful information about shell scripting with VB Script can be
found at Microsoft's Scripting site. (Go to technet.microsoft.com, and
click the Script Center link, or search for WshShell for information
specific to this script.)
Good luck with this. It solved my problem, and I sleep the night
through!
Regards,
Mark
EnterpriseOne (ERP 8), Update 1, SP22_F1, Windows 2000, SQL Server 2000,
Citrix XP
Script follows:
------------------------------------------------------
' Use VB Script to automate deployment of package
' Run this from the Deployment Server
'
' Change:
' Password (search for ,,,,,)
' Package (search for .....)
set SH1=CreateObject("Wscript.Shell")
'Launch JDE
SH1.Run "d:\jdedwardsoneworld\b7334\system\bin32\oexplore.exe"
WScript.Sleep 2000
'Wait for the Logon Screen
While SH1.AppActivate("OneWorld Sign ON") = FALSE
WScript.Sleep 1000
Wend
SH1.SendKeys "+{TAB}"
Wait 1000
'Enter User
SH1.SendKeys "JDE"
SH1.SendKeys "{TAB}"
Wait 1000
'Password - You may need to change this ,,,,,
SH1.SendKeys "jde_password"
SH1.SendKeys "{TAB}"
Wait 1000
'Environment
SH1.SendKeys "DEP7334"
Wait 1000
'Press OK
SH1.SendKeys "%O"
'Wait for Solution Explorer
'While SH1.AppActivate("J.D. Edwards OneWorld Explorer") = FALSE
' WScript.Sleep 1000
'Wend
'SH1.AppActivate WTitle
Call WAct("J.D. Edwards OneWorld Explorer")
SH1.SendKeys "P9631"
SH1.SendKeys "{ENTER}"
Call WAct("Package Deployment - [Work With Package Deployment]")
' Package, you may need to change this value .....
SH1.SendKeys "PDAQF"
SH1.SendKeys "%I"
Wait 1000
' Right arrow opens up the package folder
SH1.SendKeys "{RIGHT}"
Wait 1000
'Three down arrows bring you to the Enterprise Servers
SH1.SendKeys "{DOWN}"
Wait 1000
SH1.SendKeys "{DOWN}"
Wait 1000
SH1.SendKeys "{DOWN}"
Wait 1000
'A right-arrow opens this package
SH1.SendKeys "{RIGHT}"
Wait 1000
'Alt-R, D initiates deployment
SH1.SendKeys "%R"
Wait 1000
SH1.SendKeys "D"
Wait 1000
WAct "Work With Package Deployment - [Report Output Destination]"
'Destination shuld already be "On Screen"
SH1.SendKeys "%O"
'SH1.SendKeys "%C"
Wait 1000
' Leave the program open, so the result displays on the screen in the
morning
'End
Sub Wait(MS)
' Wait for MS milliseconds
WScript.Sleep MS
End Sub
Sub WAct(WTitle)
'Wait for the Windows with WTitle to appear, and activate it.
while SH1.AppActivate(WTitle) = FALSE
WScript.Sleep 1000
WEnd
SH1.AppActivate WTitle
SH1.AppActivate WTitle
End Sub
-----------------------------------------------------------------