Get path to file (e.g. picture) in android device (e.g. cell phone, tablet...) from vba access form - vba

I need to get path string to android device or its SD card as be able to copy or get some files(e.g. pictures) to process further...
As I didn't find not so menu samples about...
I tried go get the file with file dialog f = Application.FileDialog... but the directory has not been showed in the dialog.
I follow some samples to get getExternalFilesDir(... but I get Sub or function not defined error message.
Simply I need to get file from let say this address:
Computer\HUAWEI M2-801L\Internal storage\DCIM\Camera\12.jpg
I tried to use Environ() go get external directory but I didn't success to open folder.
As well I need to count items there or choose the latest record etc in that directory etc.
I tried to work with WIA COMMON DIALOG but I stuck over there as well
please anyone to help

Related

How can I make my Voice Assistant launch the apps?

I am working on a Voice Assistant.
I need to allow it to launch apps, how can be found the path of the apps to launch them?
Your question is quite minimal but I can attempt to answer it for you.
Assuming that you're using windows 10, with Word for example, you would type in word using the indexing feature at the bottom left of your desktop. Then you would click the down arrow to reveal more options. Then you would click open file location. The address at the top of your explorer will show the file location.
If you want to open another exe (or compatible software) in a known location but is not available to index, you would open your explorer and navigate to the desired application. Copy paste the address at the top of the explorer window.
You should import subprocess to your code and when you need to open the app write subprocess.check_output("file location", shell=True)
For example:
subprocess.check_output("C:\\Test\\Test\\Test\\application.exe(or .lnk or something u need)", shell=True)

My goal is to launch a file using vb.net via the click of a button

My goal is to launch a file using this in vb.net via the click of a button..
System.Diagnostics.Process.Start("X:\Desktop\Brutal Doom\PLAY ME BRUTAL DOOM!!!.pk3")
Which works, however as soon as I move to my laptop or another computer the button can no longer find the file as the drive letter has changed.. is there a way to code this so that it is no longer dependable on the drive letter and only will see \Brutal Doom\PLAM ME BRUTAL DOOM!!!.pk3 thus working on whatever computer I put the folder on...
Are you basically looking for this? How to get a path to the desktop for current user in C#?
ie System.Diagnostics.Process.Start(My.Computer.FileSystem.SpecialDirectories.Desktop & "\Brutal Doom\PLAY ME BRUTAL DOOM!!!.pk3")

How to load a video permanently into a project

If you add a picture into a project, then remove the picture from it's original source, the picture is still in the project even though it doesn't exist in its original location.
I want to do the same thing with a video.
How can I add a video to a project in such a way that it can be deleted from its original location and it will still exist in the project?
I guess what you are looking for is dynamic ressources and not static(local) ones. You can input them by drag&drop into your solution explorer or if you double click on your project in the solution explorer the project properties open - there you have a tab called ressources where you can input any kind of ressources.
If you dont know how to play a movie within a VB Form - here is a tutorial on YouTube.

how would i move a folder or the contents from one place to another Via code in Xcode?

Im trying to make a mac app that copies and pastes a folder to another location but i can find a tutorial on how i go along and make an app for the mac what its per pose is A app that makes it easy to move mod files to a games file system. Yes i know theres lots of apps that goes the same but i want to make my own. The structure is theres six NSTextFields three for the mods folders and three for the games folder system like (Mod's Parts Path, Mod's Plugin Path, Mod's Plugin Data Path, Game's Parts Path, Game's Plugin Path and Games's Plugin Data Path). Ive looked on stackflow and Google and couldn't find on tutorial on how to do this maybe im looking in the wrong places. The game that its manly for is for KSP (Kerbal Space Program)
What did you googled? You will need a simple gui application with 6 Labels, 6 TextFields and one Button. There will be one function linked with that button. That function will use data from TextFields and NSFileManager's copyItemAtPath:toPath:error: method.
Google something like "osx first app" or "xcode TextField tutorial" for the details on how to create an app with TextField and Button.

How do you run another .exe from VB.NET as another User?

How do you run another .exe from VB.NET but as another User?
I expect to launch a .exe like "Left Click -> Run As -> Enter User/Pass -> Click OK"
If I do that, my application runs as expected (I need to run it as another user to get access to some folders in the network)
But if I use this in VB.NET
System.Diagnostics.Process.Start(System.Windows.Forms.Application.ExecutablePath, PARAMETER, USER, PASSWORD, DOMAIN)
The application runs with the other user.. but Excel (inside my App with Interop) fails to open the file in the restricted folder.
(I run again the same app but with a different user, just to avoid creating more .exe files... but I already tried with vbScript)
Again, Process.Start FAILS to open excel using the other User... but Left Click -> Run as succedes at that... why?? another way??
this is what the app does:
Open the app
check if there's a parameter
if no parameter, then relaunch the application with the other user and send some parameter
if there is a parameter open excel
open a xlsx file
but if I double click... Excel opens... uses 50% CPU, and gives me the error that it can't open the file...
if I run it directly with the desired user and pass... everything executes fine
Any suggestions as how to solve this? (impersonate works fine.. but it opens Excel with the actual user.. not the one with rights)
Thanks!
If you get "Handle is invalid" error, you should try something like this:
dim info As New ProcessStartInfo("...")
info.UseShellExecute = False
info.RedirectStandardInput = True //This is the key
info.RedirectStandardError = True //This is the key
info.RedirectStandardOutput = True //This is the key
info.UserName = "username"
info.Password = "password"
Using (install As Process = Process.Start(info))
Dim output As String = install.StandardOutput.ReadToEnd()
install.WaitForExit()
End Using
Specifying any one of
RedirectStandardOutput=true, RedirectStandardError=true, or RedirectStandardInput=true
causes the process to be launched with STARTF_USESTDHANDLES. If your process does not have any of these handles, then CreateProcessWithLogon will fail with "Invalid Handle".
You MUST redirect it (even if you don't intend to write anything to it).
Regards
This is really interesting. By default, I believe the Excel COM components are set up to run as the Interactive User (ie the user logged into the box). If they are configured to run as the Launching User then impersonation should work. Of course, this does not explain why "Run As..." works (I don't know the mechanics of that so perhaps it's not impersonation).
One idea is to restructure the application to copy the files to a location Excel can access, manipulate them, and then copy the back.