Im working on a small project, which isnt exactly going according to plan...
We have some .vbs scripts which must be run before explorer.exe starts
so, the best way to do this would be to replace the windows shell with a custom program (login.exe, written in C#) by replacing the registry key, HKLM>Software>Microsoft>Windows NT>Current Version>Winlogon:Shell = login.exe
What is happening:
The user logs in using AD credentials.
Helloworld.vbs is run
When helloworld.vbs finishes and closes, Explorer.exe is run but opens as Windows Explorer, instead of the usual Shell.
Opening TaskManager (alt+ctrl+del > taskmanager) then running explorer.exe, also opens Windows explorer, instead of the Shell.
Reverting the above registry key back to explorer.exe, then logging off and on, opens the Shell.
Any ideas why?
Source code of Helloworld.vbs
Source code of Login.exe
static void Main(string args)
System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
myProcess.StartInfo.FileName = "wscript";
myProcess.StartInfo.Arguments = " C:\\Windows\\Setup\\Scripts\\helloworld.vbs";
System.Diagnostics.Process myProcess2 = new System.Diagnostics.Process();
myProcess2.StartInfo.FileName = "C:\\windows\\system32\\explorer.exe";
Helloworld.vbs will be rescripted for much more complex things later on. But for now, its testing only.
Im not a C# programmer, I mostly do VBScript.
But a .vbs fails to run when loaded in the above registry key.