Terenz Posted September 25, 2017 Share Posted September 25, 2017 (edited) Hello, Assuming i have embedded a file inside the script, not as resource but as string, is possible to launch it with the default software without save it to disk? I have read about file mapping but i'm not sure is that then i need: Local $hFileOpen = FileOpen(@ScriptDir & "\Test.jpg"); just as example If $hFileOpen = -1 Then MsgBox(0, "", "An error occurred when reading the file.") Exit EndIf ; Read the contents of the file using the handle returned by FileOpen. Local $sFileRead = FileRead($hFileOpen) ; Close the handle returned by FileOpen. FileClose($hFileOpen) ; Display the contents of the file. ;~ MsgBox(0, "", "Contents of the file:" & @CRLF & $sFileRead) ;~ ShellExecute($sFileRead) ;~ Run($sFileRead) Thanks Edited September 25, 2017 by Terenz Nothing is so strong as gentleness. Nothing is so gentle as real strength Link to comment Share on other sites More sharing options...
Terenz Posted September 26, 2017 Author Share Posted September 26, 2017 Up? Nothing is so strong as gentleness. Nothing is so gentle as real strength Link to comment Share on other sites More sharing options...
Terenz Posted September 27, 2017 Author Share Posted September 27, 2017 Up? Nothing is so strong as gentleness. Nothing is so gentle as real strength Link to comment Share on other sites More sharing options...
SlackerAl Posted September 27, 2017 Share Posted September 27, 2017 1) Can your target software receive its input as a command line or stream? It somewhat depends on what your target software is (I'm assuming it is not something to just display a jpg?) 2) You could create a virtual drive, but if you have privs to do that, you could just write the file to some disk space, which would be far easier. 3) Are you thinking you are concealing your input file? Or do you lack privs to write to a local file space? Problem solving step 1: Write a simple, self-contained, running, replicator of your problem. Link to comment Share on other sites More sharing options...
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