I want to change an image in a .net windows application without using source code.
How can I modify a image resource in a .net assembly by using Reflexil over Reflector?
Well there is only Hex Editor. So you need to first save resource as file.Then find magic number of image.Delete everything before it & save it as image. You can now modify image & inject new image back to resources.
You can save resource file by reflector, then use .NET Resourcer at here http://www.lutzroeder.com/dotnet/ to edit resource file, then use reflecxie replace resource file in Reflector
Related
I made some test sequences and a workspace in TestStand. I want to deploy those sequences and make a MSI based executable. However, I am not sure how can I include the files for Simple or Full Featured UI into the workspace and include it during deployment or call the UI content folder directly during the deployment.
Can anyone please help me?
Just insert folder with custom user interface into workspace https://www.ni.com/docs/en-US/bundle/teststand/page/tsref/infotopics/db_add_file_to_wksp.htm.
Then you will see inserted files in Deployment Utility.
But better practice would be to separate installers of user interface, and sequence itself. Because mostly you will do more changes/updates/fixes to sequence files, so you will need to redeploy just them.
This is a big undertaking, but may be worth it for you depending on the size of your company. TestStand has an API that you can use to develop a custom GUI. That GUI can then open any sequence file you like after being compiled as a C program that runs as an executable file.
I am using Test Kitchen with the kitchen-azurerm driver to test my Chef code and am writing a configuration for testing my code against various Azure configurations. One such case is I must make sure my code converges correctly on our "golden" images we have prepared for use at my company. For the battery of tests we run against builds using Microsoft's image SKUs, the solution is simple: use image_urn along with the URN to the image in the Marketplace. Unfortunately, this doesn't work for images not available on the Marketplace.
Given the above, I am unable to use MyCompanyName:MyOffer:MyImageSku:latest with image_urn. I thought to perhaps try working around it with image_url but I don't know what the URL to the VHD file used by the image definition version would be. This also has the detriment of not being able to grab the latest image; unless I am mistaken, I would need to update the URL in kitchen.yml every time I deploy a new image version.
How can I use the kitchen-azurerm driver to consume image definitions from a Shared Image Gallery?
As it turns out, there is another property for use with the azurerm driver called image_id. This should be a Resource ID to a managed machine image. I did some testing and found this works in the following scenarios:
You have direct access to the managed image itself (e.g. not going through the Shared Image Gallery). In this case, provide the resource ID directly associated with the managed image.
You have access to the image via a Shared Image Gallery. You can't use image_urn to search for the an image version, but you can use one of the following resource IDs for the value of image_id
Resource ID for a specific image version
e.g. /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RESOURCE_GROUP_NAME/providers/Microsoft.Compute/galleries/GALLERY_NAME/images/IMAGE_DEFINITION_NAME/versions/IMAGE_VERSION
Resource ID for the image definition itself, which grabs latest
e.g. /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RESOURCE_GROUP_NAME/providers/Microsoft.Compute/galleries/GALLERY_NAME/images/IMAGE_DEFINITION_NAME
Note that this is identical to the version-specific example ID, but without the trailing /versions/IMAGE_VERSION
I am able to consume my Shared Gallery images using any of the techniques above.
I'm creating a web job on Azure that is going to be a c# console application (.exe). Inside this program I need to read a text file from the file system. Is there a way to include the text file I need in the executable? Where do I put the file and how do I reference it?
I also don't want anyone (via the website) be able to access the file.
Just deploy the text file alongside the executable, and you'll be able to open it in the current folder.
If deploying the WebJob from Visual Studio, make sure to mark the text file's properties as 'Copy if newer' to make sure it gets deployed.
Follow instead of putting a file location in the value as parameter
just put this as I show you here
Put it in Appconfig file for path as
to copy this text file into your bin/debug folder to
Make zip folder as usual, put that test file int "debug.zip"
I have created a mvc4 application with text file. I write some data in a file "ddd.txt". I wrote such address at my PC: "#D://Project//ddd.txt" and it worked finely. However, when I deploy my website on "azurewebsites.net", then I should write another address.
It is very important text file for me. And I would like to read data from it.
What address of directory should I write in my application to work him on Windows Azure server?
I would try using App_Data (you can just add the directory if it doesn't exist in your project).
You could then load the file like this:
string path = HttpContext.Server.MapPath("~/App_Data/ddd.txt");
// load file here
The other option would be to store it in Blob storage, there is a good walkthough of the different features here: http://www.windowsazure.com/en-us/develop/net/how-to-guides/blob-storage/
My requirement is to edit a .xap file which is already in the IIS Manager.. when install another web application on IIS manager. (I want to add the end points of a web application in the previous web application .xap file)
You could write a custom action to:
Open the .xap file (it's a .zip file named differently)
Extract the file(s) that need to be modified
Edit the extracted file(s)
Re-zip the extracted file(s) back into the .xap file.
You could find the existing .xap file using AppSearch of some sort. Maybe a FileSearch element. Most of the work is going to be in your custom action though. Good luck!
Please see Mike's answer over at:
NSIS Changing config file present in XAP file i.e. silverlight component build
There's two parts here:
1) Authoring the Silverlight application to use an external config file.
2) Authoring your installer to update that config file. In this case of WiX, it's the XmlConfig element in the Util extension.
The reasons for doing it this way is to have a highly reliable installer. If you write custom actions to extract, edit and compress the XAP you'll invalidate digital signatures and introduce complexity and fragility to your deployment process. Avoiding the temptation to do all this and just use XmlConfig gives you a robust, declarative installation that fully supports the Windows Installer rollback story.