Help - Search - Members - Calendar
Full Version: manually running explorer.exe not working during wpi installation
MSFN Forums > Member Contributed Projects > Windows Post-Install Wizard (WPI)

   
Google Internet Forums Unattended CD/DVD Guide
icnocop
Hello.

I am using wpi v7.0 which gets run before the desktop loads (RunOnceEx.cmd).

However, I am having an issue when "manually" launching explorer.exe (from the task manager for example, and I would expect the desktop to load), as it seems that explorer.exe just hangs.

I am running on windows xp x64 sp2.

More specifically, I need to run explorer.exe in order to launch a network connection shortcut (.lnk) on the desktop using an autoit script.

During testing, I was not able to get the lnk launched without passing the full path to it as a parameter for explorer.exe.

For example:
CODE
$exe = "explorer.exe"
$lnk = @DesktopDir & "\Shortcut to domain.company.local.lnk"
ShellExecute($exe, $lnk)


I tried to launch (ShellExecute() and Run() also trying to use @ComSpec) the lnk directly, but none of those worked as expected; I either get an error "The parameter is incorrect" or nothing shows up.

In task manager, when the autoit script runs, i see "explorer.exe*32" running, but when I go to a command prompt and run explorer.exe, I also saw "explorer.exe" (64-bit) running but both processes seemed to just sit and be idle.

Any advice\thoughts\work-arounds?

Is there a way to get wpi launched after the desktop loads even after reboots (RunOnce?) instead of the way it currently loads which is before the desktop?

Thank you very much.
Kelsenellenelvian
Have you tried the .inf file version of the $oem$ files?

It is built to run after the desktop loads.

Failing that wait till the 1st of the next month ohmy.gif (7.1 soon)
icnocop
I will give it a go and report back.

I downloaded from: http://www.wpiw.net/downloads/post_$oem$.rar

Thank you again. smile.gif
mritter
As Kels mentioned: I added "Load desktop before installation starts" into 7.1.0 which will be released September 1. WPI will launch line normal (RunOnceEx), do your thing, hit Install or timer run out, desktop loads, then WPI starts to install.
icnocop
I tried this but it did not work as expected after a %reboot% sad.gif
icnocop
Thank you.

I am hoping for a solution today\tomorrow.

I found some code that looks like it would work in installer.js but after I made the following changes, a %reboot% does not bring installer.hta back up sad.gif

WriteRegKey("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce\\WPIresume",'mshta "'+wpipath+'\\Common\\Installer.hta"');
// WriteRegKey("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx\\001\\","","REG_SZ");
// WriteRegKey("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx\\001\\1",'mshta "'+wpipath+'\\Common\\Installer.hta"',"REG_SZ");

...
DeleteRegKey("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce\\WPIresume");
//DeleteRegKey("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx\\001\\1");
//DeleteRegKey("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx\\001\\");

Any ideas for a quick fix?

Thanks again!
icnocop
Actually, using the following worked great! smile.gif

WriteRegKey("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce\\WPIresume",'mshta "'+wpipath+'\\Common\\Installer.hta"', "REG_SZ");

Thank you very much!
mritter
Don't count on just changing what reg key it uses to work. It took me 4 hours to build in all the code needed to properly handle reboots, history, etc. Contact me and I will send you a beta copy of 7.1.0.
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.