Get Environment Variable in Wise Embedded VB
Created: 20 Dec 2012 | Updated: 21 Dec 2012 | 4 comments
This issue has been solved. See solution.
Hi,
I have CA - call Vb script from embedded code- I need to copy a file from %Locam% to %Locaset% in this CA. how can I use Environment Variable in the Vbscript to copy the file. I think I may need to use "Get Environment Variable" but how ?
Thank you for your help
Discussion Filed Under:
Comments 4 Comments • Jump to latest comment
Using VBScript to resolve string with env. variables you could use:
If you want you can also set environment variable to a property in MSI with SetProperty CA and setting its value to [%Locam]
then you can use this property in your VBScript CA. If this VBScript CA is running in Immediate mode, it should not be problem and you can access the property directly. However if it is running in deferred execution mode then you need to pass this property to the CA.
Follow this link for how to do this.
https://www-secure.symantec.com/connect/blogs/prop...
Piyush Nasa Altiris Certified Professional (ACP)
http://msiworld.blogspot.com/
Are the variables %Locam% and %Locaset% pointing to local or network resources?
I assume local, but if either of them are network based, then you may need to run your CA in user context in order to have access to the network.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
Thank you all for your reply.
Would you like to reply?
Login or Register to post your comment.