installing addins
Posted: Thu Oct 16, 2014 11:55 am
Hi
I have made a program that is supposed to automatically install all the addins i have in a particular folder (see below). But when i run it, I have to confirm manually that I want to replace the addin (if it already is installed), see attached Word file. Is there a way (command) so that I do not have to do this manually?
Thomas
close @all
'program installs all the addins in addin directory
'each addin must be placed in a subfolder, and the installation file must have the structure:
' name_install.prg
'a) finding folder names and storing the names in the txt file folders
%dir= "C:\tvb\eviews\addins"
cd %dir
shell(out=addins) dir /s /b /o:n /ad > {%dir}\Folders.txt
'b) installing addins
wfopen(type=text) ".\folders.txt"
'find length of %dir string
!dir=@len(%dir)+2
for !i=6 to @obssmpl
%name=@mid(series01(!i),!dir) 'find name of folder
if @folderexist(%name)=1 then 'check existence of subfolder
%subdir= %dir+"\"+%name+"\" 'name of subdirectory
cd %subdir
string a=%subdir
%filename=%name+"_install.prg" 'name of installation file
if @fileexist(%filename) =1 then 'if installation file exist
%dirname=%subdir+%filename
exec %dirname 'execute installation program
endif
endif
cd %dir
next
I have made a program that is supposed to automatically install all the addins i have in a particular folder (see below). But when i run it, I have to confirm manually that I want to replace the addin (if it already is installed), see attached Word file. Is there a way (command) so that I do not have to do this manually?
Thomas
close @all
'program installs all the addins in addin directory
'each addin must be placed in a subfolder, and the installation file must have the structure:
' name_install.prg
'a) finding folder names and storing the names in the txt file folders
%dir= "C:\tvb\eviews\addins"
cd %dir
shell(out=addins) dir /s /b /o:n /ad > {%dir}\Folders.txt
'b) installing addins
wfopen(type=text) ".\folders.txt"
'find length of %dir string
!dir=@len(%dir)+2
for !i=6 to @obssmpl
%name=@mid(series01(!i),!dir) 'find name of folder
if @folderexist(%name)=1 then 'check existence of subfolder
%subdir= %dir+"\"+%name+"\" 'name of subdirectory
cd %subdir
string a=%subdir
%filename=%name+"_install.prg" 'name of installation file
if @fileexist(%filename) =1 then 'if installation file exist
%dirname=%subdir+%filename
exec %dirname 'execute installation program
endif
endif
cd %dir
next