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
- :
- Referencing a Custom action vbscript file stored in source control?
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
May 07, 2013
10:45 AM
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
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
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 16, 2013
08:51 AM
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
Could you Please give a try using relative paths instead of using absolute paths to reference the files in source control.
Thank you
Chiranjeevi
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)