cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
iellis
Level 2

Referencing a Custom action vbscript file stored in source control?

I'm trying to reference a vbscript from our source control but am running into issues. The setup is as follows:

Windows 7
Visual Studio 2012 with InstallShield 2012 LE
Project/Solutions are store in source control using TFS, so that any of our developers can open the projects and make changes as necessary

In TFS, there is a file located at $/Source/SpecificProject/DeploymentFiles/File.vbs. The dollar sign ($) gets replaced on local machines depending on where they place their source files locally.

On my local machine, that path is considered to be C:/Source/SpecificProject//DeploymentFiles/File.vbs

On another machine, that path could be something different, for example: C:/user/userName/Desktop/Source/SpecificProject//DeploymentFiles/File.vbs

The Custom Action runs at the "Before File Transfer" part of the installation and has no conditions (it should always run).




Everything works until I try and open the project on another machine. The problem is that the custom action script can't be found. The reason is that the File name for the custom action is not relative to source control; it is trying to access the local version of source control from my machine, where the other machine has its local version in another directory.

The (seemingly) obvious solution would be to make sure that the File Name dynamically references the path specified by the developer. However, there doesn't seem to be a way to do this. You can't manually edit the File Name without a windows explorer dialog box appearing, asking you to pick the file.

I've looked into Path Variables but there doesnt seem to be a place to use them, and you still have to find a way to dynamically create the path. I've also played around with the explorere dialog, entering relative paths or Source Control paths (starting with $/ ), with no success.


There are a couple of alternatives that should work, but I feel like this should be something that can be done. If anyone has some other suggestions on things to try, please let me know

Thanks

-Ian
0 Kudos
(1) Reply
chiranjeevi
Level 7 Flexeran
Level 7 Flexeran

Hello,

Could you Please give a try using relative paths instead of using absolute paths to reference the files in source control.

Thank you
Chiranjeevi
0 Kudos