hxtking
Posts: 2
Joined: Wed May 31, 2006 10:07 pm

mapped drive

Hi,

I have built an installer to install a window service. In the custom action (InstallServices), an gen.exe is executed to generate a mapping between drive letter to UNC (eg. X:\ goto \\hosta\abc). The service must have the mapping information before starting (because mapped drive is not visible in WIN services)

1. The gen.exe works fine on the cmd shell in XP and Server 2003
2. The installer works fine on the XP (i.e. the mapping file is generated with the correcty mapped drive), when installing on XP.

However, the installer does not work on WIN 2003. The gen.exe does not see the mapped drive. Under which context (or env) the gen.exe is executed by the installer? Any suggestion on how to solve this?

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

Hi,

I don't really know if gen.exe cause the problem on win 2003. However i suggest you to use directly "net" command from windows. Here how you can use it in Advanced Installer:

Switch to "Custom Action" page and add "Exe With Working Dir" custom action under the "InstallServices". Use following options for the custom action:
1. Full Path: net use z: \\computername\sharename
2. Execution Properties: Synchronous execution, check return code
3. Execution Options: Deferred
4. Scheduling Options: Always Execution
5. Execution Condition: Not Installed

Also you can use another custom action to delete this mapped drive on uninstall. Use same type of CA like above but with Full Path set to: net use z: /delete and with Execution Condition: REMOVE="ALL". Schedule this under the "Uninstall" or "InstallFinalize" standard action.

Please let me know if this not solves the problem.

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

Return to “Common Problems”