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
- :
- Checking a pre installed software on a users PC
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 18, 2009
02:27 AM
Checking a pre installed software on a users PC
Hi
I need to check the presense of a program X on a user system, and if found I need to place an Icon on the users Desktop.
I don't need to give the user a message, just need to put an Icon ( which is a link to another web installer ) on users desktop..
Is this possible with installshield?
Any help would be highly appreciated.
Thanks
Preeti
I need to check the presense of a program X on a user system, and if found I need to place an Icon on the users Desktop.
I don't need to give the user a message, just need to put an Icon ( which is a link to another web installer ) on users desktop..
Is this possible with installshield?
Any help would be highly appreciated.
Thanks
Preeti
(10) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 18, 2009
08:41 AM
What kind of project are you using?
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 18, 2009
10:01 AM
Hi
thanks for replying..
I have not decided yet, I can use any type of project which can fulfill this requirement.
(NOTE : I also have one more requirement with installshield : http://community.acresso.com/showthread.php?t=188052 )
Thanks
thanks for replying..
I have not decided yet, I can use any type of project which can fulfill this requirement.
(NOTE : I also have one more requirement with installshield : http://community.acresso.com/showthread.php?t=188052 )
Thanks
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 18, 2009
10:07 AM
Hi
Thanks for replying.
I have not decided yet about the project type. I can use any type depending on the condition that my requirements are fulfilled.
NOTE : I also have another task to do with the same requirement : http://community.acresso.com/showthread.php?t=188052 for which I also need some directions
Thanks for replying.
I have not decided yet about the project type. I can use any type depending on the condition that my requirements are fulfilled.
NOTE : I also have another task to do with the same requirement : http://community.acresso.com/showthread.php?t=188052 for which I also need some directions
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 19, 2009
08:31 AM
You can do what you're asking about with either an MSI project or an InstallScript project. I asked because the method would be different in each.
With an MSI, you can use the System Search view to locate the software and fill in a property if it's found, then put your icon in a component and condition the component on the presence of the property.
With InstallScript, you do a search for the software then add the icon in an IF statement after the search. (You could do a registry search or a file system search depending on how you want to detect the software.)
With an MSI, you can use the System Search view to locate the software and fill in a property if it's found, then put your icon in a component and condition the component on the presence of the property.
With InstallScript, you do a search for the software then add the icon in an IF statement after the search. (You could do a registry search or a file system search depending on how you want to detect the software.)
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 20, 2009
02:49 PM
Hello kathy,
Thanks a lot for your reply.
I got confused in both the things.. ( Sorry I am new so could not understand it fully )
Here is what I did as instructed by you :
1) [ With an MSI, you can use the System Search view to locate the software and fill in a property if it's found, then put your icon in a component and condition the component on the presence of the property. ]
In this step I was able to define a system search and was able to locate the software, I have also the icon in a component, but could not get what you mean by condition the component...
In system search I created a property named 001 but that property does not come up in component condition ellipse click??
2) [ With InstallScript, you do a search for the software then add the icon in an IF statement after the search. (You could do a registry search or a file system search depending on how you want to detect the software.) ]
I also tried this, I was able to do a system search with the help of FindAllFiles function. but I am unable to find a function which puts an icon or any file at users desktop
Also if there is a function.. then where it will pick that icon from, it should be inside a component.. what is the function for this functionality..?
Sorry .. too many questions, but I need to accomplish this task very soon 😞
Thanks a lot for your support
Preeti
Thanks a lot for your reply.
I got confused in both the things.. ( Sorry I am new so could not understand it fully )
Here is what I did as instructed by you :
1) [ With an MSI, you can use the System Search view to locate the software and fill in a property if it's found, then put your icon in a component and condition the component on the presence of the property. ]
In this step I was able to define a system search and was able to locate the software, I have also the icon in a component, but could not get what you mean by condition the component...
In system search I created a property named 001 but that property does not come up in component condition ellipse click??
2) [ With InstallScript, you do a search for the software then add the icon in an IF statement after the search. (You could do a registry search or a file system search depending on how you want to detect the software.) ]
I also tried this, I was able to do a system search with the help of FindAllFiles function. but I am unable to find a function which puts an icon or any file at users desktop
Also if there is a function.. then where it will pick that icon from, it should be inside a component.. what is the function for this functionality..?
Sorry .. too many questions, but I need to accomplish this task very soon 😞
Thanks a lot for your support
Preeti
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 21, 2009
04:46 AM
Hi
I think I should write the task in hand more clearly...
Here is a step by step requirements of my installer
1) On start of installation copy file xx somewhere in the target system ( may be systems or temp folder )
2) Search for a particular file yy in the whole file system of the target system
3) If yy is found then place a shortcut icon on the desktop of target system pointing to the file xx, so that a user can click on the icon and launch xx
Note : Actually i need to check approx 50 different yy Files and as soon as I get one I need to do the task 3 and finish the installation, if all 50 are not found the installer will finish without placing the icon
I am thinking of using Installscript MSI project, I have also written a function which does the task partially and can give a message if yy is found.,. but I dont know how to do task (3) in this IF else block
=====================================================
#define SEARCH_DIR "C:\\"
#define FILE_SPEC "badboy.exe"
// Included header files ----------------------------------------------------
#include "ifx.h"
function OnAppSearch( )
STRING svFoundFile;
begin
if (FindAllFiles(SEARCH_DIR, FILE_SPEC, svFoundFile, RESET) < 0) then
MessageBox("NOT Found badboy2.exe", INFORMATION);
else
MessageBox("Found badboy.exe ", INFORMATION); endif;
end;
=====================================================
If i can somehow do the task (3) in the above functions if block I will use this function 50 times for all files and can accomplish the task in hand.
Any help is highly appreciated
Thanks in advance
Preeti
I think I should write the task in hand more clearly...
Here is a step by step requirements of my installer
1) On start of installation copy file xx somewhere in the target system ( may be systems or temp folder )
2) Search for a particular file yy in the whole file system of the target system
3) If yy is found then place a shortcut icon on the desktop of target system pointing to the file xx, so that a user can click on the icon and launch xx
Note : Actually i need to check approx 50 different yy Files and as soon as I get one I need to do the task 3 and finish the installation, if all 50 are not found the installer will finish without placing the icon
I am thinking of using Installscript MSI project, I have also written a function which does the task partially and can give a message if yy is found.,. but I dont know how to do task (3) in this IF else block
=====================================================
#define SEARCH_DIR "C:\\"
#define FILE_SPEC "badboy.exe"
// Included header files ----------------------------------------------------
#include "ifx.h"
function OnAppSearch( )
STRING svFoundFile;
begin
if (FindAllFiles(SEARCH_DIR, FILE_SPEC, svFoundFile, RESET) < 0) then
MessageBox("NOT Found badboy2.exe", INFORMATION);
else
MessageBox("Found badboy.exe ", INFORMATION); endif;
end;
=====================================================
If i can somehow do the task (3) in the above functions if block I will use this function 50 times for all files and can accomplish the task in hand.
Any help is highly appreciated
Thanks in advance
Preeti
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 21, 2009
05:08 AM
Preeti,
Use wildcards for searching 50 files if you have something in common among those filesnames..
Use AddFolderIcon() for creating desktop shortcut, based on your search.
anitha
Use wildcards for searching 50 files if you have something in common among those filesnames..
Use AddFolderIcon() for creating desktop shortcut, based on your search.
anitha
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 21, 2009
05:18 AM
Hello Anitha
Thanks a lot for your reply.
Unfortunately all 50 files are of different types and can also be on different locations... Si I think I have to run the search code 50 Times ... Its not very efficient and can slow the installer very much but I cannot think of any other option... its a strange project requirement 😞
Preeti
Thanks a lot for your reply.
Unfortunately all 50 files are of different types and can also be on different locations... Si I think I have to run the search code 50 Times ... Its not very efficient and can slow the installer very much but I cannot think of any other option... its a strange project requirement 😞
Preeti
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 21, 2009
05:21 AM
Hi
I have gone through the AddFolderIcon function,
It seems it requires the fully qualified path of the files and icon to be placed on desktop... However in my case I don't know the path, the installer will place the file in temp folder or something and then should pick it from there..
How can I know the fully qualified path and how can I ensure that the file is already copied there before the search starts?
Thanks
Preeti
I have gone through the AddFolderIcon function,
It seems it requires the fully qualified path of the files and icon to be placed on desktop... However in my case I don't know the path, the installer will place the file in temp folder or something and then should pick it from there..
How can I know the fully qualified path and how can I ensure that the file is already copied there before the search starts?
Thanks
Preeti
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 27, 2009
02:11 PM
Hi
After lot of research and getting help from all of your valuable inputs I managed to solve this finally...
Here is my script to search for a file ( in fact multiple files ) with a for loop and then based on the result copying an icon on the target system..
====================================================
#define SEARCH_DIR "C:\\"
#define ENV_TEMP "TEMP"
export prototype MainFiles_Installed();
function MainFiles_Installed()
// Find files routine starts
// variables
STRING FilesToSearch(3); // total 3 file names to be searched
STRING svFoundFile;
STRING svEnvVar;
STRING szProgramFolder, szItemName, szCommandLine, szWorkingDir;
STRING szShortCutKey, szProgram, szParam, szIconPath;
NUMBER nIcon;
NUMBER i;
// function begin
begin
// get temp folder path in svEnvVar to get the temp path
// this is the path where the icon and the associated file will be copied
GetEnvVar (ENV_TEMP, svEnvVar);
// array values
FilesToSearch (0) = "fille1.exe";
FilesToSearch (1) = "file2.exe" ;
FilesToSearch (2) = "file3.exe" ;
// Set up parameters for call to AddFolderIcon.
szProgramFolder = FOLDER_DESKTOP;
szItemName = "test";
szProgram = svEnvVar + "\\test.exe";
szParam = svEnvVar + "\\test.ico";
LongPathToQuote (szProgram, TRUE);
LongPathToShortPath (szParam);
szCommandLine = svEnvVar + "\\test.exe";
szWorkingDir = "";
szIconPath = svEnvVar + "\\test.ico";
nIcon = 0;
szShortCutKey = "";
MessageBox ( "Searching for Installed files" , INFORMATION );
for i = 0 to SizeOf(FilesToSearch) -1
//MessageBox ( svEnvVar , INFORMATION );
if (FindAllFiles(SEARCH_DIR, FilesToSearch(i), svFoundFile, RESET) < 0) then
//MessageBox("NOT Found " + FilesToSearch(i) , INFORMATION);
else
//MessageBox("Found " + FilesToSearch(i), INFORMATION);
if (AddFolderIcon (szProgramFolder, szItemName, szCommandLine, szWorkingDir,
szIconPath, nIcon, szShortCutKey, REPLACE) < 0) then
//MessageBox ("AddFolderIcon failed.", SEVERE);
else
endif;
exit;
endif;
endif;
endfor;
end;
============================================
However there is still one problem, FindAllfiles function requires a fully qualified path of the directory or folder under which it will perform the search. But I need to search in all directories ( may be user does not have a C: directory at all ). I am still clueless on how to do that.
Any Ideas?
Thanks
After lot of research and getting help from all of your valuable inputs I managed to solve this finally...
Here is my script to search for a file ( in fact multiple files ) with a for loop and then based on the result copying an icon on the target system..
====================================================
#define SEARCH_DIR "C:\\"
#define ENV_TEMP "TEMP"
export prototype MainFiles_Installed();
function MainFiles_Installed()
// Find files routine starts
// variables
STRING FilesToSearch(3); // total 3 file names to be searched
STRING svFoundFile;
STRING svEnvVar;
STRING szProgramFolder, szItemName, szCommandLine, szWorkingDir;
STRING szShortCutKey, szProgram, szParam, szIconPath;
NUMBER nIcon;
NUMBER i;
// function begin
begin
// get temp folder path in svEnvVar to get the temp path
// this is the path where the icon and the associated file will be copied
GetEnvVar (ENV_TEMP, svEnvVar);
// array values
FilesToSearch (0) = "fille1.exe";
FilesToSearch (1) = "file2.exe" ;
FilesToSearch (2) = "file3.exe" ;
// Set up parameters for call to AddFolderIcon.
szProgramFolder = FOLDER_DESKTOP;
szItemName = "test";
szProgram = svEnvVar + "\\test.exe";
szParam = svEnvVar + "\\test.ico";
LongPathToQuote (szProgram, TRUE);
LongPathToShortPath (szParam);
szCommandLine = svEnvVar + "\\test.exe";
szWorkingDir = "";
szIconPath = svEnvVar + "\\test.ico";
nIcon = 0;
szShortCutKey = "";
MessageBox ( "Searching for Installed files" , INFORMATION );
for i = 0 to SizeOf(FilesToSearch) -1
//MessageBox ( svEnvVar , INFORMATION );
if (FindAllFiles(SEARCH_DIR, FilesToSearch(i), svFoundFile, RESET) < 0) then
//MessageBox("NOT Found " + FilesToSearch(i) , INFORMATION);
else
//MessageBox("Found " + FilesToSearch(i), INFORMATION);
if (AddFolderIcon (szProgramFolder, szItemName, szCommandLine, szWorkingDir,
szIconPath, nIcon, szShortCutKey, REPLACE) < 0) then
//MessageBox ("AddFolderIcon failed.", SEVERE);
else
endif;
exit;
endif;
endif;
endfor;
end;
============================================
However there is still one problem, FindAllfiles function requires a fully qualified path of the directory or folder under which it will perform the search. But I need to search in all directories ( may be user does not have a C: directory at all ). I am still clueless on how to do that.
Any Ideas?
Thanks