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
- :
- How to re create application name folder
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Jan 06, 2010
04:23 AM
How to re create application name folder
Very recently our Quality Assurance folks found an issue in our application setup, While they was installing it to the some other drive.
E.g. They have installed in to,
Ultimately the application is installed and while the user trying to uninstall, they loss all the data what they has previously was in the selected drive.
E.g. They have installed in to D:\ and application installed as following;
Is there any solution to come over from this problem (the NSIS and INNO Setup compiler has a feature when the user is selecting a location what is not default, it creates a folder with the name of the application )?
E.g. They have installed in to,
D:\ and application installed as following;
D:\application.exe
D:\Application.dll
D:\Application1.dll
D:\Application2.dll
D:\Application3.dll
Ultimately the application is installed and while the user trying to uninstall, they loss all the data what they has previously was in the selected drive.
E.g. They have installed in to D:\ and application installed as following;
D:\application.exe
D:\Application.dll
D:\Application1.dll
D:\Application2.dll
D:\Application3.dll
D:\My Data
D:\My Documents
Is there any solution to come over from this problem (the NSIS and INNO Setup compiler has a feature when the user is selecting a location what is not default, it creates a folder with the name of the application )?
(4) Replies
‎Jan 07, 2010
09:09 AM
Let me make sure i'm understanding the problem correctly. If a user selects the drive root as an installation directory, then on uninstall, setup deletes the installation directory (D:\) and everything in it. You can author logic to prevent D:\ from becoming the target directory. In your InstallScript view, override the OnFirstUIBefore event. Where you see this code:
You can then test the INSTALLDIR variable to see if the length is greater than 3, and if not, add the following code:
If I identified the problem, then this solution should work.
Dlg_SdAskDestPath:
nResult = SdAskDestPath(szTitle, szMsg, INSTALLDIR, 0);
if (nResult = BACK) goto Dlg_SetupType;
You can then test the INSTALLDIR variable to see if the length is greater than 3, and if not, add the following code:
if( StrLength(INSTALLDIR) <= 3 )then
INSTALLDIR = INSTALLDIR ^ "MyProductName";
endif;
If I identified the problem, then this solution should work.