Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 

Sign in to follow this  
big_gie

New tool! Run multiple programs from winnt.sif

Recommended Posts

I'm going to try this tool.

but new to 7zip archiver, could you confirm the settings when i'm creating my PnP drivers archive.

Archive format: 7z

Compression level: Ultra

Compression method: LZMA

Dictionary size: 32 MB

World size: 64

Create Solid archive YES

Parameters: none

on my first attempt, the archive extract well on the running box used to create it but unable to extract it during the unattended install :

Error: file is not supported archive

the command used in mt39.exe is 7z.exe x -y -o%systemdrive% %systemdrive%\PnPDrvrs.7z

and both files exe and archive are copied in %systemdrive%

It's not a mt39.exe error but rather an operator error.

Do somebody use the command line to build his archive and give me the right syntax (especially the switches used).

Thanks

found some answers with a search "7zip" in Drivers section...

Nethertheless, you can answer here for more details...

may be off topic...

Share this post


Link to post
Share on other sites
Using the mt39 method, my SFX archive fails to extract and it does not pop up any window indicating % extraction completed.

The old way works:

[GuiUnattended]
   AdminPassword=*
   AutoLogon=Yes
   OEMSkipWelcome=1
   OEMSkipRegional=1
   TimeZone=35
   DetachedProgram="%systemdrive%\Drivers.exe"
   Arguments="-y /q /r:n"

But not the mt39 way:

[GuiUnattended]
   AdminPassword=*
   AutoLogon=Yes
   OEMSkipWelcome=1
   OEMSkipRegional=1
   TimeZone=35
   DetachedProgram="%systemdrive%\mt39.exe"
   Arguments="%systemdrive%\default.xml"

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<mt39>
   <version>0.3</version>
   <item>
       <program>%systemdrive%\Drivers.exe</program>
       <arguments>-y /q /r:n</arguments>
       <hide>0</hide>
       <wait>0</wait>
   </item>
</mt39>

Did I do something wrong here? I hope to employ the mt39 method to add more commands later to take care of rogue dialog boxes that may pop up on some vendor driver installs (3ware RAID drivers in particular). This is for home use. Thanks!

Something I forgot to mention in the main post:

Since the XML implentation is quite simple (TinyXML v2.3.1 Beta) the program crashes if the xml isn't valid... So to be sure that the xml and program have the same version (I could add some feature, so the xml file could change), I've included the <version></version> tag in the xml file. This value needs to match the program's version.

Actually, mt39 is at version 0.3.1 so your xml should have:

<version>0.3.1</version> instead of <version>0.3</version>

Try it in windows before to see if it works (place the Drivers.exe on youre C: drive) to see if it exctract. It could be also a character encoding problem. I used PSPad v4.3.0 to edit the xml file. With this, it is easy to set the file character encoding to UTF-8 (wich you should use)

I'll had a feature to test things (check xml, looks for the correct files but don't execute them and report with a message box...) and maybe logging...

Hope this helped...

Share this post


Link to post
Share on other sites
Archive format: 7z

Compression level: Ultra

Compression method: LZMA

Dictionary size: 32 MB

World size: 64

Create Solid archive YES

Parameters: none

Thats what I'm using :)

It should be ok. I'm using the GUI (left click on files->7zip->Add to archive... then the same options as you) and it works fine, in windows and @t-39 (I'm using this since before mt39 so it should be ok). Have you tested the archieve in windows? Just after creating it? I think the first time I used 7zip the archieve I created didn't worked and I was scared 7zip wasn't working correctly but never had trouble with it...

Can you post a screenshot of the error?

Hope this helped too...

Share this post


Link to post
Share on other sites

I have a poblem, mt39 says that it can't open default.xml.

