Google Docs created by others in shared folders become symbolic links - windows

I have created a Google drive folder which is shared with others. I am trying to take regular backups of whatever docs are created in that folder using xcopy. While uploaded files are getting backed up, created files such as docs etc., are not. Command line throws the error "target folder does not support symbolic links".
I tried changing privileges in windows administrative tools to include other users to be able to create symbolic links but still it didn't work. Help please!!

Related

WS2012R2: Symlink from a network share to another network share?

I have a question according to creating symlinks on network share which link to another network share.
The Windows clients in our company have a network drive mapped on J:\
the UNC path is \\DataServer01\network
previously, there was some kind of a symlink in the network directory called "import" (so the UNC path was \\DataServer01\network\import), which was linking so \\ERPServer01\share\import.
So the users could go to their mapped network drive on J and put a excel file into J:\import - so the excel file was put to \\ERPServer01\share\import in reality.
Accidentaly, the symlink was deleted by another admin. Now I was trying to recreate the symlink using
mklink /d import \\ERPServer01\share\import
And so far the symlink was created, and you could access it from the DataServer01. But - you can't access that symlink from the network drive J:\. If you try this, you receive the error that the symbolic link cannot be accessed. I googled a lot and the reasons why this concept couldn't work (links are resolved relatively by clients) was quite plausible.
The thing is, my predecessor got it to work somehow, he somehow managed to create a proper "symlink" or hard link or something similar. How the hell did he managed to get it to work? Unfortunately I can't ask him.
There is also no DFS in use. It must have beed some other method.
I have to recreate it exactly how it was, because I don't want to explain to 300 users why they have to put their excel sheets in another directory now. And I don't want to map another network drive.
Any ideas?
Possibly it wasn't a symlink before (checked your backup?). Alternatively, you can create a "magic" Explorer folder:
create an empty source folder
inside the source folder, create an Explorer link to the target folder named target
inside the source folder, create a desktop.ini text file with the contents
[.ShellClassInfo]
CLSID2={0AFACED1-E828-11D1-9187-B532F1E9575D}
flag desktop.ini as System and Hidden
flag source folder as System
An Explorer magic link folder looks similar to a symlink but only works with Windows Explorer whereas a symlink works with (nearly) everything, once activated through GPO.

Sync a directory to Google Drive from outside the Drive folder

Context
I am trying to have the resources directory of a project sync itself to Google Drive as a means of backup, without having to physically move it into the Drive folder, and while maintaining full tab completion and access via the terminal from within the project. I'm on OS X.
The project is stored in a separate portion of my filesystem dedicated to GitHub repos, but I don't want to store all of the media (it's a vision project) on GitHub.
Now, the simplest solution is to alias the resources directory, move the original to the Drive Folder and access it via the alias within the project. However, accessing the resources via an alias in the terminal appears to break not just tab completion, but actual access to the media...
Eg: ./program input=resources/video.mp4
...where resources is an alias of Drive/resources, fails. And I'm afraid my understanding of aliases, symlinks and hardlinks isn't deep enough to see why.
Questions
Is there a way to sync the a directory to drive without physically moving the original directory to Drive/, such that I can leave my project filesystem untouched.
OR
Is there a way to maintain normal path behaviour and tab completion with an aliased directory? eg: ./program input=Project/res_alias/video.mp4. If so, the Drive issue is null and void.

How to make WIX create files to Program Files folder in the installation? I have "Access defined"

