﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>New Boundary Support Forum / Package Deployment / Prism Deploy &amp; Prism Pack  / How to get current PATH from .PTS / Latest Posts</title><generator>InstantForum.NET v4.1.3</generator><description>New Boundary Support Forum</description><link>http://nbtnet.newboundary.com/forum/</link><webMaster>support@newboundary.com</webMaster><lastBuildDate>Thu, 17 May 2012 06:30:17 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: How to get current PATH from .PTS</title><link>http://nbtnet.newboundary.com/forum/Topic1872-5-1.aspx</link><description>You could use a package to create a temporary variable that the client could then use during it's session.  Essentially a package could read the registry location and then place that value into a named variable that the client would then later be able to reference.  An example package is attached.  View the Variables tab of the properties to see how it is set up.&lt;P&gt;If this package is included at the beginning of a Prism Script, then the REPLICA_SOURCE variable can be used to point to whatever the new location may be.</description><pubDate>Wed, 21 Apr 2010 13:28:42 GMT</pubDate><dc:creator>New Boundary Support</dc:creator></item><item><title>RE: How to get current PATH from .PTS</title><link>http://nbtnet.newboundary.com/forum/Topic1872-5-1.aspx</link><description>In facts %REPLICA_SOURCE% is our repository for all our packages... &lt;br&gt;&lt;br&gt;It's not the role to the Script to move the Source folder.... &lt;br&gt;but if I move the script on another location it must have the capabilities to self-resolve theirs path...&lt;br&gt;</description><pubDate>Thu, 15 Apr 2010 09:56:33 GMT</pubDate><dc:creator>SebCestBien</dc:creator></item><item><title>RE: How to get current PATH from .PTS</title><link>http://nbtnet.newboundary.com/forum/Topic1872-5-1.aspx</link><description>Have you tried creating a seperate .batch file to do the folder move and then calling that .bat file from within the script.  &lt;/P&gt;&lt;P&gt;As long as the batch file doesn't need elevation, you should be able to continue running the script the way you are now without changing who it is running as.</description><pubDate>Thu, 15 Apr 2010 09:04:35 GMT</pubDate><dc:creator>New Boundary Support</dc:creator></item><item><title>How to get current PATH from .PTS</title><link>http://nbtnet.newboundary.com/forum/Topic1872-5-1.aspx</link><description>&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #1f5080; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang=EN-US&gt;Hello,&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #1f5080; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang=EN-US&gt;I'have Prism installation script based on variables like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #e36c0a; FONT-SIZE: 10pt; mso-ansi-language: EN-US; mso-themecolor: accent6; mso-themeshade: 191" lang=EN-US&gt;/run /wait msiexec.exe /i "%REPLICA_SOURCE%\%APPNAME%\Sources\msifile.msi" /q&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #1f5080; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang=EN-US&gt;where %REPLICA_SOURCE% is resolved as a UNC path (“\\server\share”)&lt;BR&gt;and %APPNAME% is the name of application…&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #1f5080; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang=EN-US&gt;All is working like a charm…&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #1f5080; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang=EN-US&gt;Now I want to move the application folder to another server... I have to change the %REPLICA_SOURCE% variable… but I want to make this automatically...&lt;BR&gt;This is the challenge…&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #1f5080; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang=EN-US&gt;First attempt: Trying to use %CD% &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #1f5080; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang=EN-US&gt;%CD% is a batch variable that is normally resolved to the current folder in a batch file…&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #1f5080; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang=EN-US&gt;But in prism script (.pts) this doesn’t work...&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #1f5080; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang=EN-US&gt;Example after executing:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #e36c0a; FONT-SIZE: 10pt; mso-ansi-language: EN-US; mso-themecolor: accent6; mso-themeshade: 191" lang=EN-US&gt;/scriptver 5&lt;BR&gt;/run /wait %comspec% /c echo “%CD%” &amp;gt; test.txt&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #1f5080; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang=EN-US&gt;test.txt contain:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #1f5080; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang=EN-US&gt;""&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #1f5080; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang=EN-US&gt;Second attempt: Set an Environment variable dynamically&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #1f5080; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang=EN-US&gt;I /run a simple application that write an user Environment variable like this (in c#) :&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: green; FONT-SIZE: 10pt; mso-ansi-language: EN-US; mso-no-proof: yes" lang=EN-US&gt;Environment.SetEnvironmentVariable("PRISM_SHARE", Parentdir, EnvironmentVariableTarget.User);&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #1f5080; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang=EN-US&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #1f5080; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang=EN-US&gt;But pts script doesn’t see variable because is need to restart pts to take modification of environment variable. (I’ has tried to create variable in Process, user and machine… with all the same result)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #1f5080; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang=EN-US&gt;Third attempt: Get path from registry&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #1f5080; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang=EN-US&gt;I /run a simple application that write in registry the Current path&lt;BR&gt;and I want to get it in .PTS:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #e36c0a; FONT-SIZE: 10pt; mso-ansi-language: EN-US; mso-themecolor: accent6; mso-themeshade: 191" lang=EN-US&gt;/SET REPLICA_SOURCE &amp;lt;Registry Value&amp;gt; "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\\TESTVAR"&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #1f5080; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang=EN-US&gt;But this doesn’t work...&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="MARGIN: 0cm 0cm 10pt" class=MsoNormal&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #1f5080; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: FR-CH" lang=EN-US&gt;Now I don’t have more idea to pass variable to .PTS&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #1f5080; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang=EN-US&gt;Can you help me?&lt;/SPAN&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #1f5080; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang=EN-US&gt;Thanks a lot&lt;/SPAN&gt;&lt;P style="BACKGROUND: white"&gt;&lt;SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: #1f5080; FONT-SIZE: 10pt; mso-ansi-language: EN-US" lang=EN-US&gt;Sebastien&lt;/SPAN&gt;</description><pubDate>Thu, 15 Apr 2010 05:43:22 GMT</pubDate><dc:creator>SebCestBien</dc:creator></item></channel></rss>
