Debugging install4j works on linux but not on windows? - windows

Why doesn't -Dinstall4j.debug=true -Dinstall4j.logToStderr=true on windows result in messages in the console while it does on linux?
My cross platform installer runs as a normal user on linux and elevates on windows so it can install a service.
Linux
myinstaller.sh -Dinstall4j.debug=true -Dinstall4j.logToStderr=true
Console window fills with useful information
Windows
myinstaller.exe -Dinstall4j.debug=true -Dinstall4j.logToStderr=true
console window empty - I suspect the elevation, which seems to require a relaunch, is the cause.
If I run my installer from an Admin window I don't get my error case and don't see the console logging either.

GUI applications cannot write to the console under Windows, because they have no associated console.
If you select the "Windows console executable" property for the installer node on the Installer->Screens & Actions tab, you will see console output.

Related

Launch my application before the Windows logon screen

In a personal project, I want to display my application before (or above) the Windows Logon, ie just before entering the Windows password.
The application must "hide" the password entry screen. I used to launch an application at Windows startup but this after viewing the Windows desktop.
Is it possible to do this please? Should I create a Windows service that will launch my application?
Thanks for your help
If this is just a personal project on your own machine you could set Windows to autologon and then just run your application like a normal startup shortcut.
A NT service is the only documented way to run code before a user logs on. However, spawning a new process in another session and interacting with the Winlogon desktop and putting yourself on top of LogonUI.exe is going to be a hack.

Create a Windows executable that does not create a console window

I compiled a Windows GUI application with haskell-gi. Everything seems to be working fine. However, every time I double click on the executable in Windows Explorer to execute the program, Windows also creates a console window (i.e. a terminal) along with the main window of my application. Is it possible to ask Windows to not create the console window, which is how typical Windows GUI apps behave?
As per the ghc user guide, you can build a GUI-only application by adding the -optl-mwindows flag to your build.
Notice the warning in the link that says that in this mode using standard IO functions (putStrLn, getLine, or anything that reads from stdin or writes to stdout/stderr) will fail with an IOException on Windows.

Show Firefox OS devtools on Firefox Developer Edition 'desktop'

I've an iMac with OS X Yosemite v.10.10.3. I use Firefox Developer Edition 40.0a2. I've a ZTE Open C (FR version) with Firefox OS; Boot2Gecko 2.1.0.0-prerelease (B2G OS).
What I'd like to do is the following: I've a basic webpage (mostyl HTML, CSS and JS) opened in my browser on my Firefox OS phone. I'd like to get the devtools (Cmd+Shift+i) and be able to edit that webpage with my Firefox Developer Edition browser on my iMac.
I've already tried these things:
Use webIDE.
Follow this potential solution.
Connecting a Firefox OS device.
WebIDE Troubleshooting.
Comment déboguer facilement du web y compris sur tablettes et téléphones—french article.
With webIDE, I can build a new app for Firefox OS (with or without a base theme) and I can use the devtools to inspect the DOM and stuff like that. I just want to achieve the exact same thing but directly on my desktop computer.
Do you have any clue?
Feel free to ask me if you need more piece of informations. ;)
Current status
When I launch the Firefox OS browser app, I can inspect (via the devtools) the homepage (DOM stuff, etc.). But when I load another webpage (Google for example), I can't inspect the DOM. Any idea about that?
I often get this message: http://puu.sh/ir2Ju/32563e51bc.png when I switch to several apps I want to debug.
If I understand correctly, you're trying to connect the Firefox Developer Edition WebIDE on your desktop to a tab that is open on your Firefox OS phone. Something like this?
If that's right, once you connect to your phone in the WebIDE, you should see a list of open browser tabs at the bottom of the "Open App" menu, which is in the top left of the WebIDE panel.
When you connect your phone, you have to accept remote debugging.
Then on the left of the window, you should see a dropdown menu with the apps that you can debug. By default, you can only debug unprivileged applications.
Click on the app, the you want to debug and in the middle of the screen click on the "wrench". It is the button to activate debugging.
Now the complicated part. In order to debug privileged apps such as the web Browser. You have to root your phone and change some preferences. To check that you have a rooted phone. Click on the runtime menu and then runtime info.
If your adb is in root mode, then you can press the button to request higher privileges. You can also do that by hand.
There for more info:
https://developer.mozilla.org/fr/docs/Tools/WebIDE/Running_and_debugging_apps#Unrestricted_app_debugging_%28including_certified_apps.2C_main_process.2C_etc.%29
https://developer.mozilla.org/en-US/Firefox_OS/Using_the_App_Manager#Using_the_B2G_desktop_client
Using a real device
On your computer, enter the following command in Terminal/console to enter your device's filesystem via the shell:
adb shell
Your prompt should change to root#android. Next, stop B2G running using the following command:
stop b2g
Navigate to the following directory:
cd /data/b2g/mozilla/*.default/
Here, update the prefs.js file with the following line:
echo 'user_pref("devtools.debugger.forbid-certified-apps", false);' >> prefs.js
After you've finished editing and saving the file, start B2G again using the following command:
start b2g
Exit the android filesystem using the exit command; this will return you to your normal terminal prompt.
Next, reconnect to the App Manager and you should see certified apps appear for debugging.
When this is done, you should see the application "Browser" in the list of available apps for debugging. At the same time, you should see all other application of your phone available as debugging.

ShellExecute fails opening On Screen Keyboard with UAC enabled

I am trying to programmatically open the windows 7 on screen keyboard (osk.exe) from my program.
I found a good guide for this on this page and it works quite well when UAC is turned off.
When UAC is turned on, it is not opening the program at all however, and I can't find why. No UAC prompt is shown when opening the keyboard from the start menu, so it doesn't appear to need administrative privileges.
Is it just because the executable is located in the windows system folder, and if so, is there another way to launch a program that would work?
The error returned is 3, ERROR_PATH_NOT_FOUND, possibly because 'sysnative' path is not working with UAC enabled.
Trying to run "osk.exe" without path also fails, with an error "Could not start the On Screen Keyboard"
Finally, running "C:\Windows\system32\osk.exe" fails with error code 5: SE_ERR_ACCESSDENIED when I tried to use it with redirection turned off (as suggested in this question)
I tested the c++ code sample you refer to in your message. The routine started either from VS devenv or as a standalone exe did always show the on-screen keyboard under any available UAC mode. My OS: Windows 7 Ult. SP1 64-bit.

Why is the system tray icon for my program not visible in Windows 7?

I'm unable to find system tray icon for my program after the installation . I could see that In Windows XP, it works just fine: the user can launch a program by clicking on the same.
However, in Windows 7 (both Home and Ultimate editions), the icon is not shown in system tray , but it works after I reboot my machine.
I have tried putting the code to refresh shell icons in the installer script, but this does not seem to have fixed the problem.
Can anyone help me on this??
PS: I use NSIS script for my installer.
Is it simply hidden in the pop-up that opens when you click the little arrow?
If not, is your program actually running at all?
If your program is running, use Process Explorer to check its integrity level (the Integrity column in Process Explorer). After you reboot and the icon appears, does the process have the same integrity level as when it didn't appear?

Resources