Installing a program without installation file - random

I've heard that you can take a program that is already installed in a PC and go home to you r own pc and write a program in any programming language to make it work without having to install the program. I wanted to know how does one go about in achieving that.

The class of applications you are describing are called Standalone or Portable Applications.
In such applications all files that are required to run the application are stored in the same directory as the application file itself. Which is not the way with most applications work, so, you cannot make all applications run in that fashion. There are various guides on Google when you search for 'creating portable applications'.
You might want to look at a good directory of portable applications here

Related

What programming languages come with windows 10 by default (no install required)?

Similar to this question What programming languages are installed by default on Windows 7?. Is the environment any differnt for Windows 10?
For some programs like MS OFfice you get the VBA, Chrome you would get Javascript, if you activate the Bash for Ubuntu on Windows then you can get bash. Not sure if that is default.
In particular, if you didn't have administration rights over a Windows 10 laptop but needed a programming language... what could you use or do about it?
ie I wanted Ruby installed but I needed our tech team to help me. I want to avoid someone else with higher access but also not breach policy.
Out of the box no install solutions include:
(To be written using text file editing software like the preinstalled notepad)
Batch (.bat)
Visual basic script (.vbs)
HTML (.html)
CSS (^Use a style tag for the HTML doc)
JavaScript (.js)
Some quick gets include:
Bash (Ubuntu from Windows Store)
AutoHotKey (from autohotkey.com)
#Code (Windows Store. Apparently supports 12 different languages)
Hope this helps!
Edit: If you really wanna try, you can edit .exe files directly but yeesh.
Edit 2: repl.it is a website that lets you code in tons of different languages, possibly Ruby. With repl.it you can do all the things I've listed and more! (As long as you have alright internet.)
what could you use
You could use pretty much any languages. Any compiled executables looks the same to the OS as any other.
The only catch is that some languages' runtime libraries are quite big, so it's common for smaller programs not to include the entire language runtime and instead expects it to be preinstalled on the machine to keep its own download size small.
However, even high level scripting languages that requires huge runtime support libraries can often be packaged into standalone executable, so that you don't need to install the runtime yourself.
Ultimately it depends on what you wanted to do. If you wanted to just make simple scripts, probably .bat scripts will do just fine. If you wanted something simple and fast, then you can write native executable in C, otherwise if you want to do something a bit more complex and you're fine with the larger download size if you can keep your own program simple, or if you can later get admin to preinstall your preferred runtime on your target machines, then high level languages like Python or Ruby would be great options.

What do we need installations for?

This is a conceptual question and I hope it fits into Stackoverflow's question and answer style. I wonder what the concept of installing applications is good for. In my naive understanding of operating systems we do not need a registry and to use an application it should be enough to just copy the executable and files onto your drive and launch that.
Am a Windows user but also worked with Linux a bit and noticed that there are package managers instead of installers. But even those do more than just a copy instruction, I guess.
I do not think that all the installers exist only because the common user expects them out of steady habit. So what is the advantage of installers in contrast to developing applications which are designed to run out of a single folder and copy that over?
I would really like if someone could explain that concept.
Installing applications is a way to embed them in the OS. It's a kind of standard, you offer procedures like installing and uninstalling that should have the same functionalities for all applications (even "change" under Windows).
Countless times I've "installed" applications with a single shell script that came with them, and then had troubles removing such programs, having to look for single files. If the programmer uses the standard of the OS to make an executable that can be installed, that won't happen.
You can also easily view a list of the installed programs at any time.
Under Linux, additionally, if we're talking about a package manager, it is convenient for the user to have an easy way to download and install a program by just typing its name.
Last but not least, some applications are required to be installed and recognized by the OS (for example services in Windows).

Wrapping an application written with newLISP in a single executable OSX app

