MSFN Forum: New tool! Run multiple programs from winnt.sif - MSFN Forum

Jump to content


  • 4 Pages +
  • 1
  • 2
  • 3
  • 4
  • You cannot start a new topic
  • You cannot reply to this topic

New tool! Run multiple programs from winnt.sif Rate Topic: -----

#31 User is offline   MadCat1968 

  • Group: Members
  • Posts: 7
  • Joined: 11-July 04

Posted 21 July 2004 - 11:53 PM

Figured out a Win32 application to dismiss the rogue dialog box that pops up on successful install of the 3ware RAID driver at T33 minutes ("3wareAcknowledge.cpp"):
#include <windows.h>

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
    LPSTR lpCmdLine, int nCmdShow)
{
    HWND hwnd = NULL;

    while (hwnd == NULL)
    {
        hwnd = FindWindow (NULL, "Installation Complete");
        Sleep (1000);
    }

    SendMessage (hwnd, WM_CLOSE, 0, 0);
    return 0;
}


Compiled "3wareAcknowledge" binary takes only 36KB of disk space.

Here's my mt39 script:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<mt39>
   <version>0.3.1</version>
   <item>
       <program>%systemdrive%\3wareAcknowledge.exe</program>
       <arguments>bogus</arguments>
       <hide>0</hide>
       <wait>-1</wait>
   </item>
   <item>
       <program>%systemdrive%\Drivers.exe</program>
       <arguments>-y /q /r:n</arguments>
       <hide>0</hide>
       <wait>0</wait>
   </item>
</mt39>


When the 3ware "Installation Complete" dialog box pops up at T33 minutes, the "3wareAcknowledge" program, which was spawned off as a background process by mt39, kicks in and dismisses the dialog box automatically.

You may have a bug with null argument processing with mt39 (haven't tried your latest version yet). I had to pass a bogus argument for "3wareAcknowledge" to prevent mt39 from crashing (see script above).

Thank you for the mt39 utility!


#32 User is offline   big_gie 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 617
  • Joined: 27-July 03

Posted 22 July 2004 - 07:22 AM

I tough of it yesterday, you could have used an AutoIT script to do the same. Maybe it would have been easier but since you've made a cpp exe, the lader is surely smaller then the compiled AutoIT script...

Glad to see you like mt39 :)
I'll need to check out the XML parser to see what it does when there is no arguments given... I'm sure I didn't used TinyXML's "full" capacity so my implementation could be not as stable as it could be...

I've created a SourceForge project but didn't have the time to release anything. Everyone who would like to help will be welcome :rolleyes:

#33 User is offline   Dustinwmew 

  • Member
  • PipPip
  • Group: Members
  • Posts: 122
  • Joined: 11-June 04

Posted 22 July 2004 - 08:34 AM

even with the new .4 I still get that errer.

#34 User is offline   big_gie 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 617
  • Joined: 27-July 03

Posted 22 July 2004 - 08:54 AM

Dustinwmew said:

even with the new .4 I still get that errer.


I think MadCat1968 found the problem:

MadCat1968 said:

You may have a bug with null argument processing with mt39 (haven't tried your latest version yet). I had to pass a bogus argument for "3wareAcknowledge" to prevent mt39 from crashing (see script above).


I've tested your xml posted here and it crashed. You didn't have any arguments in the <argument> tag:

default.xml said:

    <!-- remaping drive -->
    <program>%systemdrive%\Install\MapDice.cmd</program>
    <arguments></arguments>
    <hide>0</hide>
    <wait>0</wait>

I changed this to:

default.xml said:

    <!-- remaping drive -->
    <program>%systemdrive%\Install\MapDice.cmd</program>
    <arguments>bogus</arguments>
    <hide>0</hide>
    <wait>0</wait>

And it seemed to work... Give it a try

#35 User is offline   big_gie 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 617
  • Joined: 27-July 03

Posted 24 July 2004 - 04:21 PM

v0.5 is up
This version correct the empty tag bug. You should not have any more problems Dustinwmew :)
There is also a logging feature and a test mode feature :rolleyes:

#36 User is offline   Bilou_Gateux 

  • Powered by Windows Embedded
  • PipPipPipPipPip
  • Group: Members
  • Posts: 766
  • Joined: 03-January 04

Posted 25 July 2004 - 08:55 AM

Do you think it could be interesting to pass a value as a variable to mt39.exe

winnt.sif
[GuiUnattended]
    ...
    DetachedProgram="%systemdrive%\setup\mt39.exe"
    Arguments="%systemdrive%\setup\default.xml /DevicePath="PnPDrvrs"
    ...

in order to use a value that isn't an existing environnement variable for substitution in the xml file.

<?xml version="1.0" encoding="ISO-8859-2" standalone="no"?>
<mt39 version="0.5" testingmode="0" logging="1">
    <item>
        <program>%systemdrive%\setup\7z.exe</program>
        <arguments>x -y -o%systemdrive%\%DevicePath% %systemdrive%\setup\CfgSets\Fennel\drivers.7z</arguments>
        <hide>1</hide>
        <wait>300</wait>
    </item>
    <item>
        <program>%systemdrive%\setup\7z.exe</program>
        <arguments>x -y -o%systemdrive%\%DevicePath% %systemdrive%\setup\CfgSets\Other\other.7z</arguments>
        <hide>1</hide>
        <wait>300</wait>
    </item>
    <item>
        <program>%systemdrive%\Setup\devpath.exe</program>
        <arguments>%systemdrive%\%DevicePath%</arguments>
        <hide>1</hide>
        <wait>300</wait>
    </item>
</mt39>


devpath.exe is a 8.3 naming convention renamed exe of the SetDevicePath.exe tool written by Pyron :
SOLVED: drivers from CD , possible even without winnt.sif!
Command Line Syntax:

      DevPath path

Description:

      DevPath.exe	searchs installer INF file in specified path subdirectories
  	and add path for all subdirectories containing an INF file
  	to the "DevicePath" value at registry key:
  	HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
                      
Arguments:

      path  specifies a path to process

Example:

      DevPath c:\PNPDrvrs	
  	adds the path of PnP devices INFs files found in all the
  	subdirectories in specified path C:\PNPDrvrs


It may be possible to have a winnt.sif with variable not set and dynamically build the path in the registry AND to set the name of the main folder only with this variable.
[Unattended]
        UnattendMode=FullUnattended
        DriverSigningPolicy=Ignore
       OemPnPDriversPath=   ******blank******


Another alternative would be the ability to set this value with a supplemental XML line rather than supplemental switch but don't know how the syntax could be.

The purpose is to make the whole process needing less customization in XML code and winnt.sif

#37 User is offline   big_gie 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 617
  • Joined: 27-July 03

Posted 25 July 2004 - 09:29 AM

Bilou_Gateux, on Jul 25 2004, 03:55 PM, said:

Do you think it could be interesting to pass a value as a variable to mt39.exe

winnt.sif
[GuiUnattended]
    ...
    DetachedProgram="%systemdrive%\setup\mt39.exe"
    Arguments="%systemdrive%\setup\default.xml /DevicePath="PnPDrvrs"
    ...

Yes that could be a nice idea... :)
Maybe a command line like:
mt39.exe /xml:defaul.xml /var:DevicePath="PnPDrvrs",OtherVar="SomewhereElse",AnotherOne="YouSeeThePoint"

Many ideas come from XPlode as you can see :rolleyes: They do quite the same thing, while mt39 doesn't show anything...

#38 User is offline   big_gie 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 617
  • Joined: 27-July 03

Posted 25 July 2004 - 07:59 PM

v0.6 is up.
Corrected a bug about files not loaded/created in the right directory.
Logging is now better.
Slowly moving to better command line arguments.

#39 User is offline   big_gie 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 617
  • Joined: 27-July 03

Posted 28 July 2004 - 05:31 AM

v0.6.1 is up
It corrects a bug present in the %CD% parsing function...

I'm currently implementing using better command line arguments like:
/xml:pat\to\xml.xml:/xml
/log:pat\with spaces\to\logfile.log:/log
/var:var1=value1:/var
/var:var2=value2:/var
/testingmode:1
/logging:1
for better control.

