Is it possible to determine in uninstaller script is a program (that should be uninstalled) working?
If you want to detect if your program is still running, you can use your knowledge of the programs internals to detect either a special window class or a mutex used by the program.
If you don't have anything other than exe name to go on, use one of the nsis plugins:
http://nsis.sourceforge.net/LockedList_plug-in
http://nsis.sourceforge.net/KillProc_plug-in
http://nsis.sourceforge.net/Processes_plug-in
http://nsis.sourceforge.net/FindProcDLL_plug-in
Related
I have a history of Installscript MSI installers (that have been replaced by Basic MSI installers), and when I uninstall them I need to know if the uninstall is being run silently or not. I run some custom code that checks for the existence of .iss files (necessary for silent uninstalls) and if they're not there I pop up a message saying that the files aren't where they're expected to be. The problem is that when the program is uninstalled from the Control Panel (not silently) this code runs and displays the message. So I need a system variable that will tell me it's running in silent mode so when it's not I can suppress the message.
I can't find anything that tells me this. Does anyone know of a way I can tell programmatically?
Assuming you want to detect a silent install from within the install, the answer depends on the project type:
InstallScript projects can check whether they're running silently by comparing the MODE system variable to SILENTMODE
Basic MSIs can compare the UILevel property to 2
InstallScript MSIs can check whichever is more relevant for the context (using MsiGetProperty to retrieve UILevel, if necessary, but watch out in deferred custom actions; they'll need to pass it through CustomActionData).
For completeness, but unlikely to be relevant for your question, Suites can reference the ISSilentInstall property.
I'm coding a demon like program from Gambas on Ubuntu 13.10.
This is a GUI application which becomes visible when the user hits specific key.
Therefore, I don't want this program to appear on the task bar.
Is there a way I can bypass it? (Maybe from a Bash trick or a Gambas code?)
Thanks! :)
You need to add _NET_WM_STATE_SKIP_TASKBAR atom to _NET_WM_STATE - see 'Application window properties' part of emwh spec.
I don't know at all gambas, but what you want is the following for gtk (in python):
window.set_property("skip-taskbar-hint", True)
or for QT:
setWindowFlags(QtCore.Qt.SplashScreen)
basically, you need to find a way to change the properties or flags for the windows you want to display. Look at the API of the windows in gambas
A NSIS created deployment setup, installs two executable. After setup, one of them appears in the MFU (Most Frequency Used) list of the start menu. But I don't that.
Is it possible to remove this link or prevent it during install? I have found this document from Microsoft but is very difficult to code this (my knowable is .NET/C#). Or maybe is it possible with NSIS? All tips are welcome.
You could use WriteRegStr to write the NoStartPage value but it is usually not something you should set explicitly except if this .exe is some kind of generic host program for plugin modules.
Is it possible that you just tested the program on this particular machine so many times that the program ended up on the MFU list?
There is no official API to add things to the MFU list and NSIS does not do anything to try to get the program listed there...
I have a gVIM script that parses current buffer and offers user to select one of multiple choices. It is implemented as console input, but since i'm using graphical version of gVIM, maybe it's possible to use graphical version of multiple choice dialog? I have tried to use python + Tkinter but it's very unstable and is not working on some NIX boxes :(. Any ideas?
GVim has, in its functions and settings, nothing that would enable showing GUI elements (with a few noble exceptions, like closing dialog and such.).
That being said, GVim is open source, and nothing stops you from downloading the source and messing with it.
After some research i have found a solution. VIM supports so-called "clientserver" mode and external application can send a command to it. So this task (and many others) can be solved with following technique (tested on Windows, OSX and Ubuntu):
VIMscript that handles a command launches standalone GUI script in
separate process and returns.
Standalone GUI script (python/ruby/.exe/whatever) displays GUI and
waits for user interaction.
After user interaction, standalone GUI script closes it's window,
communicates back to VIM via "clientserver" interface (call another
script, open file, move cursor etc) and exits.
I'm working on a I/O verification tool based on Linux in a game project. It is written in C++, and,since using the same I/O module as our game, it's based on OIS 1.2. Thus, though all I need is to print users' inputs on the console, I still need to create a window for OIS.
So here comes my question: How can I create a mapped window while it is still invisible and processes keyboard events?
I can't unmapped the window in that it won't process any keyboard event anymore. I also can't find function for show/hide a window.(maybe I search through a wrong diretion...)
My little tool works fine now except there is a stupid top-level empty window which needs to be focused for processing keyboard events...
Any advise is welcomed.
Thanks!!!
After reading this post: Linux/X11 input library without creating a window,
I realized my problem was that I misunderstood the philosophy of X11. All I need to do is simply pass the root window handle to OIS, and set the x11_grabkeyboard flag as true. The only drawback is maybe I can hardly debug my program with gdb since the keyboard is grabbed...
Though my situation is solved, there is one thing left.
Every article I read said an InputOnly window won't be visible and is capable for handling input events, while my InputOnly window is absolutely visible after mapped...
Maybe it's my Linux, or again, a misunderstanding...