Shortcut Icon disappears when Target points to invalid path (Windows XP) - windows-xp

START
The path to the Icon is valid (Ex. "C:\MyIcon.ico")
The path to the Target was valid (Ex. "N:\My Folder\MyApp.exe")
I did not touch the shortcut file at all
I renamed the folder on the file system (Ex. "N:\My Folder2\MyApp.exe")
Icon disappears (see below)
END
The same situation does not cause icon to disappear on Windows 7. This is a problem because the target in on a network drive, and when user is not connected to network, or VPN, the icon disappears, even if the icon file is stored and referenced locally.
Is this just a problem with Windows XP? Or is there anything that I can do to avoid the icon disappearing when disconnected from network?

I've done extensive testing, and I believe that it's by design in Windows XP to make shortcut icons disappear when the target of the shortcut is invalid.
When the target becomes invalid again, the icon reappears.

Related

Change command line app icon programmatically

I've created a swift command line app for macOS (WITHOUT XCODE, just a simple .swift file), used to build a macOS installer.
When I run the app with sudo swift install.swift, the app is opened with an icon with a terminal app design like this:
Icon
I want to change that icon from the code, would that possible? I'm using Appkit.
You can change the icon by setting NSApplication's applicationIconImage property. That is, if you can obtain an image. Since your program isn't a bundled app, it won't be easy to provide an image with it.
There will be an unavoidable visual glitch when your program exits, though. Its icon will revert to that "exec" icon as it shrinks in the Dock before vanishing. Also, if the icon ends up in the Dock's recently-used applications section, it will be the "exec" icon, there, too. In other words, the icon set programmatically persists only as long as the program runs.
By the way, it's distinctly unwise to run the high-level frameworks with root privileges. It opens a large attack surface that's not really audited for security. You probably want to separate your program into a user app and a privileged helper.

taskbars missing in NoMachine

I use NoMachine to connect to a remote Linux machine. Recently, my upper and lower taskbars have disappeared. The main problem is that, if I minimize a window, I now have no way of retrieving it, since it is typically iconized in the upper taskbar.
The problem occurs regardless of what computer I log in from. I've tried the following things, with no success:
Changed the display options to see if these taskbars were simply off the screen.
Delete the .nx directory in my home directory.
Uninstall and reinstall NoMachine.
Searched for the problem on Google and StackOverflow.
I've had this problem before, and I believe it resolved itself after a number of days, but I'd rather not wait and hope for something to change. Has anyone heard of this problem before?
Alternately, if the primary problem has no clear solution, is there any way of retrieving minimized windows within NoMachine without using the taskbar (e.g. can I access those windows through a keyboard shortcut or the right-click window)?
I've attached an image of my workspace. You can see the outer Windows taskbars, but typically there are two additional taskbars.
Image of my NoMachine workspace.
While I do not know the right solution to make the taskbar appear again, I think I have a workaround solution to retrieve minimized windows without using the taskbar. Switch to the fullscreen mode of NoMachine using Ctrl + Alt + F and then use tab key to switch between open applications. Once the desired application window is back in view/focus, you may switch out of fullscreen mode by using Ctrl + Alt + F again

Can't configure background image for DMG installation using CMake

