Replace Windows shell to launch Ignition client (advanced!)

EDIT: with the advent of the native client launcher, and the death of Java Web Start, This entire thread is somewhat defunct. However, if you want to replace the shell, here is the TLDR version. :slight_smile: [quote=“JordanCClark, post:17, topic:3979”]
If your project has a desktop icon, you can copy the contents of the target field into the registry key value.

Computer\HKEY_LOCAL_MACHINE\SOFTWATER\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell

For those playing along at home we had a topic here and other places discussing auto-launching a client and all the associated problems with it-- like people messing around with the 'puter and doing things they shouldn’t.

So, to get around all this, I’ve written an executable (in AutoIt, if anyone’s interested) to replace the Windows shell (explorer.exe). I’ve tested this on XP and Windows 7 without issue, but, Windows being Windows, your mileage may vary… :laughing: I stuck a youtube vid to show it in action.

Before I go on, I will say that my anti-virus (Vipre) tagged the executable as a trojan. This is a false positive because of stupid malicious hacker-types (as opposed to me-- I only use my powers for good) doing stupid things to other people with their stupid code. This got tagged because we’re doing network calls, and then executing external code (the Ignition client). Other antivirus software may or may not tag it as well. If it does, let me know which ones, along with what it got tagged as, so I can submit there as well. I’ve submitted the .exe to Vipre, and should get cleared up in a day or two. I’ve added to source code so you can see what I’m doing. :mrgreen:

EDIT (2013-09-05): I’ve submitted the file to VirusTotal. Here are the results.

Now this involves registry editing, and not necessarily for the faint of heart. The usual rules of “change at your own risk” is in full force. I recommend backing it up, just in case.

The zip file contains four files:
[ul]IgnitionShell.exe: the actual shell
ignition.ini: this ini file holds vital settings-- like where the server is and what project you’re running…
Ignition Shell.au3– source code. feel free to play with, improve, whatever. I’m not squeamish. :wink:
shell.reg: registry file to help with the one registry change you’ll need.

The .exe and .ini need to go into the C:windows/system32/ folder. This is squarely in the path of the search for executables, and for some reason, the shell couldn’t ever find the ini file until I explicitly told it where it was. So I picked the system32 folder. Put them both there and you’re good to go.

Next modify the ini file to reflect your setup. More details are in the ini file itself.

Now, you can either run regedit and go to the following key:
[ul]Computer\HKEY_LOCAL_MACHINE\SOFTWATER\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell[/ul]
and change the entry from explorer.exe to Ignition_shell.exe
click on the .reg file and let it do it for you. Your choice! You can right-click on the file and pick Edit to see the contents beforehand.

Reboot and let 'er rip!

The good thing about this setup is that the new shell starts checking the server status right away and with no explorer.exe running, there’s nothing to click on-- a kiosk mode, if you want to call it that. I even made the status window non-clickable. And, you can still Ctrl-Alt-Del your way into the task manager and manually run explorer, regedit, Ignition_shell, whatever, if needed. 8)

Enjoy! (283 KB)

Wow. Nicely done!

Certain malware programs will undo the shell change, Also some windows updates.

So if it suddenly stops working and goes back to explorer, That’s probably why and nothing evil :wink:

Well, nothing more evil than Windows… :laughing:

Lol - nice! Who’s talking in the background?

Ha! Just realized I didn’t mute the audio on that one! That’s our maintenance supervisor and me. Our desks are across from each other.

Nice splash screen. :laughing:

Tried it on win 7. When the PC boots up I get a “cannot open script file”

A couple of thoughts:

  1. your antivirus is tagging it. The AV starts up even before the shell. Try making an exception for it.

  2. 64-bit systems tend to redirect to syswow64 instead of system32. try moving the executable there.

My gut goes with the first one. It seems that the executable starts, but can’t get to the script compiled within it.

Just submitted my file to VirusTotal. If anyones interested, you can see the results here.

I know this is an old thread, I have tried to modify the AutoIT script to see where im going wrong.

Please see attached photo
screen when gateway not up
screen when gateway is up
my AutoIT file is here
[attachment=0]Ignition Shell (2).zip[/attachment]

I see that once the port is up and responding, its looking for something like “main/web/home” to confirm the Ignition Gateway is up, but when I compare to what I actually receive when it is up I get the difference shown in the pictures.

my .ini file have these attributes

; host-- Can be name or IP

; port-- Port number Ignition server is running on

; project-- The name of the project you want to launch. The .jnlp extension is not needed.

; mode-- The mode of the running client. Values may be "fullscreen or “windowed”. “applet” is not supported.

I tried modifying the script a bit to get a match when the gateway is running, but I cant seem to get it to work. Is there something im missing?

A blast from the past!

The homepage has changed a bit since I first wrote that. That was the original link attached to the home button. When it found that link in the homepage, then we we could go on from there.

There is another page you can monitor: the StatusPing page. This following code is completely untested, but it should grab the StatusPing page and try to find the running status.

While $success=0 $label1="Attempt #" & $tryNumber & " to verify context is running..." GUICtrlSetData($l5, $label1) Local $sData = BinaryToString(InetRead("http://"& $host &":" & $port & "/main/StatusPing",1)) Local $nBytesRead = @extended If StringInStr($sData,"RUNNING")<>0 Then $success=1 $label1="Successful context check after attempt #" & $tryNumber GUICtrlSetData($l6, $label1) $label1="All checks complete! Starting Ignition Client" GUICtrlSetData($l7, $label1) Else $label1 = "Try #"&$tryNumber&" unsuccessful..." GUICtrlSetData($l6, $label1) $tryNumber=$tryNumber+1 SLEEP(3000) EndIf WEnd

Thanks Jordan,
With a few modifications it worked on Windows 8.

Thanks, anadal! Glad you got it working.

So what did I miss in the interim?

the download link is dead. could you please upload it again.
thank you.

With the advent of the client launcher and the death of Java Web Start, the stuff above isn’t really needed anymore.

You should be able to replace the explorer shell with the client launcher.

1 Like

I took a moment to verify this. If your project has a desktop icon, you can copy the contents of the target field into the registry key value.

Computer\HKEY_LOCAL_MACHINE\SOFTWATER\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell