#152910 - 2005-12-06 10:45 AM
Automatic installation
|
Bobbes
Fresh Scripter
Registered: 2005-12-02
Posts: 7
|
Hi,
For a school project, i'm working on a script that needs to install files from a fileserver after a certain date. I was thinking about something like a .INI file on the client which compares the date in it with all the files in the folder on the fileserver. But now my question:
What commands can i use so the script will install multiple files from the folder on the fileserver without knowing what the filename is? Because it needs to be variable so you don't need to edit the script everytime there is an update for the client.
Hope you can help me, Bobbes
|
Top
|
|
|
|
#152911 - 2005-12-06 02:25 PM
Re: Automatic installation
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Can you be more specific with what you are attempting to accomplish? Quote:
i'm working on a script that needs to install files from a fileserver after a certain date.
What does install mean? Do you want to copy? If so, there is a copy command or even Xcopy or Robocopy. Are you saying that you want to have a script run but take no action until a certain time/date passes? Or are you only wanting to install file that meet a certain date requirement?
Edited by Howard Bullock (2005-12-06 02:25 PM)
|
Top
|
|
|
|
#152912 - 2005-12-06 08:06 PM
Re: Automatic installation
|
Bobbes
Fresh Scripter
Registered: 2005-12-02
Posts: 7
|
Well, they asked me to build a system with InstallRite and Kixtart. InstallRite records an installation on one Client and builds a .EXE file. The .Exe file is going to be placed on the File server in a folder so All client computers can access the files.
When a client computer starts, Kixtart needs to check if there is a new .EXE file for him and if there is, he needs to run the file. But it is possible that there are more updates for him, so the also needs to wait before an other installation is done. Something like Old files First. (Maybe an other solution for a date in a .INI file is to check witch files the client allready have and compare that with the folder on the fileserver and download the ones he doesn't have. But i don't know what is easier to make)
Hope this explains a little more, Bobbes
Edited by Bobbes (2005-12-06 08:08 PM)
|
Top
|
|
|
|
#152914 - 2005-12-08 10:19 AM
Re: Automatic installation
|
Bobbes
Fresh Scripter
Registered: 2005-12-02
Posts: 7
|
Yes I noticed that UDF command, but it can't compare the data IN two .INI files right? It is used to compare the date OF 2 different files which won't make the system variable.
What about the solution with the directory list? Compare the files in the folder of the filserver with a .INI file on the client what says which files he already have and install the ones he is missing and after that rebuild the .INI file with the files he installed?
I think this is a rather difficult situation, but not impossible
|
Top
|
|
|
|
#152916 - 2005-12-08 10:43 AM
Re: Automatic installation
|
Bobbes
Fresh Scripter
Registered: 2005-12-02
Posts: 7
|
Because he doesn't need to compare files on the cliënt with the ones on the server. The files that are on the server are .EXE files the clients need to run. The clients just need to know what files are installed before (by writing them into a ini file) and install the files on the fileserver he never installed before. (Which won't be in the ini file)
Maybe this makes sense: Code:
If Open( 3 , "C:\TEMP\LOG.ini" , 5 ) = 0 $FileName = Dir("\\server\data\*.exe") While $FileName <> "" And @ERROR = 0 $x = WriteLine( 3 , $FileName + @CRLF ) $FileName = Dir() ; retrieve next file Loop
Edited by Bobbes (2005-12-08 10:47 AM)
|
Top
|
|
|
|
#152918 - 2005-12-08 11:10 AM
Re: Automatic installation
|
Bobbes
Fresh Scripter
Registered: 2005-12-02
Posts: 7
|
Yeah, this seems to be something that does the job. But there is a error in the line of the profile string. (Too many parameters) Code:
If Not Len(ReadProfileString("c:\temp\log_installs.ini",$FileName,"",""))
Edited by Bobbes (2005-12-08 11:11 AM)
|
Top
|
|
|
|
#152920 - 2005-12-08 11:14 AM
Re: Automatic installation
|
Bobbes
Fresh Scripter
Registered: 2005-12-02
Posts: 7
|
Yes, if i remove that line, it writes perfectly to the ini file. Else I retrieve a too many parameters error
|
Top
|
|
|
|
#152922 - 2005-12-08 11:24 AM
Re: Automatic installation
|
Bobbes
Fresh Scripter
Registered: 2005-12-02
Posts: 7
|
Ohh, thank you so much! you really helped us in the right direction. Thanks!
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 242 anonymous users online.
|
|
|