As far as i have found out, it's possible -- and allowed -- to "link" and distribute a newLISP script with the newLISP binary to create a single-file executable. Now i would like to do this for an application using the newLISP gui server, much like the newLISP IDE, that is provided with newLISP. I have some questions related to this:
I would like to know what is required to build such an app and wrap it up just like newLISP IDE?
I have had a look at the packages contents and it seems, that there is some java-related stuff in there, to use/run the GUI server. So i think, i would require this stuff, too. Am i allowed to distribute it with my application, too?
The README i found in the newLISP IDE's package says, that the IDE requires some stuff installed outside the application package. I assume, this is only, because the IDE's lisp script is not linked against the newLISP binary?
thanks!
UPDATE
after further investigation of the newLISP-GS "app" i am not sure, if newLISP-GS is not only the GUI server ... ? i am little confused, anyway my question is still: how is it possible to build a single-file executable of a newLISP application including GUI-server and am i allowed to distribute it?
The guiserver.lsp and guiserver.jar files provide the interface between newLISP and the Java system that's installed on the machine.
The newLISP 'IDE' is, as far as I know, simply a longish text script that uses the guiserver.lsp file to interface with Java.
The ramifications of the restrictive GPL licence for distributing newLISP 'applications' has been discussed frequently on the newLISP forums, and you may find more answers and help there.

Recommended way of deploying cross-platform mac application

I am working on a job where we are developing a set of cross-platform applications using C++, Qt, and CMake (among other things). On the Mac we run into the problem that we need to package all of our shared libraries into each .app (currently there are 4 of them), which causes the size of the download and install to get large fairly rapidly.
We want to remain friendly to the Mac way of doing things, which means that we want to support the capacity to drag and drop applications. Does anybody have any ideas on how to do this while keeping the total size down?
The project is currently a set of four executables or apps that each use a common set of shared libraries (qt and in-house). There is also a set of ruby bindings that rely on the in-house libraries. I realize that you could probably create a Framework and install it in System/Library/Frameworks, but I haven't read about that much yet. Doing that way seems like it would break the ability to drag and drop the app between machines.
Does anybody know of any examples of applications that do a similar thing on the Mac? Any creative ideas would be most welcome.
Make an installer, preferably using the standard package maker which comes with XCode tools.
Having an installer for a suite of applications is not that uncommon. Apple's own iWork has an installer and shares libraries.
Making a standard .pkg is important if you want to distribute your app to a corporate customer: the IT admin would want to automate the install process remotely, which is possible for a standard .pkg but not if you write a custom installer yourself.
As for the file placements, you should understand File System Domains as described by Apple. Basically, all the directory structure is repeated three times:
/System/ : system domain
/ : local domain
/Users/name : user's domain
The first is reserved by Apple. The second is for things shared by users on a machine. The third is for a specific user.
The shared objects are put into directories called Library. So we have
/System/Library
/Library
/Users/name/Library
You'll typically install things in the last two. Inside Library, the directories should be organized as described here. Typically you put the frameworks in
Library/Frameworks/
or
Library/Application Support/your_app/Frameworks/

What is the quickest path to writing a lightweight GUI program on Windows?

