Windows: Execute Batch File for a Custom Context Menu Item - windows-xp

I am looking to add a new item in a right click context menu for a certain file type. I suppose it would be easiest to run a batch file with the full path of the file as an argument. I need to rename the file, unzip it, then rezip it, then rename it. I suppose winzip command line would be appropriate tool to help with that, unless someone else has a suggestion.
My questions are:
- How can I add a custom context menu item based on file type
- How can I pass the file name as an argument to the batch file from the context menu
- Finally this may go out to 2-3 people, and it might be easier to simply have an installer that sets this up for them. Anyone know of any free installers that could do this?
Some details about why I am trying to do this:
I have a tool that is zipping things correctly, the program that is reading the zip files is not unzipping to standards it seems. It unzips in winzip legacy mode or something. Rather than fix a working program/investing time or attempt to do some ultra-fancy, crazy fix on a linux server for zipping into winzip legacy format a workaround seemed appropriate for now. These processes only really occur internally, but they are still painful/annoying to do.

7zip is free, you might want to use that if you need to bundle the zip utility
Customizing a Shortcut Menu Using Static Verbs
%1 in the command string in the registry is replaced with the filename
Inno Setup, NSIS or WiX

Related

How to convert a SB3 file to an EXE

I'm creating a game on Scratch 3, however, when I'm finished with it, I want to convert it to an .exe file. How do I do this?
I've been interested in game development for a long time, and have even tried Unity before, but I'm just a beginner meaning it was too difficult for me. So I turned to Scratch.
Yes, It is possible! ...But it's kinda complex,
Bear with me!
First, Take your sb3 file and convert it into a sb2. To do this I recommend using rexscratch's sb3tosb2 tool. Found here: https://github.com/RexScratch/sb3tosb2
Make sure you have python installed, if you don't, google how to install it. (it's easy).
Next, Click Clone or Download then click Download ZIP. Once that is downloaded, Open the zip, go to the next folder, and execute sb3tosb2.py . This will then ask for a sb3 file, Navigate to the sb3 file you have and select it. It may say it wants to work in compatibility mode, if it does, Just accept it. It will finish up and ask you where to put a sb2 file, just place it on your desktop and name it something.
Secondly, We need to use a program called junebeetle, Don't worry, it's a web based one, found here: https://junebeetle.github.io/converter/online/
Click open scratch file. It will ask for a sb2, Navigate to where you put the sb2 file and open it. If you want you can customize how it will open, you can. I like to use the auto start function, and fullscreen. Don't mess with the resolution unless you know not how to screw-up aspect-ratios. Then click "Convert to SWF" This will then download the SWF version the scratch game, simply name it what you want and leave it.
Finally, you need to convert the SWF file to an EXE, There are plenty of ways to do this, but for ease, I recommend using a lite file converter. SWF Tools is a good one found here: https://sourceforge.net/projects/swftools/files/SwF_To_eXe/Swf2eXe_Latest.zip/download
Let it download and then extract the zip file's content to your desktop or downloads folder. Then open the exe file inside the folder from the zip file you just extracted.
Almost there! Click "Add a file" Then, you guessed it, Navigate to the SWF file that was spat out from the conversion of the sb2. Then click "Convert" Let it do its thing, and soon it will finish. Boom, Done. To find your exe file, go to where you stored the SWF to EXE converter, go to the "Output" Folder, and infront of you, is your EXE File! Note: Your anti-virus might freakout, this is normal when making new programs.
Also, Some fonts may break, This is just a side effect of the sb3 to sb2 conversion due to the fact that there is currently no way to convert sb3 to SWF.
Hopefully that was easy enough to understand. It is a complicated process, But yields results!
If you have any issues, Just Ask! I can help!
You could use the TurboWarp Packager. It's free and safe. https://packager.turbowarp.org/
There might not be a specific or direct way to convert a Sb3 File to an exe file but You can do it indirectly in a few steps which might be kind of lengthy but works.
When your SB3 project is done, go to https://sheeptester.github.io/htmlifier/
And convert your sb3 file to html.
From there you can convert the html file you got just now to an exe file, but not as you might expect it to. You cannot convert an html page to an exe file so what you can do is add the html webpage (the scratch game now converted to a html webpage) as an 'embed' file in the software such as, like Unity or Visual Basic, as they allow html webpages to be embedded in a project. Then you can add features and stuff, then publish or export your project as an exe file.
I know the process is really lengthy and I practically just wrote a long boring thesis but this might be the only way you can convert scratch to exe.
Hope my answer helps!
Hasta La Vista
Convert your Scratch project to HTML using Scratch HTMLifier: https://sheeptester.github.io/words-go-here/htmlifier/
Download NW.js and put its files (nw.exe, ...) in a directory. Create a package.json file in that directory that should look like this:
{
"name": "Project",
"main": "project.html"
}
(replace Project with the name of your project and project.html with the name of your HTML file).
Make sure that your project runs when you start nw.exe.
Use any tool to turn your folder into a self-extracting archive.
See also: https://scratch.mit.edu/discuss/topic/341617/
use https://packager.turbowarp.org/
Using simple setting you can export without any problems.
This post is marked obsolete because the content is out of date. It is not currently accepting new interactions.
Currently, there is no software or smart javascript tricks that can convert .sb3 files into .exe files. You could use an .sb2 file but you need to use Scratch 2.0. There are developers working on conversion programs that do .sb3 to .exe but that will take a while. I would recommend using Scratch 2.0 if you want to convert your Scratch games to an executable.

Can you create a file or folder by path in VS Code?

