QA-C: license file - qa-c

I'm trying to run QA-C 7.2 on a Nightly Build that I program using Python.
It does run but the problem I encounter is, that I cannot save the license file configuration settings because IM not a 'license admin'. Hence, everytime I run QA-C it requires me to browse to the license.dat
Does anyone know a way around this, for example passing the license file configuration (eg path2license_dat) as a parameter when I call the exe? Or somehow saving this information?

I found out that it works when setting the environment variable LM_LICENSE_FILE to the path to license.dat

Related

Pass end point details in Rest Web Service command in Automation Anywhere

In the Rest Webservice Command, I don't see any option to pass a variable in the URI.
We do not want to hard the end point in the script.
As an e.g I will want the script to use different points for dev/stage and prod.
Is there a work around for this.
On building a URI with variables like :
https://$v_hostname$/test-rs-v1/employee/data send request works fine but
bot runs we get an error stating :
Hostname could not be parsed.
Update: That was a bug and fixed on version 11.3.1. You can only achieve that on version 11.3.1 or later.
Reference: https://docs.automationanywhere.com/bundle/enterprise-v11.3/page/topics/release-notes/release-notes-11-3-1.html
Workaround for older versions (If you have experience with C#): Build and test DLLs
The following applies only on version 11.3.1 and later.
Make sure that $v_hostname$ contains a value at the run time, using debugging option or message box command.
I did reproduce the same error by entering a variable that doesn't exist or doesn't have a value, there is no another scenario would reproduce "Hostname could not be parsed".
If the hostname/URL is invalid you will get "The remote name could not be resolved:".
I've tested the REST Web Service command on both community and enterprise editions, and it's working very well.

Electron builder - GitHub Personal Access Token is not set, neither programmatically, nor using env "GH_TOKEN"

I have an electron app for which I want to set up an auto-updater. I followed this blog post and made a small demo, it worked great with some small changes.
Then I tried to implement it with my real project and now I am getting an error.
GitHub Personal Access Token is not set, neither programmatically, nor using env "GH_TOKEN"
I already have electron-builder.yml file and i even tried setting up GT_TOKEN anv variable but it still throws same error.
Forget about that post, I tried to implement it but faced many issues with that.
Try this one.
But take a note that For macOS, you will need a code-signing certificate.
For windows and Linux it works seemlessly.
Just follow the instructions.
For exporting the token, you need to add the export line at the end of the .bashrc or .profile in Linux/Mac. Google it if you don't know how.
Make sure to restart IDE/Terminal to inherit latest env variable.
Well, I found the solution, I set env key in .bash_profile and it worked. I don't know why setting GH_TOKEN in the main.js file and in electron_builder.yml file didn't work. It works in the beginning but then when I added more configuration to package.json file it started throwing this error.

Read config settings from PhoneGap app

Apparently I'm terrible at Googling. All I want to do is have the ability to read my web service URL from a config file in my PhoneGap app. Also, be able to modify that value during the build process. Is this named alot different in Xcode? I think I need to save this value in the plist file. If that's the case, then I can just set a user-setting in my build configuration stuff to have it change depending on which build type, Dev/Release.
If that's true, how do I access this from PhoneGap?
I'm guessing this question will get closed, but where else do I go for help...
plist file for cordova project already depreciate since v2.2. Cordova v2.3 start using config.xml.
Target > Edit Scheme
You could probably use hooks to accomplish everything that you are trying to do without changing around the config.xml file, but I'm not entirely sure this is supported with Phonegap (it is with Cordova.)
Check out the official help page to use the /hooks/ folder to modify anything during the build process: https://github.com/apache/cordova-cli/blob/master/templates/hooks-README.md
This blog post also seems pretty useful: http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/ it talks about changing things based on the environment and I'm sure it'd be easy to extend that to changing based on dev/release.
You could store the link to your web service probably as a config variable. I'm trying to figure out how you can add a config variable and will report back if I get it. In the mean time you could probably just have something like a server.txt file that you change with hooks.

Updating EXE file from server…

I need to update my application from a central server.
The application checks always if it is a correct version, against the server installation.
So when it is not, I need it to update itself.
So how can I copy the EXE if it is running? What solution do I have?
I rename the current running exe to MyTempExe.exe, copy the new exe to the correct location (request elevated privileges if necessary) and then run a separate app to restart the main app. On start up I check for MyTempExe.exe delete it if it's there.
The reason I use a separate app for the restart is I don't have a set time frame for the app to close down and need to wait for it to finish whatever it's doing, on shutdown it writes information to disk about its current state that the updated app will use to resume where the old one left off.
I don't know if it's the best solution but it's the one I use.
As you can see by all the answers there is no set way to do this, so I thought I would add the way we have successfully done this.
We never run an application directly from the network.
We run the application from the local machine and have it copy from the network on startup.
We do this using an application launcher. It downloads an XML file that contains CRC and Version Resource Values for the application files. The XML File is created during the deployment process, in a FinalBuilder Script.
The application then compares the XML File to local content, and copies down needed files. Finally we then launch the application in question. This has worked well for deploying an application that serves around 300 local users. Recently we switch from a file copy to an HTTP download as we found problems with remote user disconnecting drives.
We still still build installations (With Innosetup) to get the basic required files deployed.
Package your app with an installer such as Inno. Download and execute the installer. Have the installer search for and kill your app, or instruct the user to close it. The setup will replace your .exe, and if the app can't be killed or the user is non-cooperative, it'll issue a re-start notice.
Download new EXE to TEMP
Create Batch from EXE, content:
taskkill /PID %process id of running EXE%
copy %new EXE% %running EXE%
%EXE%
all values in %...% are placeholders
execute batch from the running EXE
delete batch
I use TMS TWebUpdate myself, for software updates. The advantage is that there a bunch of extra actions you can put into the script, if you need anything other than plain EXE updates.
I have two components at work the application executable itself and a web-service (SOAP) which provides version details and file downloads.
The application calls a method on the SOAP service to ask for the number of files in the project (project is identified by using the application.exename usually).
The soap service gets its info from an INI file, which has entries like:
[ProjectName]
NumberOfFiles=2
File1=myapp.exe;1.0.0.1
File2=mydll.dll;1.0.0.2
You just update this file at the same time as uploading your new files.
The process of updating the application this:
Get number of files available on the web service
For each file, the application asks for the name and version number from the SOAP server.
The application compares this information to its own version info and decides if the file needs updating, building a local list of files that need updating.
For each file that needs updating the application downloads the file to filename.ext.new
Finally, the application renames all filename.ext to filename.ext.old and renames filename.ext.new to filename.ext and then restarts itself. (No real need for an external app to restart your own program).
Note 1, that you may have to ask for elevation to replace files, depending on where you install your files.
Note 2: be kind to your users, think carefully before you force updates on users.
Note 3: You cannot delete a running exe, but you can rename it and then restart the new version.
Edit===
For some reference data files which cannot contain version information resources, you can have entires like File99=MyDataFile;1.1.2011 the 3 elements to the version number indicates to the client that it should check against the file date/stamp.
You could have a separate update executable whose task is to check the server version, download an updated executable if necessary, and then run the local executable.
Or you could have one executable running in two different modes: 1. on startup, check for an update, if there is one, download the executable to a download directory, run it and quit.
2. The new executable would check if it's running from the installation directory, if not, it would copy itself there, overwriting the old version, start the copy from there, and quit.
My way is the other way round: If a new version is online, promt the user to update. If he want's to (or is forced to...) I end the app and start a new exe (updater). this updater loads the update and replaces the old exe (not running). then it starts the new exe. ready. (You can of course replace other files too.) BUT: Using an Installer like InnoSetup gives you more possibilities and doesn't mix up with the regular uninstaller, so it is really better...
You can do this without running another application. Push the updates to the client from the server while running, storing in a temporary directory on the client. When you want to upgrade move all your running files to another temporary directory, move the new files into the original application directory, and just restart the application using the standard executable name on shutdown.
I upgrade client applications running on unattended machines automatically this way.

How to install s3sync

This seems like an excellent script but lacks a key part to its installation I can't seem to figure out. Maybe someone out there can help a newb.
What I've done so far :
Installed the s3sync package.
Downloaded the s3 certificate
Downloaded the s3 ssl package
ran it with sh ssh.certs.shar
Edited the s3conf.yml file to have the correct AWS id and password and a path to the cert file
When I run the s3cmd.rb I get the error "You didn't set up your environment variables; see README.txt"
To which I agree, there is no information written regarding where I specify destination or target.
Guesses :
-The cert file has to be in a specific place to which it isn't, or its in the incorrect cert file
-the s3conf.yml may not have the correct information written in it.
UPDATE:
Uninstalled everything, and installed it as a gem. Made sure the s3config.yml is still in /etc/s3conf/ . Still nothing though.
Some b/s here but I went into the s3config.rb
Found this line :
confpath = ["#{ENV['S3CONF']}", "#{ENV['HOME']}/.s3conf", "/etc/s3conf"]
and ripped it apart to this :
confpath = ["/etc/s3conf"]
Done, problem solved.
Yes. The environment variables are not being found. This troubled me for a while. It is because the locations you are setting in that initial line of confpath code ["#{ENV['S3CONF']}", ... is not actually the location of the variables contained in the .yaml file.
As Trip says, hard setting that value to the dir containing the .yaml file solved this problem for me.
You could actually set the values using 'export' but really, this is much easier!

Resources