I am working with CMake 2.8.10.2 on Mac OS X 10.7.5.
I've configured CMake to build a simple application with Xcode that creates an empty window. I then tried to configure CMake to build a DMG installation of the program specifying a background image using:
set(CPACK_DMG_BACKGROUND_IMAGE /path/to/image)
and custom .DS_Store to set windows size and icon placement using:
set(CPACK_DMG_DS_STORE /path/to/DS_Store file)
Xcode will successfully build the application and create the disk image. When I mount the image it comes up with the correct size and icon placement, however the background is always set to white instead of specified background image.
What is needed to get the background to display properly in the disk image?
Unfortunately no one has responded this question. This has been a frustrating experience, however, it looks like I finally solved it so I'm posting a description here to save someone else the grief if they ever have to deal with this.
In order for a background to work on an installation image, basically two things must happen; the background file must exist within the installation image, and the .DS_Store at the root of the image must be configured to use that background.
The .DS_Store file can be configured by mounting the install image in a writable state and then selecting Show View Options from the Finder's View menu. From there someone will select the Picture option for the Background and drag the background file to the placeholder in the Show View Options panel.
When working with CPack, the trick is to be able to drag the image. When someone sets the background for the installation, builds, and mounts the image it will not look like there is any background to drag to the Show View Options panel. If someone goes into the Terminal and does
ls -a
on the root of the mounted install, that command will list, among other things, a file called background.png. This file does not display in the Finder.
The reason this file displays in the Terminal and not the Finder is because it has an extended attributes that makes it hidden for the Finder. Since the file is hidden from the Finder it is not possible to drag the file to the Show View Options panel. Doing
ls -l#
will reveal what extended attributes are applied to the file. There should be only one called com.apple.FinderInfo. Removing this attribute should make the file visible in the Finder. The attribute can be removed using this command from the Terminal
xattr -d com.apple.FinderInfo background.png
After removing the attribute the background file still will not show up in the Finder right away. Someone will have to eject and remount the install image. Once this has happened, the background file should appear in the Finder and someone can drag it to the Show View Options panel, which will cause the background image to display in the Finder window for the install image. After that, someone can copy the .DS_Store file from the root of the install image and apply it to the CPACK_DMG_DS_STORE attribute, and the background image should appear whenever an install image is built.
#TronThomas response helped me out dramatically. Not to supplant his answer, here's some additional information about the process that I just worked through. For reference, this is with MacOS Sierra and CMake 3.6.2.
Set a background image with set(CPACK_DMG_BACKGROUND_IMAGE /path/to/image)
Create the DMG file using the CPack generator DragNDrop
Mount the image in read/write mode using a shadow file hdiutil attach mypackage.dmg -shadow junk.dmg
At this point, we don't see a background image, but one exists in the folder .background in the DMG file. Our strategy will be to use Finder to make the window exactly how we want, then copy out the .DS_Store file.
On the Finder menu, click View->Show View Options
Under Background:, click the Picture radio button. Then, click the image above the text Drag Image Here. Note, the current view must be as Icons otherwise this dialog will not be there.
In the file dialog, go back to the mounted DMG image. Then, press cmd-shift-. This should show the hidden folders. From here, go into the .background folder and select the background image.
If everything has worked properly, the background image should now be visible.
Adjust the windows size and view or hide toolbars as desired on the View menu. The exact settings will be replicated by the installer.
Copy off the the hidden .DS_Store file in the root directory of the volume to another location. The cmd-shift-. trick can be used view the file or just use the Terminal at this point to copy everything. Note, we can change the name of this file to DS_Store, so that it's not hidden when we store it.
Eject the DMG file from Finder. Delete junk.dmg or any shadow files remaining.
Back in the CMakeLists.txt, set the variable set(CPACK_DMG_DS_STORE /path/to/DS_Store) This is the file that we just created and moved off of the volume.
Rebuild the DMG file with CPack. Everything should be as viewed before.
As a warning, there's a lot of information that gets stored in the .DS_Store file such as file locations, user names, and the like. At the moment, I don't know how to control this information, so be a little careful when distributing the final DMG file. If you're curious as to what's in there, use a hex editor like xxd.
As a brief comment, this process is very obtuse. That said, I don't think it's Kitware's fault. Though, they could document the process better. From what I can tell, the .DS_Store file format is not well documented or disclosed, so we're basically forced to use Finder to make one for us. This is a MacOS issue that probably should be fixed.

Objective C - iPhone simulator path is not found in MAC LION

Am using Mac lion for developing iPhone application, there I created database and copied into documents directory of the application, But the path to the applications documents directory not found in my lion, even the "Library" folder is not available under the lion's username.
I searched completely on my lion for the folder Library which has "Application support" following with "iPhone simulator" is not found. I checked for the moving of deletions of the folder, But it's not happened.
Anybody knows for what I can't find the folder.
Please advice me, I not available what can I do to resolve this.>
Thanks in Advance!!!
Your library folder is bydefault hidden so you will have to unhide it.
You can get information about showing hidden files here
Edit1:
You can also go to library in following way
Right click on Finder icon of your Dock
Click on "Go to Folder".
Type `/Users/yourusername/Library.
Click on Go.
Edit2:
you can permanently unhide the folder with following command
chflags nohidden /Users/yourusername/Library
From the Xcode menu on top, click preferences, select the locations tab, look at the build location option.
You have 2 options:
Place build products in derived data location
Place build products in locations specified by targets
By default, your derived data directory will be under ~/Library/Developer/Xcode/DerivedData/AppName/Build/Documents.
Please confirm whether you got ?
You can also check my answer.
See my answer in this post.You should clear your trash folder and reset it.For more detail click below link.
No iphone simulator folder in Application support
Please look at the following solutions: http://helpx.adobe.com/x-productkb/global/access-hidden-user-library-files.html
Apple made the user library folder hidden by default with the 10.7 release. If it's necessary to access these files for Adobe-related troubleshooting, use one of the following methods to make the user library content visible.
Method 1
In the Finder, choose Go > Go To Folder. In the Go To Folder dialog, type ~/Library Click Go.
Method 2
Hold down the Alt (Option) key when using the Go menu. The user library folder is listed below the current user's home directory.
Note: After you open the Library folder, you can drag the Library icon from the top of that window to the Dock, Side Bar, or toolbar. That way, it's readily accessible.
Method 3
The following method makes the user library folder permanently visible.
Note: Adobe recommends that only advanced users use this method.
Launch Terminal from Mac HD > Applications > Utilities. From within Terminal type the following command and press Return:
chflags nohidden ~/Library Enter the system administrator password, if prompted, and press Return.
Note: The System administrator password is not visible as you type it.
Close Terminal for this change to take effect.

Shortcut icon inside a cab file

How do I place the shortcut icon in the cab file? Can anyone shed some light on this? I searched online and found no info about this at all, except a claim that the icon used in the smart device project is automatically pulled into a cab. Well, it isn't so. It got pulled in once and after that when i CHANGED the icon it still shows an old one.
Any clues?
The shortcut icon is the icon from the application itself, so you don't "add" one. Bear in mind that WinMo/Pocket PC caches that icon for the Start menu, so if your app had a different icon to begin with, then you'll probably have to soft-reset the device to get the start menu to pick up the new icon.