<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Is it possible to run Thinapp Scripts inside the VM in ThinApp</title>
    <link>https://communities.vmware.com/t5/ThinApp/Is-it-possible-to-run-Thinapp-Scripts-inside-the-VM/m-p/1603645#M3833</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I might need to clarify my question based on your answer. I am talking about the .VBS scripts that are built into the package and run at startup of the package. I was under the impression that those run outside the context of the virtual environment, so I don't see how modifying the virtual registry keys would help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Sep 2009 14:33:59 GMT</pubDate>
    <dc:creator>JohnFx</dc:creator>
    <dc:date>2009-09-21T14:33:59Z</dc:date>
    <item>
      <title>Is it possible to run Thinapp Scripts inside the VM</title>
      <link>https://communities.vmware.com/t5/ThinApp/Is-it-possible-to-run-Thinapp-Scripts-inside-the-VM/m-p/1603643#M3831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've written a thinApp script to dynamically create some registry keys when the package starts up and it seems to be working okay. However, it is writing the registry keys to the host system and not the virtual environment. Is there any way to make the script run within the virtual environment, or alternately write to the virtual registry explicitly in a script? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Folling is the code I am using to write the keys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Sub SetStringKey_HKLM(strKeyPath,KeyName,strValue)&lt;/P&gt;&lt;P&gt;    c&lt;/P&gt;&lt;P&gt;onst HEY_LOOCAL_MACHINE = &amp;amp;H80000002&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    strComputr = "."  Set oReg=GetOect(twinmgmts:s:mpersonanaonLevel=impersonatate}!&lt;BR /&gt;" &amp;amp; strComput &amp;amp; "\root\d\default:StdRegPro)&lt;/P&gt;&lt;P&gt;    oReg&lt;/P&gt;&lt;P&gt;eg.SetSngVague HKEY_LOCAL_AL_MACHINE,strKeyPateyName,strsalue &lt;/P&gt;&lt;P&gt;End Su&lt;/P&gt;&lt;P&gt; Sub &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2009 23:00:41 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ThinApp/Is-it-possible-to-run-Thinapp-Scripts-inside-the-VM/m-p/1603643#M3831</guid>
      <dc:creator>JohnFx</dc:creator>
      <dc:date>2009-09-18T23:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to run Thinapp Scripts inside the VM</title>
      <link>https://communities.vmware.com/t5/ThinApp/Is-it-possible-to-run-Thinapp-Scripts-inside-the-VM/m-p/1603644#M3832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JohnFx, You'll need to modify your ThinApp project registry hive text files (one or both depending upon the registry keys you're modifying in your script) to add the settings' parent key(s) with ISOLATION_WRITECOPY or ISOLATION_FULL to the header of the registry key line. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if I'm writing mods to the HKLM\SOFTWARE\VMWARE key with a script, and I want these values to be stored in my ThinApp package's Sandbox vs. the native system's registry, I need to modify the HKEY_LOCAL_MACHINE.TXT file and ensure the parent key (HKEY_LOCAL_MACHINE\SOFTWARE\VMWARE) is present in the registry hive file with a value of ISOLATION_WRITECOPY (in case I wish to see what's on the native as well as what I write to the virtual registry hive) or ISOLATION_FULL (in the event I only want my app to pull settings from the virtual registry and not see what's in the native system).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, you can also try the following in your PACKAGE.INI:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="CP_CodeParagraph"&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV class="CP_CodeParagraph"&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read the online docs for more information on the above (see the link below). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Dean F.&lt;/P&gt;&lt;P&gt;&lt;A href="http://pubs.vmware.com/thinapp4/help"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Sep 2009 16:59:51 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ThinApp/Is-it-possible-to-run-Thinapp-Scripts-inside-the-VM/m-p/1603644#M3832</guid>
      <dc:creator>Squidly_Man</dc:creator>
      <dc:date>2009-09-19T16:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to run Thinapp Scripts inside the VM</title>
      <link>https://communities.vmware.com/t5/ThinApp/Is-it-possible-to-run-Thinapp-Scripts-inside-the-VM/m-p/1603645#M3833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I might need to clarify my question based on your answer. I am talking about the .VBS scripts that are built into the package and run at startup of the package. I was under the impression that those run outside the context of the virtual environment, so I don't see how modifying the virtual registry keys would help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Sep 2009 14:33:59 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ThinApp/Is-it-possible-to-run-Thinapp-Scripts-inside-the-VM/m-p/1603645#M3833</guid>
      <dc:creator>JohnFx</dc:creator>
      <dc:date>2009-09-21T14:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to run Thinapp Scripts inside the VM</title>
      <link>https://communities.vmware.com/t5/ThinApp/Is-it-possible-to-run-Thinapp-Scripts-inside-the-VM/m-p/1603646#M3834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scripts embedded within the root of a ThinApp package will always run within the context of the virtual environment (i.e. inside the virtual bubble).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Modifying the ThinApp project to add those registry keys as previously stated will, in this scenario, properly set the isolation levels upon those keys so that any changes made to them (whether by the app or by the embedded script) will remain within the virtual environment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some things to remember (for anyone reading this); A ThinApp packaged application can be configured to keep all runtime modifications within the virtual bubble or allow any number or type of runtime modifications be made out on the native environment if that is desired. This is in part because ThinApp packaged applications can be configured to isolate all or some (or, if you want, even none) of the application's utilized files or registry entries by setting isolation levels upon individual registry keys and folders in the file system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Isolation levels essentially define what the packaged application can see and do on the native system (i.e. outside the virtual bubble).  An anology I like to use is; think of yourself as the application and you're standing inside a bubble.  You don't see the bubble but you see the effects of the bubble - the bubble being created by the ThinApp Virtual Operating System.  If FULL ISOLATION is set, that means you, the app, cannot see or modify anything outside the bubble (on the native system).  If MERGED isolation is set, you, the app, can not only see, but affect changes to the native system.  With WRITECOPY isolation, ThinApp basically tricks the app to thinking it has complete access to the native system but actually takes a copy of that file/registry setting and writes it to the ThinApp Sandbox (which is also part of the virtual bubble) for the app to modify as necessary.  So, in a sense, WRITECOPY is a read only state on the native system. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following this logic process a step further, one can also deduce that ThinApp has an order of precedence in that if a registry setting/file exists both in the virtual bubble and on the native system, the one within the virtual bubble will take precedence over that of the native setting or file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lastly, isolation levels are set per registry key or per folder on the file system and are inheritable. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Dean F.&lt;/P&gt;&lt;P&gt;&lt;A href="http://pubs.vmware.com/thinapp4/help"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Sep 2009 15:21:01 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ThinApp/Is-it-possible-to-run-Thinapp-Scripts-inside-the-VM/m-p/1603646#M3834</guid>
      <dc:creator>Squidly_Man</dc:creator>
      <dc:date>2009-09-21T15:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to run Thinapp Scripts inside the VM</title>
      <link>https://communities.vmware.com/t5/ThinApp/Is-it-possible-to-run-Thinapp-Scripts-inside-the-VM/m-p/1603647#M3835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you absolutely sure about this. I isolated (with write_copy isolation) the exact key my script was modifying and it still affected the registry on the host system. I am writing to the key in the OnFirstSandboxOwner callback, perhaps this callback behaves differently?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Sep 2009 20:18:13 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ThinApp/Is-it-possible-to-run-Thinapp-Scripts-inside-the-VM/m-p/1603647#M3835</guid>
      <dc:creator>JohnFx</dc:creator>
      <dc:date>2009-09-21T20:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to run Thinapp Scripts inside the VM</title>
      <link>https://communities.vmware.com/t5/ThinApp/Is-it-possible-to-run-Thinapp-Scripts-inside-the-VM/m-p/1603648#M3836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Okay, I think I have discovered the issue and it appears that not all objects were being treated the same with respect to whether it affected the host system or not.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This Approach will write to the host system registry regardless of the isolation&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub SetStringKey_HKLM(KeyPath,KeyName,Value)&lt;/P&gt;&lt;P&gt;    const HKEY_LOCAL_MACHINE = &amp;amp;H80000002&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Computer = "."&lt;/P&gt;&lt;P&gt;    Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!&lt;BR /&gt;" &amp;amp; Computer &amp;amp; "\root\default:StdRegProv")&lt;/P&gt;&lt;P&gt;    oReg.SetStringValue HKEY_LOCAL_MACHINE,KeyPath,KeyName,Value&lt;/P&gt;&lt;P&gt;End Sub    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This approach seems to operate inside the context of the virtual bubble&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub SetStringKey_HKLM(KeyPath,KeyName,Value)    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Set WSHShell = CreateObject("Wscript.Shell")&lt;/P&gt;&lt;P&gt;    WSHShell.RegWrite "HKEY_LOCAL_MACHINE\" &amp;amp; KeyPath &amp;amp; "\" &amp;amp; KeyName, Value,"REG_SZ"&lt;/P&gt;&lt;P&gt;End Sub     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Sep 2009 20:31:53 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ThinApp/Is-it-possible-to-run-Thinapp-Scripts-inside-the-VM/m-p/1603648#M3836</guid>
      <dc:creator>JohnFx</dc:creator>
      <dc:date>2009-09-21T20:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to run Thinapp Scripts inside the VM</title>
      <link>https://communities.vmware.com/t5/ThinApp/Is-it-possible-to-run-Thinapp-Scripts-inside-the-VM/m-p/1603649#M3837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ahhh!  Good catch John.  I didn't even think to see how you were making your calls to modify the registry.  That does make sense...   :smileycool: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Dean F.&lt;/P&gt;&lt;P&gt;&lt;A href="http://pubs.vmware.com/thinapp4/help"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Sep 2009 21:04:21 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/ThinApp/Is-it-possible-to-run-Thinapp-Scripts-inside-the-VM/m-p/1603649#M3837</guid>
      <dc:creator>Squidly_Man</dc:creator>
      <dc:date>2009-09-21T21:04:21Z</dc:date>
    </item>
  </channel>
</rss>