I am creating a WIX installer project. During one managed customized action, I need to create a file (other than the deployed files specified in the components of WIX) in the installation folder, which by default is the Program Files folder. I am experiencing the "Access denied" problem in Windows 7. After some searching, I found out that people say it is not advisable to create files into Program Files folder. Instead, try to create files into for example AppData folder. For example, see this link:
C# Access denied to path in a Windows Application
But my question is, the generated file is crucial to our SW, so it must reside in the installation folder. Isn't it the target of SW installation, I mean, to create file in most of the cases Program Files folder? Does it mean the only files should be added into installation folder, during the installation, are the deployed files (basically the targets of XCopy)?
My file can't be made deploy-able in the WIX, i.e, it can't be made ready before the installation. So what's the proper way or best practice to handle such situation: a file must be generated during the installation, into the installation folder. It is not some log file that I can put somewhere else. I tried to create a Permission element in WIX for the INSTALLADIR, although it seems to be against the rule mentioned in the link, but it still failed. Thanks!
UPDATE:
Based one MichaelUrman's commen, some more information. The generated file is needed after the SW is installed and necessary during normal launch of the SW. And I think it needs to be modified during normal use after the installation. And as I mentioned my a comment to #caveman_dick answer, my CA is actually in commit phase, I don't know whether there is any difference between it and normal deferred CA
Set the custom action to Execute="deferred", that will run the command elevated and should give it the required permissions to create the file.
Since you need to update that file from the main application, and I'm assuming your application does not require elevated privileges, you have three options.
The first is the worst: without a manifest, your executable's attempts to write to the Program Files folder will typically result in it being redirected to the Virtual Store (see File Virtualization). It sounds like this isn't happening in your case, so you can't use it.
The second option is to modify the application to store this in an appropriate location such as the ProgramData folder, or Common Documents, or (if appropriate) a per-user location under LocalAppData. This is typically the best approach, but has the highest development costs.
Finally the third option is to create the file and change its permissions (or in some cases to change the permissions on the folder containing the file), allowing limited users to modify this file. See LockPermissions or MsiLockPermissionsEx for the Windows Installer way to approach this. Change the permissions on as few files or folders, as restricted as possible, to keep the system as safe as possible if you go with this option.

How do I show a target name for an unavailable symbolic link?

I have added support for Windows symbolic links in our application using the CreateSymbolicLink function. Our application stores data across a set of actual folders. Our users needed to store some folders outside of one main root folder. The solution we chose was symbolic links. This lets them do things like keep a subset of data in DropBox or stored out on a network drive. So far everything has been working great.
When using Windows Explorer, Windows will show the following message if the link target is not present. This could be caused by a target being renamed or a remote network drive not being available.
Location is not available
C:...\MyLink refers to a location that is
unavailable. It could be on a hard drive on this computer, or on a
network. Check to make sure that the disk is properly inserted, or
that you are connected to the Internet or your network, and then try
again. If it still cannot be located, the information might have been
moved to a different location.
I am trying to duplicate this check and add the target location so users can tell why no data is present.
A normal directory exists check is not sufficient because the symbolic link is present on the system. I have worked around this by calling CreateFile to open the folder. This causes the target location to be opened instead of the symbolic link. This does fail as needed for my check. Now I am stuck trying to get the target path that the link points to.
I have found this answered Stack Overflow question for reading the Target Location from a symbolic link.
- How do I programmatically access the target path of a windows symbolic link?
However that answer requires a valid handle from opening the directory. In my case I want to find the name for a broken link to help with trouble shooting and fixing the link.
How can I get the target location of a symbolic link without a valid handle?

Mac OS folder locations

We have an application that we're porting to Mac OS from Windows. Once installed, the user can customize the functionality of the application by editing certain approved "data files" with a text editor. Once saved, the application can be reloaded to compile and load the contents. A core part of the program is the editing and sharing of these data files, and the program provides a friendly interface to allow the user to edit them.
On Windows, these folders are located under a standard folder, accessed through a shell constant, that our installer makes accessible to all users. Once installed, any user can run the application and edit the data files it uses.
What is the equivalent folder to use for the mac? Is there somewhere we can put stuff that is accessible to all users normally, or do we have to flag it as "all users can access" somehow?
Edit: A couple of users have suggested /Users/Shared. Aren't files in /Users/Shared still limited somehow to the user who created them? I remember trying to copy files between accounts in /Users/Shared, and I had to "take ownership" of the files in /Users/Shared before I could do anything with them.
Read this document. It has a section on where to put application files. I doubt /Users/Shared is the right directory for what you want to do; a subdirectory within /Library/Application Support/ is probably more appropriate. Remember, though, that non-admin users will not be able to write there by default. In that case, you can fall back to using the corresponding directory in the user's home folder.
Don't hardcode paths to special directories. Rather, you should use the NSFileManager methods URLsForDirectory:inDomains: or URLForDirectory:inDomain:appropriateForURL:create:error:, or the Folder Manager from Carbon if you're not using Objective-C.
/Users/Shared on a Mac is a folder available to any user. Hope this helps.
Use /Users/Shared/your_application_name .

Resources