How to install file into folder in system drive - installshield

For example, install file 1.txt into c:\my
I have created property named CM in property table, and set value to c:\my, what should I do next?
Thanks

Go to Files and Folders section under Application data in Installation Designer. Click on the Destination folder and create predefined or your own custom folder here. Once done, do the right click on right window and add the desired file.

Related

How to move a Visual Studio Code workspace to a new location painlessly?

I thought VS Code saves all the relevant metadata in .vscode folder and .code-workspace file and as these are contained within the workspace folder I assumed it's all self-contained and shouldn't cause problems when moved. But apparently I was gravely mistaken.
After moving my workspace folder to a new location and altering folder paths saved in .code-workspace file accordingly all my opened editor panes and the bottom panel are gone. What I have now is a nice Welcome window.
I'm aware of what the official guide recommends, but that's only moving .code-worskpace metafile - the folder still stays in place.
I've just run into the same issue. My workspace wasn't saved to a file at all (I just use the "Open with Code" option on each project folder), and the Save Workspace As option didn't help as it just created a JSON file with a couple of empty objects in it (which probably makes sense as I haven't really modified any workspace settings, I just want to preserve my open editors and things like that).
On Windows at least, it seems that those kinds of "workspace" settings are actually stored within subfolders of %APPDATA%\Code\User\workspaceStorage, and an SQLite database file is used to store the actual settings, so this is what I ended up doing:
Move your folder to the new location on disk (close all VS Code windows first)
Open the new folder location with VS Code (you'll just get the Welcome tab at this stage, but we just need it to create a settings storage folder for the new location). Then close VS code again.
Open %APPDATA%\Code\User\workspaceStorage in File Explorer, go into each subfolder and open workspace.json (in any old text editor). In my case at least, it only contains a folder property, which is path of the folder that this settings folder relates to (but just changing this won't help us at all, it was the first thing I tried). Use this to figure out which of these subfolders relate to the old and new paths.
Copy state.vscdb from old to new, and delete state.vscdb.backup in new.
Open state.vscdb in new in some sort of SQLite database file editor (I used DB Browser for SQLite and it worked fine, but there's also SQLiteStudio which looks like it might be better in general).
Run an UPDATE query to update all the paths in the database. They seem to be stored in three different formats/levels of escaping - between folders there can be a forward slash, two backslashes, or four backslashes. In my case I wanted to move my project folder from the root of my Windows user folder into my usual documents folder which is within OneDrive, so my query was along the lines of the following, as I only needed to change the middle section of each path. You might have to do something more complicated if you are moving to a different drive for example (would need to have a look at all the existing paths in the database to see how they are encoded).
UPDATE `ItemTable` SET `value` = REPLACE(REPLACE(REPLACE(`value`, 'User/Project', 'User/OneDrive/Documents/Project'), 'User\\Project', 'User\\OneDrive\\Documents\\Project'), 'User\\\\Project', 'User\\\\OneDrive\\\\Documents\\\\Project')
After saving the database, I just opened the new folder in VS Code, and everything seems to have loaded up exactly as it was in the old location :)
(Also just in case anyone is curious, the subfolder names in workspaceStorage seem to be some sort of hash based on the path, because if you delete the subfolder that relates to a folder you've previously opened in VS Code and then open that folder in Code again, it recreates the same subfolder name. So that means just updating the old workspace.json and database file in-place won't work)
Scenario 1 - Moving the .code-workspace file The xxx.code-workspace file that defines your project folder location(s) is in JSON format. It has a "folders" section and a "settings" section. If you just mant to move the location of the xxx.code-workspace all that is needed is to go to File->Save Workspace As..., browse to the new location, select the name you want to give the workspace and it will save it with a .code-workspace extension. All of the "path" entries in the "folders" section are changed to a path relative to the new location.
Scenario 2 - Moving the entire workspace. If you want to move the entire workspace to a new location and the .code-workspace file is in the root directory of your workspace, just move the old workspace to the new location. The contents of the .code-workspace file will still be correct. Just select File->Open Workspace..., navigate to the new location and open the .code-workspace file.
Scenario 3 - When you .code-workspace folder is stored in a different location. If you store all of your .code-workspace files in a location apart from the actual workspace, the simplest way to move the workspace is a two step process:
With your workspace open, do File->Save Workspace As... and save the .code workspace file to the root directory of your workspace.
Move the workspace to the new location.
File->Save Workspace As... and save the .code workspace file to its location.
Close VS Code and delete the .code-workspace folder that's in the root directory of your resource, so that future settings changes will be saved to the correct workspace.

How do I delete a file using the "Add File Removal"?

How do I delete a file using the "Add File Removal"?
In InstallShield->Application Data->Files and Folders->I go to the parent directory.
Then I right click in "Destination computer's Files and select "Add File Removal".
If I select the "Remove files from the folder" radio button, how do I delete a specific sub-directory (i.e. \DirectoryToRemove, instead of a file?
The folder described by the radio buttons is the one listed after Location (the blacked out part of your screen capture). You can either remove files from the location in question, or the folder itself. If you want to remove a child of that folder, you will have to add a file removal to that folder, perhaps adding the folder first.
This is built upon the RemoveFile table, which is the source of the requirement that a folder be empty if you want to remove it. However if you go directly to the table, you can avoid creating a directory entry for a subdirectory by referencing a Property instead of a Directory. (If you go that route, note you will then have to ensure the referenced property has the correct value.)

Total Commander How to feed list listbox with selected files

Just like Search result can feed the listbox (which opens new temporary tab),
is there a way to:
simply select files from one directory and feed the listbox?
select files from multiple directories and feed the same listbox?
Just to rename listbox's temporary tab and you could have favorite list of items over which you could perform more actions. This would increase productivity tremendously!
Regarding #1:
After you select the files activate:
Menu > Show > Only Selected Files
Regarding #2:
It's probably not what you were after, but you can use DiskDir / DiskDir Extended to add files (using a packer functionality, so you create an 'archive' file with extension .lst which contains a hierarchical list of the added files. You can then change source folder and then add more files. Later you just click on the .lst file and it looks no different then your normal file / folder list. Unfortunatelly you cannot rename the files, but you can launch them, with an extra confirmation.
UPDATE
Similar functionalitybut with 'source' renaming functionality limited to one file only (?): Virtual Panel, (File System Plugin, accessible through the Network Neighborhood 'drive'). It can launch files without a confirmation window. Rename 'source/target' file when you use it's own subbar (located here: %%COMMANDER_PATH%%\Plugins\WFX\VirtualPanel\EN\VirtualPanel.bar, make sure that you also have installed the AskParam addon and have paths in the VirtualPanel.bar right (both to AskParam.exe and VPBatch.exe). 'Regular' rename will change the file name only in the virtual panel.
URL: Virtual Panel Plugin

Setting up an icon for start menu folder group in InnoSetup

To my surprise I did not find the solution how to set up an icon for the start menu application group folder laying ahead. I am looking for the automatic solution in InnoSetup script.
Thank you in advance.
Create the desktop.ini file with the content like this if you want to use the *.ico as a resource (where c:\somepath\icon.ico is path to your icon):
[.ShellClassInfo]
IconResource=c:\somepath\icon.ico,0
Or create the desktop.ini file with the content like this if you want to use the icon from the executable as a resource (where c:\somepath\program.exe is path to your executable):
[.ShellClassInfo]
IconResource=c:\somepath\program.exe,0
Save this desktop.ini file into the directory where you want to apply the icon. One very important note, you have to set to this newly created file attributes Hidden and System, otherwise it won't work!
So please check very carefully if the InnoSetup won't clear these attributes if you'll have the file included in your setup package while installing.

Coredata: opening an xcdatamodeld file

I have a single xcdatamodeld file and would merely like to open this particular file with xcode. However, when I double click the file, it doesn't really show me anything or allow editing. The only way to do this is to run MyApp.xcodeproj and only then can I modify this file. Isn't there any way to edit the coredata file using only the xcdatamodel file? Thanks!
The xcdatamodeld file is not actually a file - it's a directory containing other model files.
Right click the file, choose Show Package Contents and you will get access to the files inside the directory. You can then double-click those files. When I do so I get just the Xcode model editor without the full Xcode project window.

Resources