open shared folder from web application - html

I have one in house Perl web application (Windows OS), and I need to find the best way to open shared folder from my application with user default file explorer. I prefer some Perl module or some cross browser method (I don't know what browser would be used by user).
I tried with file:/// but I am searching for something better.

If what you are trying to achieve is something like accessing a file on a samba share, I would suggest simply using UNC paths (\yourserver\shared_folder\filename). If you point to an actual file it will be opened by the default program associated with that extension in Windows. If you point to a folder, the windows explorer would open up in that folder, as if you typed the UNC path in a start -> run dialog box.
So in perl this would be like below, if your shared folder is on server named "phobos" with a share "movies".
system('\\phobos\movies'); # mind the quoting!!
If you were trying to open up a file in the default program in windows you would use something like:
system('\\phobos\movies\my_cool_movie.avi'); # mind the quoting!!
Is that what you mean with your question?

Related

Windbg symbols for Windows XP

So I have a problem getting symbols (such as ntdll.pdb) for Windows XP x86.
I know that in the past you could download these symbols, but today you can only do this from the microsoft servers like mantioned here
The problem is that my XP machine can't access the Internet. Is there any way to get the symbols offline? Maybe someone here has symbols in "c:\symbols" and can upload them?
Thank you very much
You can use SymChk from a WinDbg package compatible with Windows XP to generate a manifest file on the offline machine, then use that manifest file on another machine with Internet access to download the symbols. Quoting from the Using a Manifest File with SymChk page:
In some cases, you might need to retrieve symbols for files that are on an isolated computer; that is, a computer that is either not on any network or is on a network that has no symbol store. In that situation, you can use the following procedure to retrieve symbols.
Run SymChk with the /om parameter to create a manifest file that describes the files for which you want to retrieve symbols.
Move the manifest file to a network that has a symbol store.
Run SymChk with the /im parameter to retrieve symbols for the files described in the manifest file.
Move the symbol files back to the isolated computer.

Chrome Extension edit source file

I have a chrome extension that is installed via "Load unpacked extension," and I am trying to get it to delete itself or at least change its source code when a function is called. I have the chrome.management.uninstallSelf down, but I also need the source files for it to become changed/gone. Basically, I need the chrome extension to open the local file where its source is located and then delete/change some of the files inside it. Is there any way to do this?
Basically, I need the chrome extension to open the local file where its source is located and then delete/change some of the files inside it. Is there any way to do this?
No, this isn't normally* possible.
Chrome extensions have only read-only access to their own files (via chrome.runtime.getPackageDirectoryEntry or requests to chrome-extension://), and no access at all to the rest of the filesystem.
* All bets are off if you have a Native Host module though. It can do whatever, but would greatly complicate installation.

How to load local resource in Chrome App

In my Chrome App,I want to load local resources such as audio from user's disk.
If I add the absolute path in my code, the Chrome says "not allowed to load local resource"...
So,how to achive it? Thx
Please this is app not extension.
Chrome Apps are not allowed to access the user's file system directly. file:// URLs are forbidden, as are all the other ways you might try for accessing a file like /home/user/music/demo.mp3. This is by design (so users can install a random Chrome App and trust that it isn't going to read or write their files).
However, Chrome Apps have several APIs available for accessing sandboxed file systems. Since your example is an MP3 file in /home/user/music, you probably should use chrome.mediaGalleries, which will prompt the user for access to common media directories (like /home/user/music) at install time. Then you will be able to access certain file types in certain directories, and prompt the user for music and images in other directories.
As sowbug suggested, you could also use chrome.fileSystem, where you can prompt the user to open a file or directory of their choosing. This will give you access to all files in those directories, but you should only use this if you want non-media file types.

How to allow-file-access-from-files in Chrome?

I am using Chrome to test some of my WebGL texture programs. According to the book 'WebGL Programming Guide', if I need to access files from my local disk, I should add the option --allow-file-access-from-files to Chrome.
How do I do that?
The short answer is DON'T
Open up a shell/terminal/command line and type
cd path/to/htmlfiles
python -m SimpleHTTPServer
Then in your browser to go
http://localhost:8000
If you find it's too slow consider this solution
The reason you don't want to allow file access is allowing it can be used to steal data from your machine. For example, you go to a site and download some webpage. You then view that page locally. With file access on that locally run page can now access all your files AND upload them to a server.

Windows Phone 8 isolated storage

Is it possible to physically copy files to Isolated Storage using the ISETool? I'm trying to add a text file into Isolated Storage and then, through code, check if that file exists. When I do this, I get a "File does not exist" error.
If I add a file to Isolated Storage in code, it works successfully and I can access it in Isolated Storage via the ISETool to copy it to my PC.
Consider scenario 2:
I add a file into Isolated Storage in code, and then using the ISETool get it back to my PC. Without modifying the file, I place the SAME FILE back to Isolated Storage and try to open it through code, I see the same "File does not Exist" error.
You haven't said how you're writing files to Isolated Storage.
Instead, consider using something like Windows Phone Power Tools for this as it makes it much easier to work with files in Isolated Storage.
According to this MSDN article, you are able:
...to replace the files and directories in an app’s local folder on an
emulator or a device with files and directories from your computer....
Steps:
Deploy the app that you want to test to the emulator or a device.
Get the Product GUID for the app specified in the ProductID attribute of the App element of the WMAppManifest.xml file.
Open a Command prompt window and navigate to the location of ISETool.exe.
To replace all the files in the app’s local folder with files from your computer, type the following command using the Product GUID obtained in the previous steps and specify the source directory on your computer.
ISETool.exe rs <xd|de> <product-id> <desktop-path>
The following example shows a command that replaces the files and directories in an app’s local folder with the files from the directory "C:\Data\My Files" on your computer.
ISETool.exe rs xd 11111111-2222-3333-4444-555555555555 "C:\Data\My Files"
Hope this helps!
yes it is possible to copy to and from isostorage of phone or emulator
try this to upload or download files into iso storage
for wp8.1 only
https://isostorespy.codeplex.com/
for wp7
Windows Phone 7 Isolated Storage Explorer
for wp8
Windows Phone Power Tools