Jump to content

[SOLVED] RunOnce stage - NLITE.CMD wont run .exe


Recommended Posts

SOLVED: For solution skip to this post here

Hi,

Would like some pointers about RunOnce stage. I cannot fathom why RunOnce wont install this SFX.exe. Its tedious having restart clean boots just to troubleshoot this.

A particular app refuses to install (no error given) even though the exe itself works OK if run (manually) after the RunOnce procedure completes (i.e after the desktop shows).. With manual execution it installs as intended. Its a SFX archive, in a directory on the install media. The other SFX executables in that directory work fine also.

Few possibilities:

  • Is there a limit on the number of commands NLITE.CMD can make at RunOnce?
  • Maybe XP does not like SFX packed with the latest WinRAR? Edit: I repacked SFX with older 2006 version of WinRAR. Issue persists.
  • Perhaps daemon installer within the SFX seeks a directory that doesn't exist until complete login (i.e. when task bar appears)?

Heres the example NLITE.CMD (the very last stage of unattended).

@ECHO OFF
for /f "tokens=3" %%i IN ('reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup /v "SourcePath" ^| findstr "REG_SZ"') do set SOURCE=%%i
%SOURCE%\AUTOADD\QL.exe
%SOURCE%\AUTOADD\TCPO.exe
%SOURCE%\AUTOADD\PowerMenu.exe
%SOURCE%\AUTOADD\DreamAquarium.exe
%SOURCE%\AUTOADD\SV.exe
%SOURCE%\AUTOADD\CoreTemp.exe
%SOURCE%\AUTOADD\SumatraPDF.exe
%SOURCE%\AUTOADD\DaemonTools.exe
@ECHO Please Wait as MS Office is Installed...
@ECHO OFF
%SOURCE%\OFFICE2003\SETUP.EXE TRANSFORMS="UNATTENDED.MST" /qn
%SOURCE%\OFFICE2003\O12Conv.msi
%SOURCE%\OFFICE2003\Activate.exe
%windir%\system32\cmd.exe /C "START RunDll32.exe shell32.dll,Control_RunDLL desk.cpl,,3"
EXIT

Really would like daemon integrated into unattended. If all else fails, I will have to instruct users to install it manually instead.

 

 

