We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

rex
Posts: 9
Joined: Wed Nov 29, 2006 10:18 pm

launch condition: broken path for system commands

Hi Gigi,

My installation package needs NET.exe command to start/stop windows service. For some reasons, I found many machines in my company have broken path for system commands like NET.

Is there an existing mechanism in AI to determine whether a command is available?

I am using Search for now. But I do not like the solution. First of all, I do not know whether the NET.exe found is the correct one or the one intended to use. And I think the installer should stops and let user to fix Path problem.

Thanks,
Rex
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Rex,

You can start/stop an existing windows service by using a "Control Operation" in the "Services" page (Recommended). For more details please see:
http://www.advancedinstaller.com/user-g ... vices.html

However if you want to use net.exe tool to start/stop the service you can create a search (to find the net.exe, usually resides in the system32 folder) and a launch condition. You can use this condition for the launch condition: SEARCH_RESULT (the property of the search). If this property is non empty the installation will continue otherwise the description message will be displayed.

Hope this helps.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
rex
Posts: 9
Joined: Wed Nov 29, 2006 10:18 pm

Gigi, thanks for your reply.

Actually I am already using the work around of SEARCH_RESULT mentioned in your reply. But I am not happy with it.

Sometimes net.exe file is there but the Path does not include it. Of course I can use a full path to run it. But it is not the point. The point is that AI should provide a mechanism to let use determine whether standard external DOS-mode commands are available. NET is just one of them.

If AI does not have it, I would think it is worth to add as a new feature. It is just like to run Custom Actions in Search phase and the result can be used for launch condition.

What do you think?

Regards,
Rex
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

You can run DOS-mode commands using custom actions. Please see this for a similar approach:
http://www.advancedinstaller.com/forums ... ht=net+exe

But the simplest way to start/stop a service is to use "Control Operation" in the "Services" page. For more details please see:
http://www.advancedinstaller.com/user-g ... vices.html

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”