This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Automatic download from web, at run-time
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 16, 2009
04:43 AM
Automatic download from web, at run-time
Hi,
I am working on IS 2009 project, where I need to download a few components from web and install at runtime. How can I do it without user interaction? :confused:
Thanks in advance,
Anitha
I am working on IS 2009 project, where I need to download a few components from web and install at runtime. How can I do it without user interaction? :confused:
Thanks in advance,
Anitha
(22) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 16, 2009
04:52 AM
Hi,
do you mean silent installation ....of your application..
thanks
madhu
do you mean silent installation ....of your application..
thanks
madhu
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 17, 2009
06:32 AM
Not silent install. We wanted to give a url, on click of which can download from web and start on the PC.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 18, 2009
03:47 AM
Hi Anitha,
Check The Following Code If it is helpful to you ...
As Per Your requirement the following steps are to be done...
1) First u have to check whether there is internetConection are not..on End User Machine..
For that Following Code will chk Internet Connection availability:
//defining function prototype
prototype Wininet.InternetGetConnectedState(POINTER, NUMBER);
NUMBER nResult,bInternet,dwState;//defining variables required
nResult = UseDLL (WINSYSDIR ^ "Wininet.dll");
if((bInternet = (InternetGetConnectedState(&dwState, 0) = 0)) = TRUE)then
MessageBox("Internet Connection Available",INFORMATION);
else
MessageBox("Internet Connection UnAvailable",INFORMATION);
abort;
endif;
UnUseDLL ("Wininet.dll");
2)You have to check which type of browser the end user is using like ..INTERNETEXPLORER,FIREFOX..etc
I am working on this ..if i get solution i will report to you..
3)Dynamically downloading the url which you are giving during installation fro m the web..
For that u chk following code:
prototype void FILEDOWNLOAD();//defining function prototype
//Implementing function
function void FILEDOWNLOAD()
STRING szInstallPATH;
begin
//here u give the url which i want to download at runtime
//Forexampple i have given www.google.com
szInstallPATH = WINDISK ^ "Program Files\\Internet Explorer\\IEXPLORE.EXE www.google.com";
if (LaunchAppAndWait("",szInstallPATH , LAAW_OPTION_WAIT) < 0) then
MessageBox("Error while downloading", WARNING);
else
MessageBox("Downloaded Successfully",INFORMATION);
endif;
end;
4)Call this function where u required in the installscript...
Here is the complete code...
#include "ifx.h"
//Defining Controls
#define Next 1
#define Cancel 9
#define Back 12
//Definig Function prototype for CustomDialog sdBrowseFolder
prototype Wininet.InternetGetConnectedState(POINTER, NUMBER);
prototype void FILEDOWNLOAD();
function OnFirstUIBefore()
NUMBER nResult, nSetupType, bInternet,dwState;
STRING svPath;
begin
svPath="c:\\Program Files\\Temp1";
nSetupType = TYPICAL;
nResult = UseDLL (WINSYSDIR ^ "Wininet.dll");
if((bInternet = (InternetGetConnectedState(&dwState, 0) = 0)) = TRUE)then
MessageBox("Internet Connection Available",INFORMATION);
else
MessageBox("Internet Connection UnAvailable",INFORMATION);
abort;
endif;
UnUseDLL ("Wininet.dll");
FILEDOWNLOAD();//calling the method
Dlg_SdWelcome:
szTitle = "";
szMsg = "";
nResult = SdWelcome(szTitle, szMsg);
if (nResult = BACK) goto Dlg_SdWelcome;
szTitle = "";
svName = "";
svCompany = "";
end;
function void FILEDOWNLOAD()
STRING szInstallPATH;
begin
szInstallPATH = WINDISK ^ "Program Files\\Internet Explorer\\IEXPLORE.EXE www.google.com";
// szInstallPATH =IEXPLORE.EXE "www.google.com";
//szInstallPATH=SRCDIR ^ "c:\Program Files\Internet Explorer\IEXPLORE.EXE\ WWW.google.com ";
if (LaunchAppAndWait("",szInstallPATH , LAAW_OPTION_WAIT) < 0) then
MessageBox("Error while downloading", WARNING);
else
MessageBox("Downloaded Successfully",INFORMATION);
endif;
end;
if its useful to your application use this code....
Thanks
Madhu.
Check The Following Code If it is helpful to you ...
As Per Your requirement the following steps are to be done...
1) First u have to check whether there is internetConection are not..on End User Machine..
For that Following Code will chk Internet Connection availability:
//defining function prototype
prototype Wininet.InternetGetConnectedState(POINTER, NUMBER);
NUMBER nResult,bInternet,dwState;//defining variables required
nResult = UseDLL (WINSYSDIR ^ "Wininet.dll");
if((bInternet = (InternetGetConnectedState(&dwState, 0) = 0)) = TRUE)then
MessageBox("Internet Connection Available",INFORMATION);
else
MessageBox("Internet Connection UnAvailable",INFORMATION);
abort;
endif;
UnUseDLL ("Wininet.dll");
2)You have to check which type of browser the end user is using like ..INTERNETEXPLORER,FIREFOX..etc
I am working on this ..if i get solution i will report to you..
3)Dynamically downloading the url which you are giving during installation fro m the web..
For that u chk following code:
prototype void FILEDOWNLOAD();//defining function prototype
//Implementing function
function void FILEDOWNLOAD()
STRING szInstallPATH;
begin
//here u give the url which i want to download at runtime
//Forexampple i have given www.google.com
szInstallPATH = WINDISK ^ "Program Files\\Internet Explorer\\IEXPLORE.EXE www.google.com";
if (LaunchAppAndWait("",szInstallPATH , LAAW_OPTION_WAIT) < 0) then
MessageBox("Error while downloading", WARNING);
else
MessageBox("Downloaded Successfully",INFORMATION);
endif;
end;
4)Call this function where u required in the installscript...
Here is the complete code...
#include "ifx.h"
//Defining Controls
#define Next 1
#define Cancel 9
#define Back 12
//Definig Function prototype for CustomDialog sdBrowseFolder
prototype Wininet.InternetGetConnectedState(POINTER, NUMBER);
prototype void FILEDOWNLOAD();
function OnFirstUIBefore()
NUMBER nResult, nSetupType, bInternet,dwState;
STRING svPath;
begin
svPath="c:\\Program Files\\Temp1";
nSetupType = TYPICAL;
nResult = UseDLL (WINSYSDIR ^ "Wininet.dll");
if((bInternet = (InternetGetConnectedState(&dwState, 0) = 0)) = TRUE)then
MessageBox("Internet Connection Available",INFORMATION);
else
MessageBox("Internet Connection UnAvailable",INFORMATION);
abort;
endif;
UnUseDLL ("Wininet.dll");
FILEDOWNLOAD();//calling the method
Dlg_SdWelcome:
szTitle = "";
szMsg = "";
nResult = SdWelcome(szTitle, szMsg);
if (nResult = BACK) goto Dlg_SdWelcome;
szTitle = "";
svName = "";
svCompany = "";
end;
function void FILEDOWNLOAD()
STRING szInstallPATH;
begin
szInstallPATH = WINDISK ^ "Program Files\\Internet Explorer\\IEXPLORE.EXE www.google.com";
// szInstallPATH =IEXPLORE.EXE "www.google.com";
//szInstallPATH=SRCDIR ^ "c:\Program Files\Internet Explorer\IEXPLORE.EXE\ WWW.google.com ";
if (LaunchAppAndWait("",szInstallPATH , LAAW_OPTION_WAIT) < 0) then
MessageBox("Error while downloading", WARNING);
else
MessageBox("Downloaded Successfully",INFORMATION);
endif;
end;
if its useful to your application use this code....
Thanks
Madhu.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 19, 2009
11:11 PM
hi anitha,
Is it heplful the code which i have sent..
thanks
madhu
Is it heplful the code which i have sent..
thanks
madhu
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 21, 2009
01:17 AM
thanks Madhu.
That was usefull..
That was usefull..
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 21, 2009
01:34 AM
hi anitha,
Do You want inforamtion regarding the how to check default Browser in end user System... I got the solution for it.. do you want that solution also..
Thanks
Madhu.
Do You want inforamtion regarding the how to check default Browser in end user System... I got the solution for it.. do you want that solution also..
Thanks
Madhu.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 21, 2009
02:33 AM
Thanks Madhu.
When I access a file using LaunchAppAndWait, I get a file download confirmation dialog, which prompts me to save\open the file.
I dont want that dialog to come up..
My requirement is to copy a file from web to a local folder, and run it from there..all these shouldnt pop up any dialogs 😞
I tried CopyFile, but it fails to copy from web....
When I access a file using LaunchAppAndWait, I get a file download confirmation dialog, which prompts me to save\open the file.
I dont want that dialog to come up..
My requirement is to copy a file from web to a local folder, and run it from there..all these shouldnt pop up any dialogs 😞
I tried CopyFile, but it fails to copy from web....
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 21, 2009
02:35 AM
Hi Madhu,
Please post default browser checking code 🙂
Please post default browser checking code 🙂
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 21, 2009
02:44 AM
Hi,
you are saying that u want to copy file from web,can u please specify the website name and type of file which u want to download...
thanks
madhu
you are saying that u want to copy file from web,can u please specify the website name and type of file which u want to download...
thanks
madhu
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 21, 2009
03:12 AM
Thanks for your response.
We wanted to download certain installables from our company website itself.
File type would be .exe/.msi
It should either start installing from the web, or copy it to a local folder and install later.
But we dont need the File Download Security Warning message popping up...
We wanted to download certain installables from our company website itself.
File type would be .exe/.msi
It should either start installing from the web, or copy it to a local folder and install later.
But we dont need the File Download Security Warning message popping up...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 21, 2009
03:58 AM
hi,
This is the code for checking defaultbrowser on end user system.....
#include "ifx.h"
prototype INT getExtCmdLine( STRING , BYREF STRING );
STRING svExtensiom,svCommandLine,szCommand,szcmdLine;
function OnFirstUIBefore()
NUMBER nResult, nSetupType, nvSize, nUser;
STRING szTitle, szMsg, szQuestion, svName, svCompany, szFile;
STRING szLicenseFile;
BOOL bCustom, bIgnore1, bIgnore2;
begin
nSetupType = TYPICAL;
Dlg_SdWelcome:
szTitle = "";
szMsg = "";
nResult = SdWelcome(szTitle, szMsg);
if (nResult = BACK) goto Dlg_SdWelcome;
szTitle = "";
svName = "";
svCompany = "";
end;
program
//getExtCmdLine(".txt",svCommandLine);
getExtCmdLine(".html",svCommandLine);
//getExtCmdLine(".docx",svCommandLine);
//getExtCmdLine(".msi",svCommandLine);
//LaunchApp ( svCommandLine , "" );
LaunchApp(svCommandLine,"");
endprogram
function int getExtCmdLine(svFileExtension,svCmd)
NUMBER nvDummy,nvPos;
STRING svFileType,svCmdKey;
begin
RegDBSetDefaultRoot(HKEY_CLASSES_ROOT);
//chk to see the file extension
if(RegDBKeyExist(svFileExtension)=1) then
//retrieve the default value
RegDBGetKeyValueEx(svFileExtension,"",nvDummy,svFileType,nvDummy);
MessageBox(svFileType,INFORMATION);
//chk for default commandline
svCmdKey= svFileType + "\\shell\\open\\command";
if(RegDBKeyExist(svCmdKey) =1) then
RegDBGetKeyValueEx(svCmdKey,"",nvDummy,svCmd,nvDummy);
MessageBox(svCmd,INFORMATION);
nvPos = StrFind(svCmd,"%");
//nvPos = StrFindEx(svCmd,"%",nvDummy);
if ( nvPos > 0 ) then
svCmd[nvPos] = NULL;
MessageBox (svCmd,INFORMATION);
elseif( nvPos < 0 ) then
MessageBox ( svFileType + " does not have an applicationassociated with it." , WARNING );
//svCmd = "";
else
MessageBox ( svFileExtension + " file extension is not registered.", WARNING );
endif;
//return svCmd;
endif;
endif;
end;
This is the code for checking defaultbrowser on end user system.....
#include "ifx.h"
prototype INT getExtCmdLine( STRING , BYREF STRING );
STRING svExtensiom,svCommandLine,szCommand,szcmdLine;
function OnFirstUIBefore()
NUMBER nResult, nSetupType, nvSize, nUser;
STRING szTitle, szMsg, szQuestion, svName, svCompany, szFile;
STRING szLicenseFile;
BOOL bCustom, bIgnore1, bIgnore2;
begin
nSetupType = TYPICAL;
Dlg_SdWelcome:
szTitle = "";
szMsg = "";
nResult = SdWelcome(szTitle, szMsg);
if (nResult = BACK) goto Dlg_SdWelcome;
szTitle = "";
svName = "";
svCompany = "";
end;
program
//getExtCmdLine(".txt",svCommandLine);
getExtCmdLine(".html",svCommandLine);
//getExtCmdLine(".docx",svCommandLine);
//getExtCmdLine(".msi",svCommandLine);
//LaunchApp ( svCommandLine , "" );
LaunchApp(svCommandLine,"");
endprogram
function int getExtCmdLine(svFileExtension,svCmd)
NUMBER nvDummy,nvPos;
STRING svFileType,svCmdKey;
begin
RegDBSetDefaultRoot(HKEY_CLASSES_ROOT);
//chk to see the file extension
if(RegDBKeyExist(svFileExtension)=1) then
//retrieve the default value
RegDBGetKeyValueEx(svFileExtension,"",nvDummy,svFileType,nvDummy);
MessageBox(svFileType,INFORMATION);
//chk for default commandline
svCmdKey= svFileType + "\\shell\\open\\command";
if(RegDBKeyExist(svCmdKey) =1) then
RegDBGetKeyValueEx(svCmdKey,"",nvDummy,svCmd,nvDummy);
MessageBox(svCmd,INFORMATION);
nvPos = StrFind(svCmd,"%");
//nvPos = StrFindEx(svCmd,"%",nvDummy);
if ( nvPos > 0 ) then
svCmd[nvPos] = NULL;
MessageBox (svCmd,INFORMATION);
elseif( nvPos < 0 ) then
MessageBox ( svFileType + " does not have an applicationassociated with it." , WARNING );
//svCmd = "";
else
MessageBox ( svFileExtension + " file extension is not registered.", WARNING );
endif;
//return svCmd;
endif;
endif;
end;
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 21, 2009
04:43 AM
We wanted to download certain installables from our company website itself.
File type would be .exe/.msi
It should either start installing from the web, or copy it to a local folder and install later.
But we dont need the File Download Security Warning message popping up...
File type would be .exe/.msi
It should either start installing from the web, or copy it to a local folder and install later.
But we dont need the File Download Security Warning message popping up...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 21, 2009
04:51 AM
Hi,
you said that you want to copy that downloaded file to local folder then we can do it easily.
1)In my code i have given www.google.com as an example.In that place u give your company website.
2)Next step then your able to visit that site.
3)while downloading it will ask save option then u save that file to local file which you want..
have you understand the code which i send regarding the chking the default browser....
you said that you want to copy that downloaded file to local folder then we can do it easily.
1)In my code i have given www.google.com as an example.In that place u give your company website.
2)Next step then your able to visit that site.
3)while downloading it will ask save option then u save that file to local file which you want..
have you understand the code which i send regarding the chking the default browser....
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 21, 2009
04:54 AM
I dont want that dialog box to be displayed for saving the file. I want to do that without any user intervention.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 21, 2009
05:09 AM
hi,
In general if you want to download any file or any image it will ask save option .We can not supress that dialogbox ...
could you please say me in clear way so that i can work on it..
here u r saying that u want to store it in to the local folder....then how can you save downloaded file directly to that folder without user interaction...
thanks
madhu
In general if you want to download any file or any image it will ask save option .We can not supress that dialogbox ...
could you please say me in clear way so that i can work on it..
here u r saying that u want to store it in to the local folder....then how can you save downloaded file directly to that folder without user interaction...
thanks
madhu
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 21, 2009
05:19 AM
Our installer has to install other software which are available on net.
For this I should either copy the installable from net to local PC and run it, or directly run it from web..
In either way, I need to do that without user intervention.
I had read in some forum that XCopyFile can do the copy for me, but it failed to do so..
Now I am checking for an alternate way of doing it.
For this I should either copy the installable from net to local PC and run it, or directly run it from web..
In either way, I need to do that without user intervention.
I had read in some forum that XCopyFile can do the copy for me, but it failed to do so..
Now I am checking for an alternate way of doing it.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 21, 2009
05:48 AM
XCopyFile works, but it takes lot of time to copy file to local disk!!!
Any idea towards this is welcome..
Any idea towards this is welcome..
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 21, 2009
06:12 AM
hi
yes i too have seen that through xcopy we can get it ..k i got another solution i am working on it ..if i get solution i will report you ..
thanks
madhu
yes i too have seen that through xcopy we can get it ..k i got another solution i am working on it ..if i get solution i will report you ..
thanks
madhu
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 22, 2009
03:52 AM
hi anitha,
did u get the solution for it.. using xcopy..
thanks
madhu
did u get the solution for it.. using xcopy..
thanks
madhu
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 22, 2009
03:55 AM
using XCopy, it does work, but it's too slow:(
for 2MB, its more than a min! Tried installing directly from web, without copying to local disk..no luck!! that too s very slow.
We can't afford to use any of these, as our applications are around 60MB each.
Got to try some other options now..
Thanks for your help, Madhu.
Rgds,
Anitha
for 2MB, its more than a min! Tried installing directly from web, without copying to local disk..no luck!! that too s very slow.
We can't afford to use any of these, as our applications are around 60MB each.
Got to try some other options now..
Thanks for your help, Madhu.
Rgds,
Anitha