(love this forum btw - it's really quick).

Edited by shorterxp
Link to comment
Share on other sites


13 hours ago, shorterxp said:

 

Really would like daemon integrated into unattended. If all else fails, I will have to instruct users to install it manually instead.

users ? :w00t:

I believe your post is related to this thread (only to keep things as together as possible and to give context):

https://msfn.org/board/topic/89382-why-cant-you-install-sptdsys-without-rebooting/

Besides the curiosity about the (number of) users that would want to install XP unattended (including Daemon Tools) in 2018, which is of course ONLY a curiosity of very little importance,  are you using the AutoIt ot the AutoHotKey "helper"?

Maybe the issue is with either AutoIt or AutoHotKey not available/not running correctly at the time you run the SFX.

I would try using a "Hello world" compiled script to check if there are issues with either of them, and also check if the runonce entry is created in the Registry.

The original script by MHZ works (or it should, or at least there was not anyone reporting it did not in the last 10 years) so maybe it is the changes you made?

jaclaz

 

 

Link to comment
Share on other sites

Hi jaclaz

For 'users' curiosity, see end of post.

While that thread is related, the problem described here is separate. To put the problem visually:

Attempt 1 
Unattended procedure
Reboot
NLITE.CMD calls other SFX - all of them work
NLITE.CMD calls Daemon_SFX.exe: FAIL
Taskbar appears / Unattended procedure complete
Outcome: Daemon not installed without user input

Attmept 2
Unattended procedure
Reboot
NLITE.CMD calls other SFX - all of them work
Taskbar appears / Unattended procedure complete
Manual execution of Daemon_SFX.exe*: OK
Outcome: Daemon installed but with user input

*file is in same directory as previous.

The only apparent difference is the chronology of taksbar, which marks the end of NLITE.CMD and unattended setup.

MHZs may work but I was less familiar on how to apply it. For me, installing SPTD via cmdlines.txt (t12) and then daemon.exe via NLITE.CMD with the usual reboot in between was simpler (except for this SFX which now won't install automatically - goddamnit!).

 

users: I may distribute my XP install amongst my peers to satisfy a small project. If daemon won't install without user input then I could put a shortcut to the package on the desktop in order for users to install it manually. I could also use MHZ method but I'm curous about why my mehod doesn't work.

Edited by shorterxp
Link to comment
Share on other sites

Yep :), though the curiosity question was about the "number" of users, I wanted to undersatand if the following (unsolicited) advice/opinion was applicable to your case.

Like I believe everyone else (and possibly much before almost everyone else)  I was very interested to these "indistinguishible from magic" unattended installs both from a theoretical and a practical viewpoint.

While the theoretical part remained unscathed and remains till today very interesting (to me at least), I lost a lot of faith in the practical part.

If you have hundreds (or thousands or more) "users", spending tens of hours of your time  to  make a silent/unattended install "perfect" (or however keeping one of your brain "slots" focused to such a minor thing) may be not fully wasteful.

But if the number of users is a bunch of friends or relatives, then it makes more sense to - once you have it working - to write a small set of instructions to complete manually the install and call it a day.

Another question (as well of no actual relevance, only curiosity) is:

WHY Daemon Tools?

I mean, ten years ago there weren't probably that many alternatives, but today there are quite a few AFAICT.

If you prefer (as above curiosity only, no actual urge to reply):

WHICH particular features of Daemon Tools (not available in similar software) did you choose them for?

jaclaz

Link to comment
Share on other sites

  • 3 months later...
On 2/18/2019 at 12:53 AM, shorterxp said:

Can you suggest a lightweight alternative to daemon tools ?

Sure, but you will have to state WHICH features do you use/want, you know, like:

On 11/8/2018 at 12:50 PM, jaclaz said:

WHICH particular features of Daemon Tools (not available in similar software) did you choose them for?

AFAICT Daemon tools are/were a convenient way to mount/access/play/whatever a number of CD/DVD "rips" or dd-like copies in various "common" formats (most of which making no sense whatsoever ab initio).

jaclaz

Link to comment
Share on other sites

5 minutes ago, shorterxp said:

It's to Mount an .iso image

Then you can use IMDISK just fine:

http://reboot.pro/forum/59-imdisk/

http://reboot.pro/topic/2072-imdisk-by-olof-lagerkvist/

 

Or for XP also good ol' Filedisk would do nicely (as it did since 2005 or so and until IMDISK became prevalent):

https://msfn.org/board/topic/38118-filedisk-virtual-disk-driver-for-windows-nt2kx/

jaclaz

Link to comment
Share on other sites

Ok, I uninstalled SPTD rebooted the OS and installed IMGDisk alone and it seems to work without SPTD. This is so much easier, I cannot believe people recommend to use SPTD + Daemon when IMGDisk does it off the bat without messing around with drivers at Unattended. In hindsight so much time was wasted making a silent Daemon installer (i.e. post #1)  -.-

Edited by shorterxp
Link to comment
Share on other sites

 

2 hours ago, shorterxp said:

This is so much easier, I cannot believe people recommend to use SPTD + Daemon when IMGDisk does it off the bat without messing around with drivers at Unattended. In hindsight so much time was wasted making a silent Daemon installer (i.e. post #1)  -.-

Well, your case is border line with the XYZ problem (or the chocolate covered banana :w00t:), it happens very often, and to many people don't worry :), JFYI it is "coded":

https://jdebp.eu/FGA/put-down-the-chocolate-covered-banana.html

In this case the original tool did make what was expected but due to a number of other complications the given alternatives ar simply "better",

jaclaz

 

Link to comment
Share on other sites

For some reason 'Mount with IMDisk Virtual Disk' appears on all files in explorer, even irrelevant ones like cmd.

untitled.PNG.f24ed2c42775345b91cd185384afdeb2.PNG

Expunge the following registry key to prevent this.

 HKEY_CLASSES_ROOT\*\shell\ImDiskMountFile 

u.PNG.a29478e6e4dbcb8a9bc09a6a3f4c2dc7.PNG

Here is my silent repack with this fix included: OneDrive (761kb). It's a SFX archive.

 

 

and yes Chocloate banana is a habit I must admit.

 

 

Thank you for your invaluable assistance once again//

Edited by shorterxp
Link to comment
Share on other sites

Is it possible to run imDisk standalone? i.e. run the VirtualDisk Service temporariliy without incurring installer, nor the need to run service at startup?

Edited by shorterxp
Link to comment
Share on other sites

10 hours ago, shorterxp said:

Is it possible to run imDisk standalone? i.e. run the VirtualDisk Service temporariliy without incurring installer, nor the need to run service at startup?

Yes and no.

Meaning that you need to install the service anyway. (you will need to modify the .inf file besides the install.cmd)

Then you can well start it via command line (and also mount/unmount etc. via command line only without using the control panel app - that you won't install).

As well you can avoid installing awealloc as you won't normally use/need it.

Still, if all in all you:

1) do not *need* the Control Panel app
2) only use it to mount a CD/ISO image

It will be simpler to install Filedisk:

http://www.acc.umu.se/~bosse/

you should be good to go with Filedisk 15 or 16 (besides later builds):

http://www.acc.umu.se/~bosse/filedisk/

 

On the other hand, if you want a "portable" GUI tool, get either the original MS Virtual CD Control:

https://www.microsoft.com/en-us/download/details.aspx?id=38780

or the portable WinCDEmu:

http://wincdemu.sysprogs.org/portable/

jaclaz

 

Link to comment
Share on other sites

To avoid even bigger choclate coated banana, here is the situation / requirement

Ideally, a single executable (thats beside relevant .iso) of which does the following when clicked:
- mounts iso to virtual drive
- launches the autorun.exe on the newy created virtual drive.

This is so to aid users who may be unfamiliar with how to use archive software / have necessary space to unpack the 8gb iso and/or may not know how to mount virtual drive. A exectuable downloaded alongside the iso makes for a more intuitive experience. The autorun inside the iso guides the player with the remainder of the installation. The content is only ever officially distributed as an .iso, which is why I though this would be a good idea.

My current, working, though not ideal solution involves Imdisk_custom.exe (as seen 2nd previous post) in the same directory as the iso, as well as a batch script beside that. Although Imdisk installs perfectly, it would need to be manually uninstalled - this is ok. There is however the small annoyance of two seperate files, now next to the .iso. A single .exe would be better.

I propose a SFX self extracting archive with slimmed down verison of the original 7z archive contents, that 1) installs imdisk, 2) mounts the iso 3) runs autorun in one single instance - However the SFX extracts the batch script to temp folder, which of course is no longer in the same directory as the .iso, so I ask if there is a way to pass the launch directory on to the script.