heres default.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
   mt39.exe
   Program to execute things @ t-39 of Windows XP unattended installation
   The WinMain section was taken from http://winprog.org/tutorial/simple_window.html
       (With step 2 and 3 stripped)
   The exec.cpp was taken from GOFF Concepts Intuitive Software
   http://goff.nu/techarticles/development/cpp/createprocess.html
   The XML parser is TinyXML avaible here under the zlib license:
   http://www.grinninglizard.com/tinyxml/index.html

   18 07 2004
   v0.3
       Now uses xml files for config!
           program: the program to execute. May contain variables, spaces, etc.
           arguments: arguments of the program. May contain variables, spaces, etc.
           hide: 1 to hide the window, 0 to show it.
           wait: > 1 Number of seconds to wait for the process. After this time,
                     mt39 will continue with other program ignoring the current process.
                 = 0 Wait until the process finishes.
                 = -1 Will not wait: will launch the next item right away.
       Limitations: Some problems with wide characters. It won't be possible to
                    use special characters (like &ecute; and other accents)


-->
<mt39>
   <version>0.3.1</version>
   <item>
       <!-- remaping drive -->
       <program>%systemdrive%\Install\MapDice.cmd</program>
       <arguments></arguments>
       <hide>0</hide>
       <wait>0</wait>
   </item>
   <item>
       <!-- move program file dir -->
       <program>%systemdrive%\Install\MoveProgramDIR.reg</program>
       <arguments></arguments>
       <hide>0</hide>
       <wait>0</wait>
   </item>
   <item>
       <!-- move temp folder -->
       <program>%systemdrive%\install\MovTempFile.bat</program>
       <arguments></arguments>
       <hide>0</hide>
       <wait>0</wait>
   </item>
</mt39>

and this is my winnt.sif:

;SetupMgrTag
[Data]
   AutoPartition=0
   MsDosInitiated="0"
   UnattendedInstall="Yes"

[Unattended]
   FileSystem=*
   UnattendMode=FullUnattended
   OemSkipEula=Yes
   OemPreinstall=Yes
   UnattendSwitch="yes"
   TargetPath=\WINDOWS
   ProgramFilesDir="p:\Program Files"
   CommonProgramFilesDir="p:\Program Files\Common Files"

[GuiUnattended]
   AdminPassword=I am not telling!
   EncryptedAdminPassword=Yes
   OEMSkipRegional=1
   TimeZone=35
   OemSkipWelcome=1
   ProfilesDir="p:\Documents and Settings\"
   DetachedProgram="%systemdrive%\Install\DetachedProgram\mt39.exe"
   Arguments="%systemdrive%\Install\DetachedProgram\default.xml"

[UserData]
   ProductID=babby-would-loved-tonot-name
   FullName="comp1"
   OrgName="Famly"
   ComputerName=Level1-Sys1-Main

[Display]
   BitsPerPel=16
   Xresolution=800
   YResolution=600

[TapiLocation]
   CountryCode=1
   Dialing=Tone
   AreaCode=410

[Identification]
   JoinWorkgroup=Home

[Networking]
   InstallDefaultComponents=No

[NetAdapters]
   Adapter1=params.Adapter1

[params.Adapter1]
   INFID=*

[NetClients]
   MS_MSClient=params.MS_MSClient

[NetProtocols]
   MS_TCPIP=params.MS_TCPIP

[params.MS_TCPIP]
   DNS=Yes
   UseDomainNameDevolution=No
   EnableLMHosts=Yes
   AdapterSections=params.MS_TCPIP.Adapter1

[params.MS_TCPIP.Adapter1]
   SpecificTo=Adapter1
   DHCP=Yes
   WINS=No
   NetBIOSOptions=0

[Components]
   msmsgs=off
   msnexplr=off

[Shell]
   DefaultStartPanelOff = Yes
   DefaultThemesOff = Yes

[GuiRunOnce]
   %systemdrive%\install\setup.bat

I have tryed it with and without Arguments(it is in the same folder so it does not need them). withour arguments it gives a massge and does not work, but with arguments it does not give a massge but does not work also.