I use the "/xml:" and ":/xml" to prevent problems with spaces in paths. Also, having 5 characters beside the arguments will prevent the program from stopping reading when there is a space or when a double quote is present in the argument...
/xml:"Path\with some\spaces\in\it\file.xml":/xml
/var:var1=This is a quote " and another one ". They will be present in the variable "var1":/var

#40 User is offline   big_gie 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 617
  • Joined: 27-July 03

Posted 31 July 2004 - 04:05 PM

v0.7 is up

Now supports a full set of comman line switches! See first post for details

#41 User is offline   Bilou_Gateux 

  • Powered by Windows Embedded
  • PipPipPipPipPip
  • Group: Members
  • Posts: 766
  • Joined: 03-January 04

Posted 02 August 2004 - 07:55 AM

Many thanks for the implementation of the command line switches. :)

#42 User is offline   big_gie 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 617
  • Joined: 27-July 03

Posted 03 August 2004 - 08:29 AM

No problem m8 :)

Hope you'll find this usefull!!!

#43 User is offline   twindude 

  • Member
  • PipPip
  • Group: Members
  • Posts: 106
  • Joined: 07-January 04

Posted 03 August 2004 - 08:48 AM

big gie can you run this with diskpart for partitioning a cmd

#44 User is offline   big_gie 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 617
  • Joined: 27-July 03

Posted 03 August 2004 - 12:55 PM

Well maybe. I never used diskpart. I do know though that it can only be run in Windows. mt39 can only be run in windows too.

Why would you want to format your drive when Windows is installing/finished installing?? Or maybe you'd want to use it sometime else...

#45 User is offline   big_gie 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 617
  • Joined: 27-July 03

Posted 04 August 2004 - 06:05 PM

v0.7.1 is up
Bug corrected with environment variables longer than 20 characters couldn't be resolved (%userprofile%, %appdata%, etc.)
If you use those variables, update the program!!!

#46 User is offline   big_gie 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 617
  • Joined: 27-July 03

Posted 04 August 2004 - 08:15 PM

I know people using XPlode wanted conditional statement. Maybe I'll try to add this.

I'm trying to imagine how the xml could look like . Here's what I've came with:
<item>
  <program>%windir%\system32\cmd.exe</program>
  <arguments>SourceDrive = %SourceDrive%
             $mt39_PathToXml = %$mt39_PathToXml%
             $mt39_PathToExe %$mt39_PathToExe%
             $mt39_PathToLog %$mt39_PathToLog%
             $mt39_NameOfXml %$mt39_NameOfXml%
             $mt39_NameOfXmlNoExt %$mt39_NameOfXmlNoExt%
             $mt39_NameOfLog %$mt39_NameOfLog%
             $mt39_NameOfLogNoExt %$mt39_NameOfLogNoExt%
             $mt39_OriginalArguments %$mt39_OriginalArguments%</arguments>
  <hide>1</hide>
  <wait>300</wait>
	</item>
    <conditional>
        <if condition="Execute">
            <command>command to execute</command>
            <then>
                <do what="Execute">
                    <program>cmd.exe</program>
                    <arguments>%SourceDrive%\<arguments>
                    <hide>1</hide>
                    <wait>300</wait>
                </do>
            </then>
            <else>
                <do what="Execute">
                    <program>%windir%\explorer.exe</program>
                    <arguments>%systemdrive%</arguments>
                    <hide>1</hide>
                    <wait>300</wait>
                </do>
            </else>
        </if>
        <if condition="StringCompare">
            <string1>This is string 1</string1>
            <string2>and this is string 2</string2>
            <then>
                <do what="Move">
                    <source>cmd.exe</source>
                    <destination>%SourceDrive%\</destination>
                </do>
            </then>
            <else>
                <do what="Execute">
                    <program>%windir%\explorer.exe</program>
                    <arguments>%systemdrive%</arguments>
                    <hide>1</hide>
                    <wait>300</wait>
                </do>
                <do what="Copy">
                    <source>%SourceDrive%\$OEM$\cmdlines.txt</source>
                    <destination>%Systemdrive%\</destination>
                </do>
            </else>
        </if>
    </conditional>

What do you think about?