I want a small (< 30MB) standalone Windows executable (a single file) that creates a window which asks the user for the location of a directory and then launches a different program in that directory.
This executable has to run on XP, Vista, Server 2003, and Server 2008 versions of Windows in 32-bits and 64 bits on x86-64 architecture as well as Itanium chips.
It would be spectacular if we only had to build it once in order to run it on all these platforms, but that is not a requirement. This is for a proprietary system, so GPL code is off-limits.
What is the fastest way to put this together?
These are some things I'm looking into, so if you have info about their viability, I'm all about it:
Perl/Tk using perl2exe to get the binary.
Ruby with wxruby
Learn MFC programming and do it the right way like everybody else.
What about a WSH script? It won't be an exe, right, but to ask for a folder I don't see the need for an exe file, much less a 30Mb one...
A 1Kb script, save it as whatever name you like with vbs extension and run it. This, in case it's not clear, asks you for a folder name and then runs calc.exe from the system32 subdirectory. You can of course do a lot better than this in 2 or 4 Kb.
Set WshShell = WScript.CreateObject("WScript.Shell")
win = InputBox("Please type your Windows folder location.")
If Right(win,1) <> "\" Then
win = win & "\"
End If
WshShell.Run win & "system32\calc.exe"
To add a Folder Browser dialog instead of an InputBox, check this out.
Clear benefits are:
Simplicity (well, VB is ugly, but you can use JScript if you prefer), no need to compile it!
Compatibility, works on every windows machine I have available (from 98 onwards)
I'd use .NET and WinForms. The idea of scripted solution is appealing, but in practice I often find you end up jumping through hoops to do anything beyond the basic case and still don't have the flexibility to do everything you want.
Quickest way on Windows for a lightweight and fast GUI? One word.. Delphi! It lacks the 64 bit support for now but then FreePascal would come to the rescue.
Having a small stand-alone application and developing it quickly are, I'm sorry to say, usually conflicting requirements.
To be honest, given how incredibly simple the application is, I would write it in C with direct Win32 calls: one call to SHBrowseForFolder() to get the directory, and one to ShellExecuteEx() to run the program. Even MFC is far too heavy-weight for such a modest application. Set the C runtime to be statically linked and you should be able to keep the size of the stand-alone executable to less than 100k. A decent Windows C coder should be able to knock that up in less than an hour, assuming you have one to hand.
Python with either wxWidgets or Tkinter should be able to do this with almost no effort at all. Runs on everything, and py2exe will get you a standalone executable.
Tcl/tk is one solution. You can have a single file executable (including custom images, dlls, etc) using something called a "starpack" -- a virtual filesystem that is both tcl interpreter and application code. I think it would weigh in at maybe a couple megabytes.
From your specifications it would take me personally maybe 15 minutes to get a first working version.
Tcl/Tk has a BSD license.
For all of its flaws, Visual Basic has historically been great for super-simple apps like this.
I agree with the Tcl/Tk answer above. For more information about the starpack that he refers to, see: http://www.equi4.com/tclkit/ it's a Tcl/Tk interpreter available for various OS's all in about 1MB. In the past there apparently has been concerned about the look and feel of Tcl/Tk UI's, but this has been addressed by a new framework named "Tile" that supports the native look and feel of the user's OS.
For a quick and dirty GUI program like you said, you can use an AutoIt script. You can even compile to an exe.
For an GUI example of AutoIt, you can check my stdout redirect script in a previous answer here
wxWidgets; it's cross platform, free, open source and easy to learn
You could do this in MFC and have an executable in under 100k. In general, if you want to keep the size of your executables down, you can use UPX to perform exe compression. If you want an example, take a look at uTorrent. It's a full featured BitTorrent app in less than 300k of executable.
I use HTA (HTML Application) for quick-and-dirty form & script applications. See Microsoft's HTA Developers Center for details and examples. This basically uses HTML for the form, and any HTML-accessible scripting language for the script. Normal browser security is bypassed so that you can get at almost all OS internals. The above site also contains links to several tools that nearly automate the scripting part for you.
PyQt works really well for this. Binaries for Windows here:
http://www.riverbankcomputing.co.uk/software/pyqt/download
A good book here:
http://www.amazon.com/Programming-Python-Prentice-Software-Development/dp/0132354187/ref=sr_1_1?ie=UTF8&qid=1295369454&sr=8-1
And you can freeze these using various methods if you need exe(s).
Similar to what Vinko Vrsalovic said, you can use a HTA application. It is as easy as building a webpage with windows scripting host functionality. I have built a few utilities with jscript and it is really easy and quick
http://msdn.microsoft.com/en-us/library/ms536496(VS.85).aspx
These responses are unbelievable.
Visual Studio Forms editor lets you draw out WinForms and autogenerates the boilerplate GUI code (which is a pain in the ass at best for most other languages and toolkits). Then you can use C# or any other .NET language. .NET has stock widgets for file pickers. I could write that script in 20 minutes and it will run on every one of your target platforms for free. Draw out the GUI, drag-n-drop a file picker, fill out maybe two hooks to do the "launch a different file than they wanted" thing, done.
I suggest Autohotkey (AHK) or Autoit. Both support win95+ (with caveats for certain functions). They can be compiled into small .exe without external dependency (besides native DLL's).
Pros:
small size
easy to write code
useful for simple - complex operations
can create GUI easily
Cons:
learning curve (as syntax is unusual)
30MB is pretty huge!
Qt (C++) may be the best choice. It is portable, quick to develop and relatively fast to run. With UPX (Ultimate Packer for eXecutables) your program will be 10M+.
Qt (Python) is OK too, but will be slower.
If you want it less than 1M and/or you want it quick, you can write it in C with win32 api, or use Delphi.

Resources