Share this post


Link to post
Share on other sites

Yeah if you remove a tag it will crash (there isn't a "checking" method to see if the tag exist, and if it doesn't and the program is trying to access it, TinyXML will crash... I'll try to add checking soon).

Be sure that your xml file is encoded in UTF-8. Notepad supports this (save as -> encoding -> UTF-8), ConTEXT doesn't, PSPad does (thats what I'm using and I recommend it, its freeware).

Have you found the problem? What was it?

Share this post


Link to post
Share on other sites

I Have not found the problem, I only found some thing that I missspelld, but it did not fix it.

"Cannot open file "default.xml" for reading, exiting"

I saved as UTF-8.

Share this post


Link to post
Share on other sites

When you say it tells you:

"Cannot open file "default.xml" for reading, exiting"

what was the command line you gave? None? Or if you gave it another one, it could be a bug... I don't have the source here at work so I'll try to check it this evening.

What about open source? If people like it enought it could be possible...

Share this post


Link to post
Share on other sites

I did get mt39 to work. I had to re-download the package to get the updated version of mt39. My copy was corrupt or something. I'm excited by the potential of this utility and learned something new in the process.

Unfortunately for me, I found that jscript can't execute that early so I can't put this utility to good use until I find another way to dismiss the rogue dialog box that pops up on succesfull install of 3ware RAID driver. Not really unattended install until I resolve this problem. :)

Share this post


Link to post
Share on other sites

@MadCat1968

Never tryed to see if scripts can be executed @t-39, but have you tryed to execute "%windir%\wscript.exe path\to\your\script.js" and not only path\to\your\script.js ?

Also, are you sure you need to install your drivers? You're aware of MSFN's unattended driver guide?

Share this post


Link to post
Share on other sites

I did something like (didn't save the actual script so typing out from memory):

"%systemdrive%\WINDOWS\System32\wscript.exe %systemdrive%\3wareCheck.js"

The JS script works fine from a full blown windows installation, but not from a Windows pre-install environment at t39. I'm going to try to create a Win32 application that performs the same tasks as the following jscript (3wareCheck.js):

function getWin(win, inc)
{
   while (!WshShell.AppActivate(win))
   {
       WScript.Sleep(inc);
   }

   return true;
}

var WshShell = new ActiveXObject("WScript.Shell");
getWin("Installation Complete", 5000);
WshShell.SendKeys ("{ENTER}");
WScript.Sleep(100);
WScript.quit();

I've been studying the Unattend Install link for the last two weeks. I believe this window pops up for normal F6 installs of 3ware drivers anyway (IIRC). Attached is my attempt to invoke the jscript interpreter at t39 (The 3ware script has been spawned off into the background; mt39 is waiting for the 7z extraction task to complete):

post-70-1090421387_thumb.jpg

Share this post


Link to post
Share on other sites

Hum it seems like you won't be able to run scripts at t-39... thats sad...

Again, are you sure you need to run the setup.exe file for your driver? I do not run anything to install my drivers; I extract them somewhere and tell windows where to find them...

If you absolutly need to run the setup.exe file to install your driver, do you know witch type of setup is it? Inno Setup? Wise? NSIS? MSI? Maybe you could find a switch that get rid of the "Setup Complete" popup...

You could always run the setup.exe via mt39 and set the wait tag to the number of seconds you think it should have finished installing and add another item to the xml killing the window with pskill...

Share this post


Link to post
Share on other sites

I'm not running a "setup.exe". I'm just trying to keep the dialog box from popping up when the RAID driver comes "online". This is just the normal INF detect and install. I'm installing the 3ware RAID device driver via "OemPnPDriversPath" method.

I could install the 3ware driver via the setup.exe method at t12 where the jscript environment is present. But I'm trying to do it the right way via the "OemPnpDriversPath" method.

Share this post


Link to post
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

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×