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
- :
- Error 1722 when non-admin user running installation as Administrator
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
‎Dec 19, 2013
09:35 AM
Error 1722 when non-admin user running installation as Administrator
My installation project has custom action (let's call it StartMyServiceCA) where I'm trying to start MyService during installation process
You cannot start MyService if you are not an admin, so I set 'Required execution level' to Administrator in setup.exe properties and 'Require Administrative Privileges' to Yes in General Information view.
It works as expected if I run setup.exe as user who is an admin. It copies some exe and dlls to destination folder and then starts MyService.
Problem appears when user who is not an admin is running setup.exe. When he clicks on setup.exe then Windows dialog appears first with '‘Do you want to allow the following program to made changes to this computer’ message and 2 textboxes below (login and password). This is an expected Windows7 behavior in this case, isn't it? Installation will continue only if he types there credentials of user who is administrator on this box but will fail on StartMyServiceCA custom action with 1722 error. I cannot understand why I'm getting this error, can someone help me or provide solution to fix it? Does it make sense to write another custom action that will run first and stop installation process if user is not admin?
cmd.exe /c net start "MyService"
You cannot start MyService if you are not an admin, so I set 'Required execution level' to Administrator in setup.exe properties and 'Require Administrative Privileges' to Yes in General Information view.
It works as expected if I run setup.exe as user who is an admin. It copies some exe and dlls to destination folder and then starts MyService.
Problem appears when user who is not an admin is running setup.exe. When he clicks on setup.exe then Windows dialog appears first with '‘Do you want to allow the following program to made changes to this computer’ message and 2 textboxes below (login and password). This is an expected Windows7 behavior in this case, isn't it? Installation will continue only if he types there credentials of user who is administrator on this box but will fail on StartMyServiceCA custom action with 1722 error. I cannot understand why I'm getting this error, can someone help me or provide solution to fix it? Does it make sense to write another custom action that will run first and stop installation process if user is not admin?
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 20, 2013
05:22 PM
Why do you want to use a custom action to start a service? Microsoft Windows Installer provides a way to control service (ServiceControl Table).
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 21, 2013
02:21 AM
Hello TsungH,
Your thread is not a answer to solve this problem. The issue is to start setup as other user with elev.priv.iliges.
Your thread is not a answer to solve this problem. The issue is to start setup as other user with elev.priv.iliges.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 23, 2013
05:25 PM
Roman1, using custom action to do what Windows Installer natively supports, in this case, to start a Windows service, is a bad approach. Finding a workaround to a bad approach is asking for more troubles in the future.