I have been able to open a Windows 8 shsxs.dll file in Visual Studio 2010.
But it's write protected.
Now, while in Visual Studio, I want to know how to modify an existing image or add a new image in
png format to shsxs.dll.
Also, I have been a to unpack/extract it too using 7-zip.
Thus, how can I repack the unpacked .dll file back to a .dll file?
PS: I'm new to Visual Studio, so question or tag may seem irrelevant. Please correct me & help me out asap.
Preface: I haven't got a chance to work with Windows 8 yet, so the information in this answer might be slightly off. Or completely useless.
I think by write protected you mean read-only. That's easily corrected. Locate your shsxs.dll and right-click on it. Select Properties and uncheck the Read-Only checkbox in the Attributes section, if it is checked. Then go to the Security tab, and click edit. Select your username (or the user Everyone if it's there) and tick the Full access checkbox in the Allow column. Click OK. Click OK again.
Next you want to know how to modify an existing image or add a new image in png format. These are two different things.
Let's tackle the modifying first.
You can't do that with 7-Zip. You can only use it to look at the DLL's content, but you can't modify it. You need a specialized tool for the job, I recommend the XN Resource Editor, which is basically a better Resource Hacker, which used to be the program to edit already compiled resources. I'm not sure whether they work with Windows 8 modules, though. If they don't, please link to an alternative which can in the comments, or edit this answer if you can.
After you install the XN Resource Editor, start it, and open your shsxs.dll. On the left side you have the resource tree. Expand the Bitmap subtree. You should see a bunch of numbers, each one represents one resource in the DLL. Expand each subtree until you find the desired image.
Once you find your image, you can modify it inline using XN Resource Editor's built-in picture editor. You can also remember the resource's number, right-click on the Image and select Delete Resource, then go to the Resource menu and select Import Image Resource, find your desired image. Then right-click on the newly imported image in XN Resource Editor, select Properties and enter the old resource's number (you remembered it, right?) and press OK.
Adding a new Image is not that different.
It's easy, simply go to the Resource menu and select Import Image Resource, find your desired image and click OK. DONE.
Edit: Since the file came from System32, I added instructions on how to grant the user full access to the file, additionally to removing the read-only flag.
Related
in InstallShield 2011, I cannot modify file permissions under Application Data -> Files and Folders. Whenever I right click on items, it shows grayed out menu buttons. I can't even delete existing entries.
In a bat script later in the installer, I can't copy over certain files because I don't have the right permissions so the installer fails when trying to reference files in BackupFiles. For some reason all the other files get copied over just fine; I can't modify those file's permissions either. I read online that you have to click the "Properties" button in that context menu to change permissions.
My version is InstallShield 2011 Premiere Edition Version 17.
I don't understand why this is grayed out. The source files do not have any restrictions on them so it must be the installer doing something related to permissions.
That boxy orange overlay on the folders and files indicates that these are coming from a Dynamic File Link. Because these files aren't actually added to your project, not all configuration options are available. You might have to edit the permissions on the source files (before build), or change your project to statically include all or some of these files. Given the size of that tree, changing it all to static could be a bit tedious. Changing parts of it (by editing the link exclusions) might be a good middle ground.
Or you could better determine what's going wrong and see if you can address it in the batch file. Assuming this is InstallScript (rather than InstallScript MSI), the entire setup along with any processes it launches should be elevated. So I'm having a hard time guessing what could go wrong. Perhaps a read-only flag? Perhaps use a tool like process monitor to get more information on that, and see if you can add a call to attrib -r, or cacls, or whatever.
I'm using Xcode 8. I recently inherited a project with several hundred files (including source and image files). I rearranged them on my local drive and the file names (appropriately) become red in the folder list on the left side of Xcode. I selected files/folders in this folder list, click on the "Hide or show Utilities" button to display the "Identity and Type" pane on the right side of Xcode, clicked on the little folder icon next to the Location, and selected the files'/folders' new locations. The text in that pane was updated to the new location and the file/folder names changed from red to black. So far, so good. I did this to all of the file/folder names until none of them were displayed in red.
However, when I go to build the project, I get numerous warning messages similar to, "image.png /Users/Me/Project/images/image.png is missing from working copy." The path shown in the error message is the file's OLD location. When I look at that image in the file list, it is displayed in black. When I select that file and look at the Full Path in the pane on the right, it shows the file's current location (e.g., "/Users/Me/Project/images/newfolder/image.png"). I'm unsure where in the project the old location is being stored. FWIW, I've tried Cleaning the project...
Thanks for insights.
So here is an approach that is perhaps not for the meek, yet it is something I do more often than one would expect to fix Xcode project files. I tend to be the one designated to do this on the teams I work with ... manually editing the project file. The .xcodeproj file is really just a special folder. The actual project file is project.pbxproj.
First back up the project file. Your choice on if you want to do the complete .xcodeproj or just the project.pbxproj.
Use your favorite text editor and open up the project.pbxproj file.
Search and replace the prefix to your path. For the sake of this exercise, you should try and keep your path as similar as possible to make it easier. For example, if the hardcoded path is /Users/Me/Project/Images/newfolder/image.png and all prefixes are generally "/Users/Me/Project", you can just do a search on "/Users/Me/" or "/Users/Me/Project" (the latter if you want more safety) and replace with "/Users/You/" or "/Users/You/Project". Note I am not searching on "Me" and replacing with "You". You want to search and replace but as controlled as possible.
Once done, save and open the project. If the project doesn't open at all, it means you messed something up. Start over. Note that changing the paths should not be sufficient to break the file. It will probably mean you accidentally added or deleted something.
If the project file opens now build. It should hopefully build.
Okay, so that gets you into a buildable state. Now you really want to fix things. Whomever did the project was a knucklehead for using absolute paths.
This next part will be tedious. There are probably ways to do this manually, but I'll leave that to an exercise for the reader right now. In file inspector within Xcode, you will want to change files to be anything but "Absolute Path". Here is an example, you can see the location is "Relative to Group".
Essentially you are going to have to around to Groups and files and fix things up to not be absolute. Make sure you backup incrementally and can build.
Wait, but unfortunately there is more. You'll then need to go into Build Settings to see if things are absolute paths. Then you'll need to decide how to adjust for that. For example, it is not uncommon for 3rd Party frameworks to be added with absolute paths.
Or I suppose if you want to, you can just get it working and skip the latter part of this and damn everyone else...
I have a C++ Visual Studio project, in which I wish to locate one particular constant throughout the whole project. That is, I want to locate that particular variable in every single file in my project, including all .cpp and .h.
A previous question seems to be relevant, but it is only able to locate the variable within ONE file.
How may I do it?
You can use Quick Find available on the Edit ► Find and Replace ► Quick Find menu. With my key bindings it is bound to Ctrl-F.
The Quick Find dialog box is shown in the upper right corner of the editor window. You can change where to search from the drop down. Normally you search in Current Document but you can change it to Entire Solution.
If you want to search .h files that are not part of your solution you can use Find in Files available on the Edit ► Find and Replace ► Find in Files menu. Here you can specify a scope that also includes files of a specific type in a folder.
I have a collection of numerous icons, png files and other graphics data stored on a Icons folder in my secondary hard disk.
When I need a new resource I double click on the resource.resx file and add the new one via 'Add Existing file".
However each time I use this menu, it opens a browse window initially located at C:\Windows\System32. So, each time, I need to go to my Icons folder.
Is there a way to 'teach' Visual Studio how to remember the last folder opened? (Macro? Addin?)
This has annoyed me for quite some time, and just found this via a Google search. I voted it up, but per Microsoft's response on the bug page, it's unlikely it will ever get fixed(it might take all of 5 minutes, after all)...
Anyways, I did find a suitable work-around for my scenario that I wanted to share! Simply use Explorer to navigate to the path with your resources(icons, pngs, etc.) and drag/drop them into the resource list in VS2010. This is actually faster for me, as I have PNG's and an icon for each graphic I add, and this way I can add both with one step, instead of switching between the 'icon' resource section and the 'images' resource section, clicking 'Add Resource'->Existing->find path->select, etc... Hopefully this saves someone considerable time, as it's saved me.
XCode2 had this beautiful feature: you put the cursor on a line with a #include <file> and execute the open-quickly command (command-shift-D) and it would open the file. I can't get it to work for me in XCode3.
I have something like this
#include <folder/subfolder/HeaderFile.hh>
and when I put the cursor on this line, and open the open-quickly dialog, it automatically fills the search window with
folder/subfolder/HeaderFile.hh
but doesn't find anything. If I then remove "folder/subfolder/" then the dialog will identify HeaderFile.hh and I can open it up. But this extra deleting is so much slower just the three-key command-shift-D opening I was used to with XCode2.
If I give it the full path to this file in the search window, then it finds it:
/Users/andrew/myproject/src/folder/subfolder/HeaderFile.hh
this path will find the file. Again, I don't want to spend all my time typing out the full path.
I created this project as an external build system, and I think that's related to the problem; the xcode project lives in
/Users/andrew/myproject/xcp_dir/
and I want it to search in the "../src/" directory so that the partial path I give it (which is already present in the #include) will match the file I want to open. In XCode3, I had to create the project in the xcp_dir directory; in XCode2, I could create the project directly into the existing myproject/ directory -- maybe that's why the search is failing?
I read on a previous thread (which never answered the question) that I should set the HEADER_SEARCH_PATHS option. I tried this (setting the option to /Users/andrew/myproject/src) but it did not work.
I don't have any sense of what other options (like the HEADER_SEARCH_PATHS option) are availalbe, so if you know which one I have to set, I'd love to hear it.
Since this is an old question I'll answer it for Xcode 4 instead of 3.
As far as I know Open Quickly doesn't use anything like a search path. It seems to have use the project's codesense index and will show results from that. Querying the database doesn't have an notion of file paths, so the workflow you describe just won't work anymore.
However that's okay, because there's a better solution: Just ⌘+click on the include line and the appropriate file will be found using the same rules as the compiler uses, and opened. If you want to open the file up in an assistant, another tab or window, you can use ⇧⌘+click instead, and you'll get a little UI for easily selecting where you want the file opened.
You can also use these shortcuts to go to definitions for any identifier.
If you don't want to use the mouse you can use the command "Jump to Definition" which has the shortcut ⌃⌘J, or ⌥⌃⌘J to open the definition in the assistant editor. This also works for both normal identifiers and #included files.