Open a file (.mdb file in Access) in VB.NET - vb.net

I want to open a mdb file through VB.NET
Currently, I use:
retval = shell("explorer.exe " & filename)
where filename includes the path.
It should open the mdb file in Microsoft Access.
This works fine on Windows 7 (my system), but when I try it on Windows XP (client machine) it comes up with the file download security warning dialog asking to Open, Save or Cancel. If I click Open it presents the same dialog but now with Save and Cancel only.
I am sure there is a quick and easy way to open a file in its proper program through VB.NET. I know I can open the database using Interop, but I don't want to go down that route.
Thanks

You can use Process.Start to launch a program. Some good examples here: http://www.dotnetperls.com/process-start-vbnet
For example:
System.Diagnostics.Process.Start("database.mdb")

Related

Multiple Users Open Same File and Overwrite Work

Operating System: Windows 10 Pro
When I have a file open, my coworker can open the file and does not get notified that the file is already opened or locked. He can work in the file and save, and it overwrites my version. Then when I go to save, I get notified that the file was 'modified outside of Illustrator, do I want to continue?" If you click yes, it overwrites his work and his work is lost. Is this a bug that it does not indicate that the file is already open by another user?
Do you open the file from some kind of NAS server inside your office? Yes everyone can open such file with previlleges, and store their own respective cache. But when it comes to saving/overwrite current file it would produce such error. My solution would be saving your current work as different filename.
Maybe such feature should added by Adobe team, not only in Adobe InCopy where you can contribute to edit to one file simultaneously by different users.

Photoshop - simple Open File action on MAC

Could anyone send the ATN file with only one action -> opening PSD file on Mac?
I've made an action with a lot of steps, it's working good but only on Windows. There is no relative paths in PS actions, and i have no friend that has Mac. Could anyone prepare ATN file (so i will be able to copy "open psd file" step)?
Regards,
Luke
Short answer: this won't work. Even though Photoshop has "shortcuts" paths that are similar for both OSX and Windown (like ~/Desktop is a shortcut for desktop folder no matter of OS and username), Actions don't seem to recognize them. Furthermore, if you record an Open Action on Windows or Mac and open it in a different OS, you'll get a File or folder not found message for this step:
Here're two examples. In bot cases the top Action was made in Windows and the bottom one on Mac. This is a Mac screenshot:
and Windows:
Notice how Action1 on the Mac screenshot has File or folder not found message and on Windows there's the same message for Action2 from fromMac set.
Here's what you can do though.
insert Open as a Menu Item. This way user will be asked for a file you need every time a user calls the Action.
give the file you need to open as a pattern file (.pat) and ask a user to install it. This way you can fill a document with it using the Fill command.
most powerful: use a script. You can convert your action to a script file using the xtools: there's a script within it called ActionToJavascript: this will give you a .jsx file that you can use in Photoshop and that will work exactly as your action. And in this script you can specify a path for your action. Like here I'm specifying a file on my Desktop:
And this script will work on Mac.

Issue opening pdf from VC++ application

I am currently using
int nRet=(int)ShellExecute(NULL,
_T("open"),
_T("\"")+cPathToFile+_T("\""),
_T(""),
cDir,
SW_SHOW);
to open a pdf file from my VC++ application. The file opens correctly but then if I try to open another file from the explorer it doesn't show up. If I close the previuos opened file then all works correctly, as if the application was "locking" the pdf viewer.
Is this a normal/known behaviour?

LabVIEW application builder (Installer)

I have a problem with LabVIEW installer. I have a database which I communicate with using a udl file via LabVIEW. I also have other files for saving passwords etc. when I make setup file and install my program, I can not write to my files because they become read-only! I put .exe file in program file and my supporting files and database in Program Data.
The .exe program returns no error but does not write any data into files! what is the solution
Are you putting the database under "Program Files"? Try putting it under the user or public documents folder and you should be OK if that was the problem

Automate open dialog box

Is there any way to automate a opening files with open dialog box on Mac OS? The application asks user to open files with the standard open dialog box. But I need open files automatically.
The idea is to write script or a small application which will click the button in the target application to open dialog box and then somehow select files which I needed. But I don't know how can I do it. Any suggestions will be very appreciated.
If you already know what file(s) you want to open, then the open file dialog box is usually bypassed completely by the target application.
You'll have to look at the Dictionary for your target application to see if the Open command is defined. If an application is scriptable, then that's going to be one the basics, though each implementation will vary slightly.
If an application doesn't have a Dictionary, you can use the Finder to open the file:
tell application "Finder"
set theApplication to "Path:To:Application.app" as alias
set theFile to "Path:To:File.ext" as alias
open theFile using theApplication
end tell