Access VBA API cannot access files on Windows 8 - ms-access

Solution: Turns out this win 8 machine was hiding known file extensions. Both of my test files ended up being testing.txt.txt and testing.pdf.pdf which of course would fail when I tried to find testing.txt.
For some reason any part of the VBA api that does file operations fails on my system running windows 8, but succeeds on windows 7 (both running Access 2013).
I was trying to use the FollowHyperlink method as a simple way to open a .pdf file. So I started simple:
FollowHyperlink "C:\TestingFolder" - Yields an explorer window opened to the path (great!)
FollowHyperlink "C:\TestingFolder\foo.pdf" - Yields Error 490 Cannot open the specified file
So then I tried the Filelen function and got another error that it could not access the file.
I ended up at the conclusion that any operation that actually accessed a file would fail, likely due to some security setting. The fact it works on Windows 7 and not 8 seems to indicate that something at the OS level may be at fault.
Resolutions I tried:
Ran Access explicitly as administrator
Moved files into user directories and out of root
Went into the Access Trust Center and disabled all security measures (temporarily)
Tried different file types (.pdf, .txt)

Your problem is not the Windows API, but the installation of the software. The FollowHyperlink, uses the system registry where the file type association is involved. If PDF files are associated with Adobe Reader and you have it installed and made PDF to be, by default open with Adobe then you will not have a problem. However if your system lacks the program that could open a file with a "creepy" extension then it will fail miserably.
Your solution is to find the appropriate program to open the file. Then use the code, it will open the appropriate file with its associated program.

Turns out this win 8 machine was hiding known file extensions. Both of my test files ended up being testing.txt.txt and testing.pdf.pdf which of course would fail when I tried to find testing.txt.

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 : unable to read local files by using `-allow-file-access-from-files `

Introduction
Honestry,I'm not native English user,so my English is not better.
If you have any question, ask me by comment.
what I wanna do
As a premise,when you try to access local files by web site link,IE or FireFox can access( by simple setting) ,but Chrome can't access for their security poricy.
I found the ways to do this, like below:
add --allow-file-access-from-files option when you execute chrome.exe
build a local server like nginx or Apache HTTP Server,which meditate to access local data
Use chrome extentionEnable local file links
Due to business restrictions,I should resolve this problem by method 1. but I can't enable loacl data link though I set option correctly.
I googled why I can't,but I couldn't find why it won't work.
(In the first place,I can't even find Google official description of --allow-file-access-from-files.How predecessors find that method ... )
While searching、I found person who have the same question、Google Forum.
I'm convinced that this is not my simple miss,but more deep problem,so I decided to make this question.
what I tried
I rebooted computer,killed all process related to chrome,then change directory where contains chrome executable file,and execute chrome.exe --allow-file-access-from-files
I rebooted computer,killed all process related to chrome 、create shortcut on my Desktop ,which destination is "/path/to/chrome/chrome.exe"--allow-file-access-from-files
After execute chrome,I checked chrome boot option to accesschrome://version/.Both method, I could boot chrome by add --allow-file-access-from-files option,but can't achieve first purpose to access local file access.
what I wanna know
lacking or similar to --allow-file-access-from-filesoption、
(solution similar to method 2 or method 3,like "Give up option solution,and use nginx as local server" is unnecessary)
or other solution
Additionary,if you know below info,please teach me.
- Google official documentation which descriptionsallow-file-access-from-files
( Indended to Oracle official Javadoc of Java.)
Using Tool
Chrome Version : 78.0.3904.87
OS : WIndows 7 SP1

Can't execute setup.py (Error 5 - Access Denied)

I ran into a problem creating a new project in Cocos2d-x 3.1.1 (or 3.0 - it happens at both versions).
When I'm running the build script in console (Windows 8 - console with admin privileges) an WindowsError pops up (check the image below).
http://i.imgur.com/Ixg4jEE.png
I can set up the COCOS_CONSOLE_ROOT manually, but it does not help with the Error 5.
I tried setting the 777 priviligies an all cocos2d-x folder and subfolders, but it does not help.
Anybody had the same problem? Any solutions out there?
On Windows you should not put manually installed programs and tools under C:\Program... (english: C:\Program Files) because that's a folder where only apps with a proper installer should go. Otherwise you will keep having permission issues. Apps are not allowed to write to that folder or any of its subfolders.
Since cocos2d-x isn't an app, it can't redirect its output to the proper AppplicationData folder as is mandated by the operating system. Not being able to write or modify the program folder's contents (except during installation) is a security feature in Windows that you can't (or shouldn't) bypass.
To fix this simply extract cocos2d-x in a folder that both you and apps have full read/write permission. Normally this would be in your Documents folder, but Desktop would also work and probably just any folder on a drive that you created, for instance C:\cocos2d-x.
Due to this line:
_winreg.SetValueEx() ...
the actual problem looks like to be with registry access, rather than with file permissions.
Make sure you actually running console as an admin, by:
searching cmd in Windows search, or just creating a shortcut to it to desktop
right clicking to cmd.exe and choosing "Run as administrator"
Make sure you don't have registry access block in any way: like blocking in group policies, some "security optimization" software and viruses and antiviruses.
Make sure your python version is 2.x. Python 3.x is not supported.
Anyway, this 'setup.py' step is optional for using cocos2d-x and you can live without running it at all.

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

open shared folder from web application

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?