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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 08, 2013
08:06 AM
Can anybody help me to work this issue
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 09, 2013
05:07 PM
I think you should check the user running the installer, and abort the installation if the user's not an administrator!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 02, 2013
09:27 AM
On what platform do you need that?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 05, 2013
04:30 AM
pv7721 wrote:
On what platform do you need that?
windows 2008 r2
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎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]
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)