Running a program on the flashdrive

You need help to start using UVK? You have a doubt on a UVK feature? Post here!
Forum rules
We have no special rules for UVK forums. Just try to be polite and clear in your posts.
Please don't post spam in this forum. Spammers will be banned by IP, e-mail and username.
We reserve the right to delete all posts and ban all users we consider not having respected these rules without warning.
Post Reply
FredJClaus
Posts: 323
Joined: Sat Dec 06, 2014 6:21 am

Running a program on the flashdrive

Post by FredJClaus »

Ok, here is something I've been lookin to do for a while. I love UVK but it doesn't do everything I need. That being said I run another program on the flash drive called JetClean.

Is there a way to click a button and instead of downloading JetClean from the web, it runs the exe file on the flash drive and runs the program?
Fred
Site Admin
Posts: 2357
Joined: Sat Jul 30, 2011 12:05 pm
Location: Red coast, France
Contact:

Re: Running a program on the flashdrive

Post by Fred »

Hey, FredJClaus.

Yes, there is, and it's pretty well documented.

You have the %InstallSourceDir% environment variable. This variable expands to the directory from which UVK was installed.

Take this example: Put UVKPortable on the flash drive, and also jetclean.

Run UVKPortable. From now on, %InstallSourceDir% will always be the path of the flash drive, so you can use it in UVK scripts or custom third party apps.

Example of a script:

Code: Select all

<RunWait>
%InstallSourceDir%\JetClean.exe
Example of a Third party app's command:

Code: Select all

%InstallSourceDir%\JetClean.exe
One thing we humans have in common is that we are all different. So, if you think you're weird because you're different from everyone else, then we are all weird.

Fred
FredJClaus
Posts: 323
Joined: Sat Dec 06, 2014 6:21 am

Re: Running a program on the flashdrive

Post by FredJClaus »

Ok so installsourcedir is the flashdrive. If JetClean is in a folder on the flash drive called JetClean, I would type it this way? %installsourcedir%\jetclean\jetclean.exe. ?
FredJClaus
Posts: 323
Joined: Sat Dec 06, 2014 6:21 am

Re: Running a program on the flashdrive

Post by FredJClaus »

My apologies Fred. I got to thinking after you posted "it's very well documented". After looking back at your site, I remembered the Online Help section and found the documentation you were referring too. You were correct, it was very well documented. If I had just looked there, I would have been able to figure it out for myself. Thanks. I do have them saved now.
Charger440
Posts: 1529
Joined: Sun May 25, 2014 7:44 am
Location: Missouri

Re: Running a program on the flashdrive

Post by Charger440 »

Fred claus, I have done that too, just ask Fred. Actually, if I aint mistaken, I was the that suggested Fred add installsourcedir. I only mention that to show Fred does regularly add our ideas to UVK :)
Jim

It is not "Can it be done?" but rather, "How can we do it?"
Fred
Site Admin
Posts: 2357
Joined: Sat Jul 30, 2011 12:05 pm
Location: Red coast, France
Contact:

Re: Running a program on the flashdrive

Post by Fred »

FredJClaus wrote:Ok so installsourcedir is the flashdrive. If JetClean is in a folder on the flash drive called JetClean, I would type it this way? %installsourcedir%\jetclean\jetclean.exe. ?
Fred, InstallSourceDir is the path where the UVK package from which UVK was installed resides. This can be a flash drive, a network location or simply a location in the hard drive.

Take this example: You have UVKPortable inside a folder in a flash drive, and JetClean.exe inside another folder, in the same drive. You plug in the USB stick and you get the following:

F:\UVK\UVKPortable.exe
F:\JetClean\JetClean.exe

You run UVKPortable, and %InstallSourceDir% becomes F:\UVK, right?

Now you must be wondering how you can access JetClean.exe from the InstallSourceDir variable.

Answer:

%InstallSourceDir%\..\JetClean\JetClean.exe

I hope it's clear now. I think I should document this, too.
One thing we humans have in common is that we are all different. So, if you think you're weird because you're different from everyone else, then we are all weird.

Fred
FredJClaus
Posts: 323
Joined: Sat Dec 06, 2014 6:21 am

Re: Running a program on the flashdrive

Post by FredJClaus »

That is EXACTLY how I have my flash drive set up. Thanks for clarifying, that's another reason why I love this program. The developer is willing to interact with the users. No matter how stupid, and how often the question is asked, you answer the question as if it was the first time it was asked. Thanks for all you do Fred.
Post Reply