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
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Re: Installer does not give error when it is not able to create services
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Jul 01, 2013
05:55 AM
Installer does not give error when it is not able to create services
Hi All,
If an user run the installer without administrator permissions, the installer is going to create all folder but it's not going to be able to create the services. The installation is completed successfully when it should be give an error.
Regards,
Sreekanth
If an user run the installer without administrator permissions, the installer is going to create all folder but it's not going to be able to create the services. The installation is completed successfully when it should be give an error.
Regards,
Sreekanth
(6) Replies
‎Jul 10, 2013
01:43 AM
pv7721 wrote:
I think you should check the user running the installer, and abort the installation if the user's not an administrator!
Thank you for Reply then how to give proper warning message if user doesn't have admin privileges.
without proper warning message the installer is going to create all folder but it's not going to be able to create the services. The installation is completed successfully when it should be give an error.
‎Aug 27, 2013
03:23 PM
I would say something like that...
[CODE]package ;
import com.zerog.ia.api.pub.*;
import com.installshield.wizard.service.security.*;
import com.installshield.wizard.service.ServiceException;
public class CheckIfUserHasAdministrativeRights extends CustomCodeAction {
public void install( InstallerProxy installerProxy ) throws InstallException {
SecurityService ss = (SecurityService) installerProxy.getService(SecurityService.class);
try
{
if (ss.isCurrentUserAdmin())
{//The user installing the designer has administrative rights
installerProxy.setVariable( "USER_HAS_ADMINISTRATIVE_RIGHTS", "true" );
}
else
{
installerProxy.setVariable( "USER_HAS_ADMINISTRATIVE_RIGHTS", "false" );
}
} catch (ServiceException e) {//Do nothing...
}
return;
}
public void uninstall( UninstallerProxy uninstallerProxy ) throws InstallException {
}
public String getInstallStatusMessage() {
return null;
}
public String getUninstallStatusMessage() {
return null;
}
public static void main( String[] strings ) {
}
}
[/CODE]
[CODE]package ;
import com.zerog.ia.api.pub.*;
import com.installshield.wizard.service.security.*;
import com.installshield.wizard.service.ServiceException;
public class CheckIfUserHasAdministrativeRights extends CustomCodeAction {
public void install( InstallerProxy installerProxy ) throws InstallException {
SecurityService ss = (SecurityService) installerProxy.getService(SecurityService.class);
try
{
if (ss.isCurrentUserAdmin())
{//The user installing the designer has administrative rights
installerProxy.setVariable( "USER_HAS_ADMINISTRATIVE_RIGHTS", "true" );
}
else
{
installerProxy.setVariable( "USER_HAS_ADMINISTRATIVE_RIGHTS", "false" );
}
} catch (ServiceException e) {//Do nothing...
}
return;
}
public void uninstall( UninstallerProxy uninstallerProxy ) throws InstallException {
}
public String getInstallStatusMessage() {
return null;
}
public String getUninstallStatusMessage() {
return null;
}
public static void main( String[] strings ) {
}
}
[/CODE]