I am trying to import the UIAutomation files in PowerShell from this site
https://archive.codeplex.com/?p=uiautomation
But when I download there are no .dll files. How can I use programs such as Inspect.exe to automate the UI in PowerShell?
I am following steps from this site
https://www.softwaretestinghelp.com/desktop-application-ui-automation-with-powershell/
The downloaded zip contains 6 items, one among which is the releases folder. You'll find a releaseList.json file under it.
Now, the file isn't so clear but, let's say you want to use the file with .Net framework 4 and the release 0.8.7 Beta 3, just scroll down to the bottom, and under the ID: 44, you have 5 entries with the FileName as:
UIAutomation.0.8.7B3.NET35.zip
UIAutomation.0.8.7B3.NET40.zip
UIAutomation.0.8.7B3.for.ModernUI.zip
UIAutomation.0.8.7B3.sources.zip
UIAutomation.0.8.7B3.samples.zip
Decide which one you need as per your requirements - I selected UIAutomation.0.8.7B3.NET40.zip. Now, check its corresponding URL and that should tell you which file you need to look for.
For the one I used, the URL is: ./44/e1bf995a-f3c9-453d-88bc-0ff6d3509820, hence you'd need to go back to the releases folder and then browse for the folder labeled 44 and find the file named e1bf995a-f3c9-453d-88bc-0ff6d3509820.
Open the said file with a zip viewer and extract its content and here is where you find the UiAutomation.dll file. Use Import-Module with the path of the extracted files location and you should be good to go.
Related
I am trying to get a list of datasources that a Powerbi file is using. I seen solutions online where I can use the ReportingService module to get a list but this only works when the PowerBI report is published online. Is there a solution that would work for a local file?
Here is the situation.
A user gives me a Powerbi file. In order for me to get a list of datasources, I have to go in manually and to take a look at sources manually. Ideally, I would like to use Powershell to get this list.
There isn't an API that can access the desktop application. You would have to brute force it.
The PBX file is basically a Zip file which then contains separate files with JSON information. You would have to follow the following steps:
Use Expand-Archive to get the files out of the PBX (Not sure if you will need to change the file extension first).
Read the "Connections" file (Which is Json). It will have the various connection strings used by the model.
You can do this manually by changing the file extension to Zip and opening the Zip file directly, and looking at the connections file in notepad.
I would like a better workflow for debugging uploaded SCOs. As things are, I must edit a file in the activity, repackage, upload, and test. Often, I just need to change a single line of code. It would be VERY nice to be able to edit that file, that line of code, on the server. So far, all I've found is that Moodle manages the files, so it seems impractical to locate and decipher the renamed files after upload.
Is there a way to configure Moodle so that it doesn't rename and relocated files in SCOs upon extraction? Actually, I'm open to any suggestions on the best, fastest workflow for debugging SCOs.
Problem background
Since Moodle 2.0, files are no longer stored on server in the conventional /this/is/the/path/to/my.file way. Instead, files are rehashed and stored in Repositories (i.e. spread all over the moodledata folder as a collection of seemingly random data). This increases security and cross-OS compatibility but complicates stuff for people who would like to simply upload a SCORM zip package via FTP. Here's more information on file handling in Moodle 2.0
Path to the soluton
Let's locate the file you want to update, then update it.
Run phpmyadmin, go to mdl_files table, find your file by name in the filename field (let's say it's portrait.jpg)
Look at the contenthash field, it'll look like abcde1234567890. This means your file is stored in moodledata/filedir/ab/cd/ folder under the name abcde1234567890.
Rename the updated portrait.jpg to abcde1234567890, upload and overwrite.
Go back to phpmyadmin and update the filesize field in record for portrait.jpg with the size of the updated file.
Obviously, this process can be automated. You'll have to write a script that allows you to upload a file, then it'll search for that file in mdl_files, save it to the correct folder and update all fields accordingly.
Alternative idea
Enable external package type (and also enable 'Update on every launch'). Go to Site administration / Plugins / Activities / SCORM and check the box down below. Now you'll be able to launch SCORM packages directly from another server, so Moodle won't mess with it. Of course, you can run in other (probably cross-domain related) problems.
Sergey's answer is very good, with one caveat:
In his example with the contenthash of abcde1234567890, the file is stored in the moodledata/filedir/ab/cd/ folder under the name abcde1234567890. Moodle uses the full contenthash to name the file.
I know that you can create an xml file detailing the contents when you create a package, but is there an easy way to determine what is in a package when it is just a zip file sitting on a file server or something?
This is in version 6.2.
Yes you can. Open the Package Designer on the server where the zip is. In the New menu click the dropdown and select "From Existing." From here pick the package and it will open in the designer.
Here's a blog post visually showing you the idea: Inspecting Sitecore Packages Before You Install Them
You can open a package with any archive editor (for instance, 7zip). The main ZIP contains another ZIP, called package.zip. The package.zip in its turn contains a number of folder. The most interesting to you are probably:
files
items
security
The contents of /files folder corresponds to the file system structure under the website root. For instance:
/App_Config/Include/my.config
/bin/my.dll
/xsl/my.xsl
The contents of the /items folder is a directory structure. The path to an XML representation of each item starts with the folder named like the database holding the item, then down the path of the item in the content tree (starting from /sitecore), then the ID of the item, next the language, and finally the version. For instance:
\items\core\sitecore\layout\Layouts\my layout{GUID-GOES-HERE}\en\1\xml
"xml" is the name of the XML file containing the item data.
The contents of /security folder is simpler:
\security\roles\sitecore\My Power Users
There are other folders inside the package.zip, but those primarily hold the metadata of the package, like readme, license, etc.
I suppose it's a superfluous warning, but still: don't try to edit anything there. It makes sense for a quick look only to make sure something is or is not in the package.
Hope this helps.
I've been trying to figure out how to download multiple files in a row based on the SimpleFTPSample provided by apple. Basically, I'm filtering what the user can see when they browse an ftp server, but when they select a certain file type, I want it to automatically check for another file of the same name with a different extension and if it exists, download it as well. I can't seem to get this second file to download no matter what I do. It seems strange because if I select two files in a row in my tableview, it downloads both of them just fine. Any ideas?
Edit:
It's just the SimpleFTPSample from apple.developer.com, all I did was create additional NSInputStream and NSOutputStream objects and I created a new _startReceiveFile method that gets called from _startReceive if I'm downloading a file instead of getting a directory listing. _startReceiveFile is the same code for _startReceive in the file download code for the sample project, except if the file to download has a certain extension, it also downloads an additional file with the additional stream objects. Let me know if I need to clarify more or try to put together a clear example.
Well, since there were no takers, I'll just post my solution here. I've abandoned trying to download two files at once. Instead, I just keep the ftp browsing window open and only handle the opening of the file once both files have been downloaded (user has clicked on each one separately). It's not what I wanted, but it will work, at least until I can figure out how to get two files with one request.
I am to create a new design (CSS & HTML) for a web site which is created using Interwoven ContentCenter Professional.
Now, I can see the existing files in CMS (Interwoven) but, I can't make changes. My changes are displayed only when I'm in edit mode. Nothing in the live page. I tried to submit, create editions of files but still no good.
How should I create or edit pages in Interwoven CMS?
Thanks.
If you're talking about generic pages, then once you are finished you have to click on the Generate option, then choose a directory and click Finish. Last thing you should do is to choose yeswhen it asks you to Re-generate the page.
What you are trying to do is just creating a new file, not generating a file from TeamSite's Formpublisher. It is just like if you are in Windows Explorer and creating a new file. In order to generate a file from a form entry, you need to be in the templatedata directory, ex: /default/main/branch1/WORKAREA/wa1/templatedata/category/type(on unix) or Y:/default/main/branch1/WORKAREA/wa1/templatedata/category/type (on Windows). There should be a file call datacapture.cfg there. There is another directory called data under the above path which stores your data content record (dcr) that are created from the form. This is the file that you can use to generate which will use the (tpl) file under the presentation directory.