/build/static/layout/Breadcrumb_cap_w.png

vbScript / Custom Action

Anyone have an idea why this is not working as a custom action?

Dim wshShell, filesys, filetxt, getname, path, strComputerName
Set wshShell = CreateObject( "WScript.Shell" )
strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )
Set filesys = CreateObject("Scripting.FileSystemObject")
Set filetxt = filesys.CreateTextFile("c:\Program Files\My App\cal.txt", True)
path = filesys.GetAbsolutePathName("c:\Program Files\My App\cal.txt")
getname = filesys.GetFileName(path)
filetxt.WriteLine(strComputerName)
filetxt.Close


Thanks a lot!

0 Comments   [ + ] Show comments

Answers (2)

Posted by: reds4eva 13 years ago
Second Degree Blue Belt
0
A bit more detail. I cant see anything wrong with the script. Are you giving the CA a condition ? Where is it running, ie. UI, EI or deferred ?
Is the CA embedded or running from a file copied to the machine ?
Posted by: Secondlaw 13 years ago
Third Degree Blue Belt
0
I found the problem. There was a typo in my condition. Missing end quote!

Thanks
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