1

So basically i want to wrap my batch file in an sfx to make a tidy package as I am using multiple files that need to be packaged with the batch file. The problem I am facing is that I need drag and drop functionality so I need to somehow pass the file dropped on the sfxz to the batch file via the execution code.

I am using the winrar default sfx module.

So far I have tried passing it with the %~1 variable but that just passes literally %~1 instead of the location of the dropped file

Any help will be appreciated.

  • If anyone wants to build on my failed attempt, I tried using `%ComSpec% /c call echo %~dp0 > "%tmp%\path.txt"` in "Run before extraction" (WinRAR's "Advanced SFX options" > "Setup" / "Presetup" (SFX script) but It just literally writes "%~dp0" to "%tmp%\path.txt" – mythofechelon Jan 21 '15 at 21:50

1 Answers1

0

You can use BHX from here to encode the binaries into the batch file, so it is just one file to distribute. http://www.dostips.com/forum/viewtopic.php?f=3&t=4104

foxidrive
  • 40,353
  • 10
  • 53
  • 68
  • This may work but I would like to use the program the way I envisioned it but sadly I have the passing the variable problem. – red death68 Jan 08 '14 at 10:17