Silent Install Program works but doesn't update F98825

timallen

timallen

Well Known Member
Silent Install Program works but doesn\'t update F98825

I've been doing silent installs recently, and they work great. I decided to try doing them from a VBScript program to automate things. The program reads the machine name, queries F98825 for outstanding packages, and installs them.

When I run the silent install from either a batch file or from a VBScript program, the installation works, but does not change the installation status in the F98825 table, which holds the deployment status of packages.

The result of this is that even if I install all the packages, the next time the user enters, these packages still show up as uninstalled. Anyone have any ideas?

I suppose I could do this from the same program that sdoes the package install, but I wonder if the installation is taking place correctly.

Here is the VBScript program, which reads the machine name, queries F98825 for outstanding packages, and installs them. If you're looking for the command line parameters, they're in the procedure "install_package" on the 3rd line:

' Package_installer.vbs - Tim Allen
option explicit
const deployment_server = "DEPLOYMENT"
const data_server = "DATASVR"

' Call the main procedure
read_data()

sub install_package(pkg_name)
dim s, cmd
Set s = WScript.CreateObject("WScript.Shell")
' Build the silent installation command line
cmd = """\\" & deployment_server & "\b7333\OneWorld Client Install\Setup.exe"" -d c:\b7 -p " & pkg_name & " -s -e H"
' Run the command line. Halt execution until the installation
' is over (third parameter)
s.run cmd, 1, 1
set s = nothing
' Pause for 30 seconds between installations
WScript.Sleep 30000
end sub

function machine_name()
' Returns the machine name for the SQL query
Dim WshNetwork
Set WshNetwork = CreateObject("WScript.Network")
machine_name = WshNetwork.ComputerName
end function

sub read_data
dim data_file
Dim dsn
Dim cn
Dim rs
dim sql
dim paquetes_instalados

' Build the SQL query of outstanding packages for
' this machine
sql = "select upjdepkgnm from f98825 where upmkey='" & machine_name() & "' and UPINPKST=20 and UPPATHCD='PY7333'"
set cn = CreateObject("ADODB.Connection")
set rs = CreateObject("ADODB.Recordset")

' Create and open non-ODBC connection
With cn
.Provider = "SQLOLEDB.1"
.ConnectionString = "Password=sys7333;User ID=sys7333;Initial Catalog=JDE7333;Data Source=" & data_server & ";"
.Open
End With

' Open recordset with the SQL Query and read the
' package names from it
dim dbLine
dim pkg_name
With rs
.Open sql, cn
.MoveFirst
Do While Not .EOF
pkg_name = .Fields("UPJDEPKGNM").value
paquetes_instalados = paquetes_instalados & pkg_name & vbcrlf
' Install each package
install_package pkg_name
.MoveNext
Loop
.Close
End With

cn.Close

' Informar los usuarios que ha acabado
msgbox "Paquetes instalados:" & _
vbcrlf & paquetes_instalados, 32, "Todos paquetes instalados"
End Sub
 
Re: Silent Install Program works but doesn\'t update F98825

Hi-

Just a thought--are you creating a deployment record before you run the silent install program? If you do, then let the installs occur automatically, when the user logs in--after the install occurs--the deployment record status will change to installed.

If you create a deployment record as "Mandatory", if the automated deployment fails for some reason, they will get the package to install when they sign in. This gives a nice piece of added security that the packages will be installed.

I also have created a number of scripts that automate the deployment process and have a very fail proof process--coupled with the above mentioned step... These scripts--of mine--are written in .bat and give great flexibility of emailing the package to the user as needed. They also have been modified to deploy to Citrix servers as well. If anyone wishes to see these, I can provide a nice document that explains the whole thing.

Good luck, Tim, with your processes...automateing any CNC/sys admin function is wonderful!

(I have in mind to create with the help of others a rather robust CNC program that will automate several duties--sort of a CNC admin in a box!--like these skills can be packaged nicely in a box! hehehehehe)

David
 
Re: Silent Install Program works but doesn\'t update F98825

David, I would be very interested in seeing your documentation especially in regards to the Citrix installations. Would you be kind enough to post this on the list as an attachment? I'm sure that others would like to see this as well.
 
Re: Silent Install Program works but doesn\'t update F98825

I don't believe you can post attachments on this list. I would suggest
uploading it to the JDEList site.

FWIW

Thanks,
James
 
Re: Silent Install Program works but doesn\'t update F98825

Hello Tim,

Thanks for your posts re silent install, they have helped us a lot. We do not allow our users Admin rights on NT and we don't want to hack the registry, so we plan to setup a Scheduled task to run, (with admin rights), the silent install overnight. If a user wants a package they will leave the machine powered (but logged off). The task will run a script from the deployment server so if necessary it can do other things in addition to the silent install.
 
Back
Top