Jump to content

Windows PE/ Auto open .exe


Recommended Posts

Posted (edited)

I created a windows PE .iso and I am trying to run an .exe automatically once it boots up. If i just get to the CMD i can type the location of the program (PC Doctor service center 8) on the disc ( located in windows/system32/bin/sccui.exe) and it will load perfectly fine. But if i edit the startnet file to automatically run on startup. The program will open and says that it requires java to run. I don't understand why it works when I type it in manually and when I edit the startnet it doesn't work . what's the difference? Any help would be appreciated.

Thanks

Edited by jbrush115

Posted

Post the EXACT command line you use in the command prompt window (which works) and the EXACT command you added to startnet (which fails) and the EXACT error message you get.

It is possible (probable) that it is an issue connected with PATHs or however with environment variables, could it be that the program "automated launch" happens to early?

Have you tried spawning a new console through startnet?.

jaclaz

Posted (edited)

The program is located in \windows\system32\bin\sccui.exe. Once i get to the CMD i can type bin\sccui.exe and the program will run fine. when i edit the startnet i type bin\sccui.exe (i do leave the wpeinit command there by default). this launches the program also but then i get error message of... On top of text box "JavaScript Application"...in the middle "main(): TypeError: pcd.plugin.PluginProxy.Instance().plugin().ProfilingProxy_new is not a function" at the bottom "OK" then it says " A plugin is needed to display the content"

Thanks

Edited by jbrush115
Posted

Yep, but when you open a command console by default it will open in C:\Windows\System32 (more accurately it will open in %systemroot%\system32 ).

Try doing either:

CD /D %systemroot%\system32 & bin\sccui.exe

or

%systemroot%\system32\bin\sccui.exe

jaclaz

Posted (edited)

Both of those commands produce the same Javascript error message. Is there a way to make The command pause for 5 seconds before executing. Maybe it needs more time to load the PE. I have no idea, this is all new to me..

Also I have tried to add Winpeshl.ini and added bin\sccui.exe to that and then CMD never opens and PE seems to just get frozen on startup and nothing ever happens.

Thanks

Edited by jbrush115
Posted

Or maybe it is initiated "too early". :unsure:

If this is the case a PAUSE won't be useful.

Try using in startnet:

cmd.exe /k %systemroot%\system32\bin\test.cmd

and put in %systemroot%\system32\bin\ a test.cmd with the content:

@ECHO OFFSETLOCAL ENABLEEXTENSIONSECHO Test.cmd ECHO %~dp0ECHO Now executing %~dp0bin\sccui.exePAUSE%~dp0bin\sccui.exe

jaclaz

Posted (edited)

it does seem to run but something is wrong with the command it seems. I believe it is the double \bin\bin But I don't know how to correct it.

it shows

X:\windows\system32>wpeinit

X:\windows\system32>cmd.exe /k x:\windows\system32\bin\test.cmd

test.cmd

X:\Windows\system32\bin\

Now executing X:\windows\system32\bin\bin\sccui.exe

press any key to continue . . .

The system cannot find the path specified

Thanks

Edited by jbrush115
Posted

My bad :blushing: remove the "\bin" from lines "ECHO Now executing %~dp0bin\sccui.exe" and "%~dp0bin\sccui.exe" :

@ECHO OFF
SETLOCAL ENABLEEXTENSIONS
ECHO Test.cmd
ECHO %~dp0
ECHO Now executing %~dp0sccui.exe
PAUSE
%~dp0sccui.exe

jaclaz

Posted (edited)

I do get the same error message about javascript.

A side note, once I get the javascript error I can close the error message and the malfunctioning program and type in "bin\sccui.exe" at the CMD and the program will run correctly.

Thanks

Edited by jbrush115
Posted

Strange.

I mean if it is "too early", it shouldn't work from the command line after the error. :unsure:

Try again with:

@ECHO OFFSETLOCAL ENABLEEXTENSIONSECHO Test.cmdECHO %~dp0ECHO Changing directory ...CD /D %~dp0CD ..ECHO Now executing %~dp0sccui.exePAUSEbin\sccui.exe
Try with the above.

Once "normally" i.e. pressing "any key" to end the pause, and once pressing CTRL+C to stop the batch and issuing to that command prompt manually the bin\sccui.exe.

Result should be the same :unsure: (cannot say if working or not working).

jaclaz

Posted

Nope Same error message. So frustrating. I suppose I can just type in the command bin\sccui.exe every time I use the disc about 10 times a day. I just wanted to save a step so that when I boot to PE it can automatically start to run diagnostics thru that program. Im sure your running out of ideas...lol

thanks

Posted

Is in any way the command prompt you get when pressing CTRL+C to stop the batch different from the one that you get after the error?

jaclaz

Posted

You could run the command with ProcMon running. You'll probably find it unable to find a dependent file that contains the function it is looking for. It might be worthwhile to determine which file this is and where it is located, or where the software expects it to be located. For example, it may be looking for it with a relative path, or using an Environment Variable that is not used in WinPE, etc.

Posted (edited)

nope the Command prompt looks exactly the same. Well thanks for all your trying I suppose I give up..

Wish I could just send you the .WIM and you could fix it...lol

Thanks

Edited by jbrush115
Posted (edited)

You could run the command with ProcMon running. You'll probably find it unable to find a dependent file that contains the function it is looking for. It might be worthwhile to determine which file this is and where it is located, or where the software expects it to be located. For example, it may be looking for it with a relative path, or using an Environment Variable that is not used in WinPE, etc.

Yep, but it makes no sense that from a "same" command prompt the stupid thingy works AFTER the first time (when the error presents itself and you press Ok to it and you run the command again) .

At least this is the behaviour I understood from the tests performed :unsure:

@ jbrush115

Usually giving up is NOT an option. :w00t:

Maybe we could call this a "time-out" waiting if some other member has an idea for further tests/approaches.... ;)

jaclaz

Edited by jaclaz

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...