Save files to unmapped drive vb.net - vb.net

I have an app that saves xls and pdf files to a drive. We need this drive to be non-accessible by users here because we don't want anyone adding files or deleting files from this drive by hand.
We're considering leaving the drive unmapped on users' machines. If we do this, will I need to use the UNC path when saving files out of my .Net app since the drive isn't mapped on users' machines?

If the drive is not mapped then yes, you need to access it via a UNC path.
However, you should bear in mind that simply not mapping it will not completely stop them accessing it. By default, the app will run under their credentials; therefore anything the app can do, they can also do and vice versa. Even so, if it's not mapped, it will not be immediately visible and this may be sufficient.

Related

How can I give my portable VB.NET application file read/write permissions without Administrator access?

I am developing a portable application that needs to create, modify and read various files (create logs, configs, export .jpg and .csv files, etc.) next to it. This application has to work from whatever directory the user places it into. I don't want to have Administrator access as a requirement, because many people don't have it on their workplace computers, and it can look understandably suspicious. Problem is, Windows usually prevents file creation for applications launched from non-administrative accounts under most directories (like Program Files). I cannot have my application write it's additional files to some other directory with full permissions under any account (like My Documents), because it will defeat the whole point of portability.
Judging from what I've googled I would think that what I want is impossible, but I've seen (and have on my computer) dozens of applications, most of them portable, that do not require Administrator account or access, which can be launched from pretty much any directory, and they read/write files without any problems. So evidently it is possible, but I can't seem to find any information on how they achieve this.
Can someone advice me how to best approach this issue?

Google Drive AppData Folder is not the same on different devices

I have a problem with syncing data on Google AppDataFolder. I install an identical app on two of my devices and check in the Log file. It show that DriveIDs of App Data Folder is not the same. And because the folder IDs are different, everything is different.Therefore my two devices could not communicate data with each others, even that i use the same Google Email account to login on both.
Is it correct with Google Drive AppData Folder? Or i have done sth wrong so that data could not be synced?
I wonder if I re-flash my device with a different firmware, will the AppData Folder ID still be the same? If it's different, then Google Drive solution is completely a waste of time.

Generate file on USB drive that can not be deleted or copied in VB.NET

I need to generate a file on a USB drive. This file should not be deletable or copy-able and must be generated using VB.net
Basically i have a lot of usb drive, on each drive there will be a file with a specific name and i will use this file to detect what usb is connected. I do not need to open it, i will only read its filename. I know that the file can Always be copied by making a 1:1 copy but that is not a problem. I need to do this via a file because it has to work on multiple systems such as Win CE and that system doesnt tell me the USB drive name.
What i was thinking of is to make a file and corrupt it somehow so it cant be copied or deleted but i am not sure that this works. Any suggestion appreciated.
Solved by putting the file in a system folder.. so its hidden

Prevent Isolated storage deletion Silverlight 4 OOB

I have developed one OOB SL4 applicaton for a food chain, and it stores outlet bills locally in isolated storage, and these bills gets uploaded when Internet connection would be available. All is working fine.
But I have seen that if I open silverlight configuration dialogue->isolated storage, can delete the isolated storage of the application. So If there are 1000 bills are pending to upload gets deleted.
Is there any way to prevent the same?, I don;t think so , I know My documents is one more place, but I am looking for alternate way to store data safely?
I tried the Comtoolkit but seems that behaviour is not consistent and not production quality code
As #NestorArturo states it seems there is no configuration to prevent this.
However, an alternative, for an out of browser application is to use the file system.
File system access. Trusted applications can access System.IO types
and related types that are otherwise unavailable to Silverlight. These
APIs provide direct read and write access to files in user folders on
the local computer. For more information, see How to: Access the Local
File System in Trusted Applications.
A third alternative is to write your own COM component; via this technique, you can gain full access to the system.

Where can I store my application's files?

Well, I'm new to the Mac OS X platform and seriously I don't know anything about it. I mean on Windows I just store it at the Program's Files directory, What about the Mac, is there any recommended place to put the files?
Resources related to your application that will not be changed after the app is installed going into the app wrapper (see documentation).
Cached data that can be deleted at any time goes in ~/Library/Caches.
Supporting data that should generally be persisted, but isn't document data, goes in ~/Library/Application Support.
Documents and user data that is primary to the purpose of your app goes in ~/Documents, generally.
Preferences go in ~/Library/Preferences, but are generally read/written entirely via the NSUserDefaults API.
~/Library/Application Support/YourAppName/yourFilesHere
This way the files will be personal to the user using your app. If you want tho files to be global they should be in your app bundle/Resources/
To get the home directory ( the tilde ~ ) you can use NSHomeDirectory or you could use [#"~" stringByExpandingTildeIntoPath];
You can store your application-created / application-deependant files in ~/Library/Application Support/YourApp/Files. Otherwise, user created Documents would most likely be best stored in the Documents directory.