Hi,
In short: see below: I'd like to catch a filename by a PS generated exe in a variable, then do stuff with it.
Would appreciate your any input to make this work!
--full explanation---
I'd like to check 3 scenario's:
1.doubleclicking an (to Windows) unknown filetype (f.e. a mypicture.gimp which is linked to Gimp program, but not installed) would open an (by Ps Studio) generated exe that sees the .gimp, matches it to the Gimp program and then offers to install Gimp
In this scenario, I'd link the unknown filetypes to the own created .exe, which is pretty straight forward (adapting the xml)
2.same scenario as above, but when Windows would offer a program to open and I choose the own created exe, same scenario as above happens (offer to install Gimp)
3.right mouse button on any program shows option openwith 'MyExe', then I offer options with what it could open and offer to install (Gimp or whatever other options)
=> All 3 scenarios would require the exe to catch the filename in a variable, rest is easy of course (f.e. $file = Myfile.gimp, match .gimp to program Gimp and popup with question to install).
---
Open a file with an Powershell Studio generated exe and catch filename in variable?
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Open a file with an Powershell Studio generated exe and catch filename in variable?
See:
cmd /c assoc /?
cmd /c ftype /?
Once you associate the extension with your EXE then will have the filename.
The only other legal way to do this is to write a shell extension that handles all unrecognized extensions and have it do what you ask.
cmd /c assoc /?
cmd /c ftype /?
Once you associate the extension with your EXE then will have the filename.
The only other legal way to do this is to write a shell extension that handles all unrecognized extensions and have it do what you ask.