In Atom, hitting Cmd+N brings up a window where you can type in basically any path to create any file or folder anywhere in the project. In VSCode, hitting Cmd+N brings up a dialog where you can create a file in the currently focused folder, and I believe you can type a path to create a file in a subfolder (whether it exists or not), but not as flexibly as in Atom.
Is there way to do it Atom-style in VSCode?
I don't know for sure whether this is what you're looking for, but still there exists this plugin which can emulate the file/directory creation feature of Atom.
Since i use vscode-vim it's fairly easy to create new folders and files using command mode. If you're familiar with using terminal, then you can use shell commands to create file/dir.
I have no idea whether one could do what you had mentioned the proper way with vanilla vscode.
Hope this helps you somehow.

Go To File with directory in NetBeans

The "Go to File" dialog is handy (Alt-Shift-o), but my project has a hundred files called index.phtml. Is there any way to include the directory? Say, search for docs/index.phtml?
Or do I just have to fix/wait for https://netbeans.org/bugzilla/show_bug.cgi?id=222697?
I'm using NetBeans PHP 7.3.
No, only file names can be searched for.
When looking at the code of the Jump To module, you can notice that a org.netbeans.modules.parsing.spi.indexing.CustomIndexerFactory gets registered which only keeps record of file names including their extension. So currently there is no way to to search for files with a path specified.
However, I think it shouldn't be too difficult to change the indexer of the Jump To module to not omit the path, I'd worry about the performance though.

LÖVE and Lua. Making an .EXE file

I'm making a Lua game using the 2D framework 'LÖVE'.
I needed to know HOW to make a .exe file with it! I've done the command line, sucessfully zipped up my main.lua and the image, I've renamed the file extension to .exe!! When I run the .exe, I get a file extracting application coming up. This is not supposed to happen, right? I want it to be run as a game, not as a self-extracting application. Help?
From the sounds of it, you are trying to save your 'lovechive' with an .exe extension; your archiver is probably 'helpfully' assuming you meant to create a self extractor, which you didn't.
Okay, lets start by talking about how runable 'lovechives' work:
When love.exe starts up, it first checks its own name, if its called something other than love or love.exe it immediately checks to see if there is somethng stuck to its end. if there is, then it tries to interpret it as if it were a 'lovechive'.
So basically, we want to stick a zip-file to love's bottom (don't worry, it likes it).
Start by creating an ordinary zip archive of you game directory.
Remember to check for anything you don't actually mean to ship; plenty of love games have gone out containing backup copies of the source code, test artwork, and peoples' shopping lists. Don't be a statistic.
The filename is irrelevant for what were are doing here, so don't worry about the usual step of renaming it to a .love. just make sure that what you have is an plain-ol' ordinary zip.
The next step depends on your host platform, but basically you now need to do the whole "stick it to love's bottom' part now, generally this is done from the command-line:
On windows, the command is:
copy /b love.exe+YourGame.zip TheGame.exe
Where love.exe is the name of the main 'love' executable YourGame.zip is the name of zip file containing your game, and TheGame.exe is what you want the final game executable to be named.
On Linux or OSX, the command is:
cat love YourGame.zip > TheGame
Where love is the name of the main 'love' executable, YourGame.zip is the name of zip file containing your game, and TheGame is what you want the final game executable to be named.
These substituting the relevant filenames should let you produce versions for Linux, and Windows
(All I know about making 'merged' OSX Apps is that its more complicated.)
For the record, it is utterly trivial to extract files from the 'merged' game. Usually nothing more than changing the file extension, sometimes not even that.
And no, zip encryption doesn't help here; it won't run because love can't read the archive. (quite sensibly, really.)
Finally, If you are distributing to the Love community, they generally prefer that you just give them the 'lovechive.'
From https://love2d.org/wiki/Game_Distribution :
Here's how to do it on Windows. In a console, type this:
copy /b love.exe+game.love game.exe
Then, all you have to do is zip game.exe and required DLLs, and distribute them. Yes; this does mean that the game will have a private copy of LÖVE, but there's nothing wrong with that. It also means that you will have to create one package for each platform you would like to support, or simply offer the .love alone for the other platforms.

running multiple configurations of an rcp with different shortcuts

I thought this would be straightforward but through lots of play and googling, I can't find the answer. So apologize up front if the answer is in front of my nose.
We have an rcp app that uses a application specific ini file to determine database, file locations, etc (call it bob.ini) to not confuse with the app ini file (call it xxx.ini and the exe is xxx.exe).
We want to run the app with different shortcuts so that we can use different bob.ini files so we set up variable in the config.ini file to point to that location. No problem so far, you run xxx.exe -configuration \location\config.ini and we have a different location for each configuration we want to run.
But what I also want to do (and I may not be saying this correctly) is to have config.ini file located in a directory that is not writable (ie all the folders like org.eclipse.osgi, etc) and point that stuff to #user.home/somewhere. But that doesn't seem possible because once my shortcut say '-configuration \location\config.ini' the osgi.configuration.area is set. I want different configuration file to be in a folder by itself to give information but read only.
So then I tried using an xxx.ini file which I understand sets vm and vmarg info using -D but couldn't get the right combo
I know there base, default, shared+cascaded (which I don't understand), readonly but can't figure this out.
Your advice and recommendations are greatly appreciated.
You could put information in different xxx_1.ini xxx_2.ini files and have the shortcuts specify which one to use by running xxx.exe --launcher.ini xxx_1.ini.
Otherwise, I'm always a little fuzzy on all the configuration properties, but you can try osgi.configuration.cascaded and osgi.sharedConfiguration.area
So I think you would use xxx.exe -configuration \location\config.ini and then
/location/config.ini:
osgi.configuration.cascaded=true
osgi.sharedConfiguration.area=/sharedLocation/readonly/config.ini
bob.ini.location=bob.ini