yasuo Posted April 27, 2015 Posted April 27, 2015 Hi there,i have a script wich runs from USB, sometimes i will remove the USB after the script is startet, actually i even want to remove it using the script itself.But windows will refuse ejecting the USB since the script is running from it and there is an open handle. The common "resolution" is to copy the script to $temp and re-run it from there, but i dont want to copy my script for security reasons and i dont like filling up $temp. Is there another way to end the script's handle or even to preload it completely into memory? greetings
Xenobiologist Posted April 27, 2015 Posted April 27, 2015 Don't know, but what about running it from temp and selfdelete on exit? Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
Bert Posted April 27, 2015 Posted April 27, 2015 Agreed - have it delete itself on exit. A second way is simply have it run on a server. A third way if security is an issue is have an ID and password to launch the app. The Vollatran project My blog: http://www.vollysinterestingshit.com/
TheSpannish Posted April 27, 2015 Posted April 27, 2015 What about creating a batch that eject the USB? Codding its just my life! :thumbsup:
Bert Posted April 27, 2015 Posted April 27, 2015 batch? that is so DOS.... tweakster2010 1 The Vollatran project My blog: http://www.vollysinterestingshit.com/
yasuo Posted April 28, 2015 Author Posted April 28, 2015 (edited) thanks for your ideas, but its not yet the solution the batch is not the problem (you can use removedrive.exe or maybe devcon.exe), but as long the program runs from the same drive you cannot safely eject.I also would avoid ejecting forcefully too often. hmm deleting is an idea but "delete on exit" will not work in case the machine stops unexpected etc. etc.deleting while its running is not possible normally can i end the handle without stopping the program? Edited April 28, 2015 by yasuo
JohnOne Posted April 28, 2015 Posted April 28, 2015 Perhaps if you could outline these security concerns, you might inspire a solution.Not wanting to copy a file to a drive, but rather execute it in memory seems a little odd regarding security. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now