Jump to content
Sign in to follow this  

Pass Parameters to already running script?

Recommended Posts


How would I pass parameters to a program if it was already running? I know you can pass parameters to the script at runtime, just not how to do it if it is already running. My plan is to have a script be executed from my usb flash with a parameter when it is visited in explorer via an autorun.inf, keep it running while the USB is still in the comp, and have the running script check a condition stored in a variable (I REALLY do not want to resort to storing the data in a file on the flash) every time the drive is accessed again from explorer via the autorun.inf.


Open drive. Run script. User revisits the drive --> the autorun.inf opens the script again, and the already running script intercepts the call and checks the contents of a variable stored in memory.

I'm using this for a usb tracker for recovering a lost usb (I have the u3 4gb titanium, my baby haha).

I've seen mozilla applications accept parameters when they are running, so I know that it is possible.

Thanks all.


My bad, I had done a quick search but for some reason my sleepy state of mind determined that the results I got were useless. I've solved the problem with a workaround with which I don't have to worry about passing params to the running script.

Edited by t8inevergreen

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this