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
- :
- Re: Cannot run executable (even notepad) - Error 1721
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
‎Feb 15, 2011
11:31 AM
Cannot run executable (even notepad) - Error 1721
I need to Add a Printer during my Basic MSI installation and will need to call the standard Windows VBScript, prnmngr.vbs by running cscript.exe.
I am trying to use the standard action to run an executable, but I'm always receiving Error 1721. (Running on Vista SP1 with UAC disabled).
I'm placing the CA to run in the Execute sequence between InstallInitialize and InstallFinalize.
I know to run cscript to add a printer, I will need to schedule it Deferred with System Rights.
But I can't even create a simple CA to run c:\windows\notepad.exe no matter how I schedule it...
MSI (s) (F4:64) [10:06:42:916]: Note: 1: 1721 2: LaunchNotepad 3: 4: c:\windows\notepad.exe
Is it even possible to launch an executable from an msi using Windows Installer 4.5 on Vista or Windows 7?
Would I have more success writing an Installscript CA that calls LaunchAppAndWait?
I am trying to use the standard action to run an executable, but I'm always receiving Error 1721. (Running on Vista SP1 with UAC disabled).
I'm placing the CA to run in the Execute sequence between InstallInitialize and InstallFinalize.
I know to run cscript to add a printer, I will need to schedule it Deferred with System Rights.
But I can't even create a simple CA to run c:\windows\notepad.exe no matter how I schedule it...
MSI (s) (F4:64) [10:06:42:916]: Note: 1: 1721 2: LaunchNotepad 3: 4: c:\windows\notepad.exe
Is it even possible to launch an executable from an msi using Windows Installer 4.5 on Vista or Windows 7?
Would I have more success writing an Installscript CA that calls LaunchAppAndWait?
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 15, 2011
06:38 PM
Yes, custom actions to launch executables are certainly supported in that environment. For the basic sanity check, is notepad.exe definitely in that location? In Windows Server 2008, for example, Notepad is in the system folder and not the Windows folder...
Does it work if you launch an executable you're installing (assuming the action is in deferred mode and not immediate mode)?
Does it work if you launch an executable you're installing (assuming the action is in deferred mode and not immediate mode)?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 15, 2011
08:03 PM
Thanks for replying to my post.
Yes, I cut and pasted directly from the "Filename & Commandline" edit box in Installshield to my File - Run dialog.
c:\windows\notepad.exe runs fine then.
But there must be something I'm doing wrong...
Or Vista security is extremely strict for installers.
By the way, I'm using Windows Installer 4.5 and my Setup release is configured to require Administrator privilege.
Yes, I cut and pasted directly from the "Filename & Commandline" edit box in Installshield to my File - Run dialog.
c:\windows\notepad.exe runs fine then.
But there must be something I'm doing wrong...
Or Vista security is extremely strict for installers.
By the way, I'm using Windows Installer 4.5 and my Setup release is configured to require Administrator privilege.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 16, 2011
12:23 AM
I was finally able to get notepad to run by scheduling the CA as Deferred rather than Immediate.
But it looks like the actual solution was to change the default for Working Directory to something.
(Installshield's default was blank.)
I didn't need the command (e.g. notepad) to run in any particular folder, but I set the Working Directory to 'INSTALLDIR' anyway and this removed the Error 1721 and the command now runs successfully.
Even better, my cscript call to prnmngr.vbs to add a printer works also.
This took me several days of trial and error to resolve.
I hope this post is helpful to someone else trying to use a CA to run a program.
But it looks like the actual solution was to change the default for Working Directory to something.
(Installshield's default was blank.)
I didn't need the command (e.g. notepad) to run in any particular folder, but I set the Working Directory to 'INSTALLDIR' anyway and this removed the Error 1721 and the command now runs successfully.
Even better, my cscript call to prnmngr.vbs to add a printer works also.
This took me several days of trial and error to resolve.
I hope this post is helpful to someone else trying to use a CA to run a program.
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)