I also added some new variables that will be parsed inside the xml like %$mt39_PathToExe% and others...

#47 User is offline   big_gie 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 617
  • Joined: 27-July 03

Posted 13 August 2004 - 04:20 PM

v0.8.1 is up.

New variables supported and exe inside the path variable can be called without complete path. Example:
   <item>
        <program>7z</program>
        <arguments>x -y -o%systemdrive%\setup\drivers\scanner %systemdrive%\setup\drivers\scanner.7z</arguments>
        <hide>1</hide>
        <wait>300</wait>
    </item>
    <item>
        <program>notepad</program>
        <arguments>%systemdrive%\boot.ini</arguments>
        <hide>0</hide>
        <wait>300</wait>
    </item>


#48 User is offline   Bâshrat the Sneaky 

  • aka Wim Leers
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,214
  • Joined: 29-October 03
  • OS:none specified
  • Country: Country Flag

Posted 14 August 2004 - 03:19 AM

Thank you!

Keep up the good work.

I haven't got time to test your program yet, but I'm going to use it for sure.

Greetz,

Bâshrat the Sneaky

#49 User is offline   big_gie 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 617
  • Joined: 27-July 03

Posted 14 August 2004 - 06:15 PM

Bilou_Gateux, on Jul 25 2004, 03:55 PM, said:

Do you think it could be interesting to pass a value as a variable to mt39.exe

winnt.sif
[GuiUnattended]
    ...
    DetachedProgram="%systemdrive%\setup\mt39.exe"
    Arguments="%systemdrive%\setup\default.xml /DevicePath="PnPDrvrs"
    ...

in order to use a value that isn't an existing environnement variable for substitution in the xml file.

<?xml version="1.0" encoding="ISO-8859-2" standalone="no"?>
<mt39 version="0.5" testingmode="0" logging="1">
    <item>
        <program>%systemdrive%\setup\7z.exe</program>
        <arguments>x -y -o%systemdrive%\%DevicePath% %systemdrive%\setup\CfgSets\Fennel\drivers.7z</arguments>
        <hide>1</hide>
        <wait>300</wait>
    </item>
    <item>
        <program>%systemdrive%\setup\7z.exe</program>
        <arguments>x -y -o%systemdrive%\%DevicePath% %systemdrive%\setup\CfgSets\Other\other.7z</arguments>
        <hide>1</hide>
        <wait>300</wait>
    </item>
    <item>
        <program>%systemdrive%\Setup\devpath.exe</program>
        <arguments>%systemdrive%\%DevicePath%</arguments>
        <hide>1</hide>
        <wait>300</wait>
    </item>
</mt39>


devpath.exe is a 8.3 naming convention renamed exe of the SetDevicePath.exe tool written by Pyron :
SOLVED: drivers from CD , possible even without winnt.sif!
Command Line Syntax:

      DevPath path

Description:

      DevPath.exe	searchs installer INF file in specified path subdirectories
  	and add path for all subdirectories containing an INF file
  	to the "DevicePath" value at registry key:
  	HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
                      
Arguments:

      path  specifies a path to process

Example:

      DevPath c:\PNPDrvrs	
  	adds the path of PnP devices INFs files found in all the
  	subdirectories in specified path C:\PNPDrvrs


It may be possible to have a winnt.sif with variable not set and dynamically build the path in the registry AND to set the name of the main folder only with this variable.
[Unattended]
        UnattendMode=FullUnattended
        DriverSigningPolicy=Ignore
       OemPnPDriversPath=   ******blank******


Another alternative would be the ability to set this value with a supplemental XML line rather than supplemental switch but don't know how the syntax could be.

The purpose is to make the whole process needing less customization in XML code and winnt.sif

I wasn't able to remove the winnt.sif's OemPnPDriversPath with devpath.exe... Maybe because there is no registry @ t-39...

I'm still looking for a way to make it possible...

#50 User is offline   big_gie 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 617
  • Joined: 27-July 03

Posted 14 August 2004 - 08:00 PM

Hey Bâshrat the Sneaky, your PM box is full!!! :) I can't reply to you! :)

Share this topic:


  • 4 Pages +
  • 1
  • 2
  • 3
  • 4
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy