Portable Thread last updated on 2006-02-23 03:06:29

Posted by member 206411 on 2006-02-06 22:28:08

I was thinking how it would be cool to make litestep portable, as in plug in a USB, run a simple .exe (to shutdown explorer.exe, reconfigure registry and start up litestep) and have litestep up and ready from the USB drive...

I actually already tried the idea with my own 64MB USB drive with my school computer. The student account had tons of restrictions so i was worried, but it went fine other than the fact that i manually shut down explorer.exe, and ran litestep.exe over that. so if i tried to start up a file browser, the shell explorer poped up since i didnt change any registry.

so, obviously, the next step is to change the registry, set up a flexible theme, and i should be all right.. But, I am not sure if omar's post on registry is still valid,
TO SET LITESTEP AS SHELL FOR THE CURRENT USER:

1.
HKLM\Software\Microsoft\Windows NT\CurrentVersion\IniFileMapping\system.ini\boot

set the 'shell' String to:

USR:Software\Microsoft\Windows NT\CurrentVersion\Winlogon



2.
HKCU\Software\Microsoft\Windows NT\CurrentVersion\WinLogon

set the 'shell' String to:

x:\path_to_litestep\litestep.exe


3.
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer

set the 'DesktopProcess' DWORD to:

1


is this all I need to change for 0.24.7 build?

Posted by member 1 on 2006-02-06 23:21:15 link

ermm...well first off...why would you want to do this? It is a restricted machine..should you really be touching this? Have you setup something to automagically removed LS from the startup? Normally a restricted machine you can't touch the registry. As for the data...most of it looks current.

Posted by member 206411 on 2006-02-07 01:32:20 link

You know what? I was typing like 3-4 paragraphs to answer you, and I realized I should make my responses shorter.

I am doing this because I think I have a use for portable litestep. I should be doing this. No, I have not set up anything to remove LS, but there is no need because the computer resets it's self to a default state after being shut down. I will think of something if I were to use it on some other computer though.

and thanks for the confirmation on the data :)

Posted by member 1 on 2006-02-07 02:21:25 link

yeah...I had a huge post too. now that I read what I actually posted I appologize. Working completely changed when I shortened it up.

Just from a management stand-point that is a horrible setup. If you are going to reimage everything after reboot there is no point in locking it down that far.

I am pretty sure that the last setting you have there is where you are going wrong. Hard for me to remember back that far though. Loose-screws or SFO should have an app written long ago that set itself up as the shell and fixed that...but I could be wrong.

Posted by member 206411 on 2006-02-08 17:06:55 link

well the registry change can be done with a .exe im creating.. so theoretically.. it should work..

I would make the .exe kill explorer.exe first, then change the shell registry, start up listep.exe.. i guess that's it.. do you see any problems with that?

Posted by member 280260 on 2006-02-08 20:35:30 link

The student account gives you write access to the windows registry? I want to go there....

Posted by member 111 on 2006-02-16 11:33:40 link

Actually it is possible to switch the shell using WSH script instead of an utility, something like this (lsportable.vbs):

rem =========================================
rem LiteStep portable v1.0
rem
rem Requirements:
rem WinXP or later
rem
rem Copyright(c) Sergey Gagarin a.k.a. Seg@
rem Ekaterinburg, Feb 2006
rem =========================================

Option Explicit

' relative path to the ls executable on the flash drive
Const c_sLiteStepPath = "\LiteStep\litestep.exe"

' change this only if Explorer is not your default shell
' and you're replacing something like GeoShell or
' SuperPuperComputerClubShellWrittenByMikeIn1HourOnDelphi
Const c_sExplorer = "explorer.exe"

Dim objFS ' as Scripting.FileSystemObject
Dim objExec ' as WshScriptExec
Dim objWMIService ' as WMIService
Dim objProcess ' as ???
Dim colProcessList ' as Collection
Dim sDriveLetter ' as String
Dim objShell ' as WScript.Shell

' -------------------------------------------

'
' Set 'sShell' as shell for the current user
'
Sub SetShell(sShell)
Dim sDesktopProcess ' as String

objShell.RegWrite _
"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\IniFileMapping\system.ini\boot\shell", _
"USR:Software\Microsoft\Windows NT\CurrentVersion\Winlogon", "REG_SZ"
objShell.RegWrite _
"HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\WinLogon\shell", _
sShell, "REG_SZ"
If sShell = c_sExplorer Then
sDesktopProcess = "0"
Else
sDesktopProcess = "1"
End If
objShell.RegWrite _
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\DesktopProcess", _
sDesktopProcess, "REG_DWORD"
End Sub

' -------------------------------------------

' let's extract a letter of the logical disk where we're running on
Set objFS = CreateObject("Scripting.FileSystemObject")
sDriveLetter = objFS.GetDriveName(WScript.ScriptFullName)
If sDriveLetter = "" Then
' cannot determine the script's source file
WScript.Echo "Unexpected internal error"
WScript.Quit
End If
' check for existing LS.exe
If Not objFS.FileExists(sDriveLetter & c_sLiteStepPath) Then
WScript.Echo "LiteStep.exe not found. Contact Francis Gastellu for details"
WScript.Quit
End If
Set objFS = nothing

' -------------------------------------------

' set LiteStep as shell first
Set objShell = CreateObject("WScript.Shell")
SetShell sDriveLetter & c_sLiteStepPath

' -------------------------------------------

' kill the explorer
' the 'terminate' method is unavailable on Win2k, so...
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colProcessList = objWMIService.ExecQuery ("Select * from Win32_Process Where Name = 'explorer.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next

' execute litestep.exe
Set objExec = objShell.Exec(sDriveLetter & c_sLiteStepPath)

' -------------------------------------------
' you may remove the following lines
' if you need to release memory
' occupied by WSH
'
' remember that you need to set
' explorer as your shell manually
' -------------------------------------------

' wait until litestep.exe is terminated
Do While objExec.Status = 0
WScript.Sleep 1000
Loop

' set explorer to be your shell again
SetShell(c_sExplorer)
' run it!
objShell.Exec(c_sExplorer)

Set objShell = Nothing


no need to restart a machine
there is only one disadvantage - Windows wants to relaunch Explorer after termination, and it starts in the Desktop mode when LiteStep is running as a shell %)

Posted by member 111 on 2006-02-16 11:36:13 link

a note: LiteStep should be exited using !quit bang command (Ctrl+Alt+F1 -> Quit LS) to set Explorer as a shell again...

BTW a cool idea - LS on the flash drive...

Posted by member 206411 on 2006-02-17 02:12:28 link


there is only one disadvantage - Windows wants to relaunch Explorer after termination, and it starts in the Desktop mode when LiteStep is running as a shell


uhh I thought this would get fixed if I change the registry..

thanks for the post inform, but sorry, I don't understand how Windows Scripting Host works... is it written in text, than compiled into .exe like every other script lang?

but as far as just configuring the registry..(setting listep as shell, and setting explrer back) it can be done a lot easier with autoit program...

Posted by member 111 on 2006-02-17 12:49:23 link

> uhh I thought this would get fixed if I change the registry..
Windows tries to restart Explorer as shell only once (but Explorer thinks that it's an application and shows only a file manager), so it isn't a problem, just an annoying bug

...better than to restart a machine I think

what about lsportable.vbs, WSH scripts cannot be compiled into .exe, but it isn't necessary since scripting language engine is embedded to any Windows platform
It is just a .vbs file than can be launched by double-click, because this extention associated with wscript.exe by default

and, the last, about AutoIt... I started to learn it only 6 days ago, and I'm still too lame %)

Posted by member 206411 on 2006-02-17 18:15:59 link

It's incredibly easy (at least to do registry edit with hotkey function) and window control... lol just look at the help file, it's got list of crap you can do (which is a lot)

if you need any help with it, contact me by e-mail or any IM program listed on my profile.

Posted by member 250174 on 2006-02-17 18:56:41 link

Hey once it works let us all know. I am impressed and love portable apps this will top them all though. email the final progam to blueicedragonofwinter@yahoo.com I post on my site if thats ok with you.

Posted by member 111 on 2006-02-20 20:17:18 link

ok, all stuff (WSH script, AutoIt3 script and compiled .exe) uploaded on http://www.litestep.bip.ru/sega/files.php

Posted by member 206411 on 2006-02-21 20:47:41 link

LOL I was thinking about doing it on my own, but hey, why do that when I'm lazy and other people are willing.

Posted by member 111 on 2006-02-23 03:06:29 link

sorry, i needed a training =)