In other words, If example.iso and example_sfx.exe (latter of which does steps 1,2,3), are in C:/example_folder, and example_sfx.exe is launched, is there a way for the script now in a sfx temp folder / orphaned from the iso, to query (and use) initial launch directory, in this example "C:/example_folder"?

For example:

[...]

%windir%\system32\ImDisk -a -m Z: -f %Mystery_Launch_Dir_variable%\prbf2_1.5.0.0_full.iso
Z:
START "" autorun.exe

Perhaps source_path or start_path is a better descriptor.

An interesting aspect of SFX, which may be related is the sfxcmd variable. Perhaps this can be used in target script?

Quote

SFX module sets sfxname and sfxcmd environment variables before running the setup program. sfxname variable contains a name of SFX archive. sfxcmd variable contains the complete command line received by SFX module. First parameter of this command line is SFX module name. Setup program can read these variables if it needs such information. Also you can specify an expanded %variable% as a parameter, like "Setup=setup.exe %sfxcmd%".

Regarding filedisk:

Quote

1) do not *need* the Control Panel app

2) only use it to mount a CD/ISO image

Both these are true. Modifying the IMDisk install.inf as you suggest in order to avert installation is daunting to me, so I might try filedisk too if its suitable.

I note Filedisk v15 readme states reboot is required and files to be placed in sys32 so maybe it isn't suitable?

 

Thanks for the help

Edited by shorterxp
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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