VMware Horizon Community
btrabue
Enthusiast
Enthusiast

Run VBS file in thinapp package only once per user or machine?

Hello-

Attached I have a VB script that I would like to only run once for the user.  The other times that the thinapp is opened the script does not need to run.  Is there anything that I can place in the script or in the thinapp package to accomplish what I am wanting to do?   Thank you

0 Kudos
6 Replies
Lakshman
Champion
Champion

Please add the script in a function OnFirstSandboxOwner

To know more about this function, check here:

http://blogs.vmware.com/thinapp/2008/10/scripting-withi.html

0 Kudos
btrabue
Enthusiast
Enthusiast

Do I add that to the script that I have or is it a seperate script?  I did not write the script that I attached because that is not my thing.  Thanks

0 Kudos
Lakshman
Champion
Champion

I have modified the script for you by embedding it into the function OnFirstSandboxOwner.

Please test it and post the results.

0 Kudos
btrabue
Enthusiast
Enthusiast

I got the following error when running it the first time...

error.jpg

0 Kudos
Lakshman
Champion
Champion

Try this updated script.

0 Kudos
btrabue
Enthusiast
Enthusiast

That seemed to help, but I am still getting an error stating the path was not found.

Capture.JPG

I wonder if it has to do with what I placed below.  Can this issue be resolved?  Thank you!

if Left(strver, 1) = 6 then
pathx = "c:\program files (x86)\sdi\tn3270 plus\"
else
pathx = "c:\program files\sdi\tn3270 plus\"
end if

0 Kudos