<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[DriverPacks.net Forum - [Request] Fake setup.exe source]]></title>
		<link>http://forum.driverpacks.net/viewtopic.php?id=2973</link>
		<description><![CDATA[The most recent posts in [Request] Fake setup.exe source.]]></description>
		<lastBuildDate>Mon, 11 Aug 2008 15:24:40 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: [Request] Fake setup.exe source]]></title>
			<link>http://forum.driverpacks.net/viewtopic.php?pid=23114#p23114</link>
			<description><![CDATA[<div class="quotebox"><cite>OverFlow wrote:</cite><blockquote><p>i bwelived that powerpacker used base in API mode same as Autoimage...</p></blockquote></div><p>That&#039;s correct <img src="http://forum.driverpacks.net/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>I used a different fake setup, IIRC. I&#039;ll try to find it back, but don&#039;t expect it soon.</p>]]></description>
			<author><![CDATA[null@example.com (Wim Leers)]]></author>
			<pubDate>Mon, 11 Aug 2008 15:24:40 +0000</pubDate>
			<guid>http://forum.driverpacks.net/viewtopic.php?pid=23114#p23114</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Request] Fake setup.exe source]]></title>
			<link>http://forum.driverpacks.net/viewtopic.php?pid=23060#p23060</link>
			<description><![CDATA[<p>No, you can hide it like this :</p><div class="codebox"><pre><code>var
 Title : Array[0..512]of char;
begin
    // get current title window
  GetConsoleTitle(PChar(@Title ),SizeOf(Title ));
  ShowWindow(GetConsoleWindow, SW_HIDE);</code></pre></div><p>Cheers <img src="http://forum.driverpacks.net/img/smilies/wink.png" width="15" height="15" alt="wink" /></p>]]></description>
			<author><![CDATA[null@example.com (Kal)]]></author>
			<pubDate>Sat, 09 Aug 2008 00:48:48 +0000</pubDate>
			<guid>http://forum.driverpacks.net/viewtopic.php?pid=23060#p23060</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Request] Fake setup.exe source]]></title>
			<link>http://forum.driverpacks.net/viewtopic.php?pid=23059#p23059</link>
			<description><![CDATA[<p>if you use {$APPTYPE CONSOLE} the console window is visible. using {$APPTYPE GUI} hides it.</p>]]></description>
			<author><![CDATA[null@example.com (jaws1975)]]></author>
			<pubDate>Sat, 09 Aug 2008 00:46:39 +0000</pubDate>
			<guid>http://forum.driverpacks.net/viewtopic.php?pid=23059#p23059</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Request] Fake setup.exe source]]></title>
			<link>http://forum.driverpacks.net/viewtopic.php?pid=23052#p23052</link>
			<description><![CDATA[<p>Thanks everybody for the code!</p><p>@jaws1975 : just use {$APPTYPE CONSOLE} <img src="http://forum.driverpacks.net/img/smilies/wink.png" width="15" height="15" alt="wink" /></p><p>I really need to learn Windows API to leave Delphi and just code in plain old C <img src="http://forum.driverpacks.net/img/smilies/tongue.png" width="15" height="15" alt="tongue" /></p>]]></description>
			<author><![CDATA[null@example.com (Kal)]]></author>
			<pubDate>Fri, 08 Aug 2008 18:49:24 +0000</pubDate>
			<guid>http://forum.driverpacks.net/viewtopic.php?pid=23052#p23052</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Request] Fake setup.exe source]]></title>
			<link>http://forum.driverpacks.net/viewtopic.php?pid=23044#p23044</link>
			<description><![CDATA[<p>i bwelived that powerpacker used base in API mode same as Autoimage...</p><p>Well ya learn somthin new every day... <img src="http://forum.driverpacks.net/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p>]]></description>
			<author><![CDATA[null@example.com (OverFlow)]]></author>
			<pubDate>Fri, 08 Aug 2008 10:03:20 +0000</pubDate>
			<guid>http://forum.driverpacks.net/viewtopic.php?pid=23044#p23044</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Request] Fake setup.exe source]]></title>
			<link>http://forum.driverpacks.net/viewtopic.php?pid=23042#p23042</link>
			<description><![CDATA[<div class="quotebox"><cite>OverFlow wrote:</cite><blockquote><p>Um no if there is a folder at root named OEM then we have found the DriverPacks. <br />(we are the only ones who use this name <br />if you use it for something else then shame on you,</p></blockquote></div><p>Well, that&#039;s not entirely correct.&nbsp; Lots of software use the OEM folder (not to be confused with the $OEM$ folder).<br />Siginet&#039;s PowerPacker uses the OEM folder for stuff as well as OEMscan (for pre-activating OEM PCs with oembios files).<br />Siginet and Bâshrat the Sneaky worked together on the project years ago since PowerPacker will integrate DriverPacks without using DPBase.</p><p>I&#039;ve never had a problem with files living together in the OEM folder so long as the filenames are unique.</p>]]></description>
			<author><![CDATA[null@example.com (mr_smartepants)]]></author>
			<pubDate>Fri, 08 Aug 2008 04:46:06 +0000</pubDate>
			<guid>http://forum.driverpacks.net/viewtopic.php?pid=23042#p23042</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Request] Fake setup.exe source]]></title>
			<link>http://forum.driverpacks.net/viewtopic.php?pid=23040#p23040</link>
			<description><![CDATA[<p>this is one I made a little while ago. written in Delphi.</p><p>the first one will show dialogs if errors. The second lacks the dialogs but will be a smaller file. third creates a log file in systemroot.<br />to debug change...<br />{$APPTYPE GUI}<br />to...<br />{$APPTYPE CONSOLE}</p><p>to debug presetup.cmd change...<br />SW_HIDE<br />to...<br />SW_SHOWNORMAL</p><p>Compile it in Delphi.</p><p>USE AT OWN RISK!</p><p>with dialogs...<br /></p><div class="codebox"><pre><code>program setup;

{$APPTYPE GUI}

uses
  SysUtils, Windows, ShellAPI, Dialogs;

{$R *.RES}

  procedure ShellExecute_AndWait(FileName: string; Params: string; Visible: DWORD);
var
  exInfo: TShellExecuteInfo;
  Ph: DWORD;
begin
  FillChar(exInfo, SizeOf(exInfo), 0);
  with exInfo do
  begin
    cbSize := SizeOf(exInfo);
    fMask := SEE_MASK_NOCLOSEPROCESS or SEE_MASK_FLAG_DDEWAIT;
    Wnd := GetActiveWindow();
    ExInfo.lpVerb := &#039;open&#039;;
    ExInfo.lpParameters := PChar(Params);
    lpFile := PChar(FileName);
    nShow := Visible;
  end;
  if ShellExecuteEx(@exInfo) then
    Ph := exInfo.HProcess
  else
  begin
    // if error
    Exit;
  end;
  WaitForSingleObject(ExInfo.hProcess, INFINITE);

  CloseHandle(Ph);
end;

var
  setupExe, setuporgExe, setupoldExe, cmdParams : String;
  i : Integer;
  
begin
   
    setupExe := &#039;setup.exe&#039;;
    setupoldExe := &#039;setupold.exe&#039;;
    setuporgExe := &#039;setuporg.exe&#039;;

    cmdParams := ParamStr(1);
    if ParamCount &gt; 1 then
    begin
      for i := 2 to ParamCount do
        cmdParams := cmdParams+&#039; &#039;+ParamStr(i);
    end;

    if not RenameFile(setupExe, setupoldExe) then
        ShowMessage(&#039;Error renaming setup to setupold.&#039;);

    if not RenameFile(setuporgExe, setupExe) then
        ShowMessage(&#039;Error renaming setuporg to setup.&#039;);

    if FileExists(&#039;presetup.cmd&#039;) then
        ShellExecute_AndWait(PChar(&#039;presetup.cmd&#039;), PChar(&#039;nada&#039;), SW_HIDE)
    else
        ShowMessage(&#039;Error! no presetup.cmd file.&#039;);

    if not FileExists(setupExe) then
        ShowMessage(&#039;Error! no setup.exe file.&#039;);

    ShellExecute_AndWait(PChar(&#039;setup.exe&#039;), PChar(cmdParams), SW_SHOWNORMAL);

end.</code></pre></div><p>without dialogs...<br /></p><div class="codebox"><pre><code>program setup;

{$APPTYPE GUI}

uses
  SysUtils, Windows, ShellAPI;

{$R *.RES}

  procedure ShellExecute_AndWait(FileName: string; Params: string; Visible: DWORD);
var
  exInfo: TShellExecuteInfo;
  Ph: DWORD;
begin
  FillChar(exInfo, SizeOf(exInfo), 0);
  with exInfo do
  begin
    cbSize := SizeOf(exInfo);
    fMask := SEE_MASK_NOCLOSEPROCESS or SEE_MASK_FLAG_DDEWAIT;
    Wnd := GetActiveWindow();
    ExInfo.lpVerb := &#039;open&#039;;
    ExInfo.lpParameters := PChar(Params);
    lpFile := PChar(FileName);
    nShow := Visible;
  end;
  if ShellExecuteEx(@exInfo) then
    Ph := exInfo.HProcess
  else
  begin
    // if error
    Exit;
  end;
  WaitForSingleObject(ExInfo.hProcess, INFINITE);

  CloseHandle(Ph);
end;

var
  setupExe, setuporgExe, setupoldExe, cmdParams : String;
  i : Integer;
  
begin
   
    setupExe := &#039;setup.exe&#039;;
    setupoldExe := &#039;setupold.exe&#039;;
    setuporgExe := &#039;setuporg.exe&#039;;

    cmdParams := ParamStr(1);
    if ParamCount &gt; 1 then
    begin
      for i := 2 to ParamCount do
        cmdParams := cmdParams+&#039; &#039;+ParamStr(i);
    end;

    if RenameFile(setupExe, setupoldExe) then;

    if RenameFile(setuporgExe, setupExe) then;

    if FileExists(&#039;presetup.cmd&#039;) then
        ShellExecute_AndWait(PChar(&#039;presetup.cmd&#039;), PChar(&#039;nada&#039;), SW_HIDE);    

    ShellExecute_AndWait(PChar(&#039;setup.exe&#039;), PChar(cmdParams), SW_SHOWNORMAL);

end.</code></pre></div><p>creates a log file in systemroot...<br /></p><div class="codebox"><pre><code>program setup;

{$APPTYPE GUI}

uses
  SysUtils, Windows, ShellAPI;

{$R *.RES}

  procedure ShellExecute_AndWait(FileName: string; Params: string; Visible: DWORD);
var
  exInfo: TShellExecuteInfo;
  Ph: DWORD;
begin
  FillChar(exInfo, SizeOf(exInfo), 0);
  with exInfo do
  begin
    cbSize := SizeOf(exInfo);
    fMask := SEE_MASK_NOCLOSEPROCESS or SEE_MASK_FLAG_DDEWAIT;
    Wnd := GetActiveWindow();
    ExInfo.lpVerb := &#039;open&#039;;
    ExInfo.lpParameters := PChar(Params);
    lpFile := PChar(FileName);
    nShow := Visible;
  end;
  if ShellExecuteEx(@exInfo) then
    Ph := exInfo.HProcess
  else
  begin
    // if error
    Exit;
  end;
  WaitForSingleObject(ExInfo.hProcess, INFINITE);

  CloseHandle(Ph);
end;

var
  setupExe, setuporgExe, setupoldExe, cmdParams, winDir : String;
  i : Integer;
  logFile : TextFile;
  
begin
    winDir := GetEnvironmentVariable(&#039;SystemRoot&#039;);
    AssignFile(logFile, winDir+&#039;\presetup.log&#039;);
    ReWrite(logFile);
    WriteLn(logFile, &#039;::::::::: Presetup Log File :::::::::&#039;);
    WriteLn(logFile, &#039;Fake setup.exe file Â© 2008 jaws1975&#039;);
    WriteLn(logFile, &#039;&#039;);
    WriteLn(logFile, &#039;Initializing presetup...&#039;);

    setupExe := &#039;setup.exe&#039;;
    setupoldExe := &#039;setupold.exe&#039;;
    setuporgExe := &#039;setuporg.exe&#039;;

    WriteLn(logFile, &#039;Preparing commandline parameters to pass to real setup.exe...&#039;);
    cmdParams := ParamStr(1);
    if ParamCount &gt; 1 then
    begin
      for i := 2 to ParamCount do
        cmdParams := cmdParams+&#039; &#039;+ParamStr(i);
    end;

    WriteLn(logFile, &#039;Renaming setup.exe to setupold.exe...&#039;);
    if not RenameFile(setupExe, setupoldExe) then
        WriteLn(logFile, &#039;   error renaming setup.exe to setupold.exe...&#039;)
    else
        WriteLn(logFile, &#039;   renamed setup.exe to setupold.exe...&#039;);

    WriteLn(logFile, &#039;Renaming setuporg.exe to setup.exe...&#039;);
    if not RenameFile(setuporgExe, setupExe) then
        WriteLn(logFile, &#039;   error renaming setuporg.exe to setup.exe...&#039;)
    else
        WriteLn(logFile, &#039;   renamed setuporg.exe to setup.exe...&#039;);

    WriteLn(logFile, &#039;Launching presetup.cmd...&#039;);
    if FileExists(&#039;presetup.cmd&#039;) then
        ShellExecute_AndWait(PChar(&#039;presetup.cmd&#039;), PChar(&#039;nada&#039;), SW_HIDE);

    if not FileExists(setupExe) then
        WriteLn(logFile, &#039;ERROR! setup.exe missing...&#039;)
    else
        WriteLn(logFile, &#039;Launching real setup.exe with parameters...&#039;);
    WriteLn(logFile, &#039;   &#039;+cmdParams);
    CloseFile(logFile);

    ShellExecute_AndWait(PChar(&#039;setup.exe&#039;), PChar(cmdParams), SW_SHOWNORMAL);
    
end.</code></pre></div><p>removing {$APPTYPE GUI} will cause it not to work. it says gui but there is no screen output.</p><p>use it or modify it as you like.</p><p>basically what it does is renames setup.exe to setupold.exe then rename setuporg.exe to setup.exe. it then launches presetup.cmd and waits for it to finish. it then launches the real setup.exe. It must wait for the real setup.exe to finish before the fake setup.exe closes.</p><p>I tried deleting setupold.exe but it would not delete when I tried.</p>]]></description>
			<author><![CDATA[null@example.com (jaws1975)]]></author>
			<pubDate>Fri, 08 Aug 2008 02:03:22 +0000</pubDate>
			<guid>http://forum.driverpacks.net/viewtopic.php?pid=23040#p23040</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Request] Fake setup.exe source]]></title>
			<link>http://forum.driverpacks.net/viewtopic.php?pid=23037#p23037</link>
			<description><![CDATA[<p>Thanks for searching OverFlow! I should have done this myself... In fact, I check the very first pages and the last one, my bad.<br />It seems to be C language, but this Win32 API is really difficult to read, I should buy a book <img src="http://forum.driverpacks.net/img/smilies/wink.png" width="15" height="15" alt="wink" /></p><p>Kal</p>]]></description>
			<author><![CDATA[null@example.com (Kal)]]></author>
			<pubDate>Fri, 08 Aug 2008 00:08:26 +0000</pubDate>
			<guid>http://forum.driverpacks.net/viewtopic.php?pid=23037#p23037</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Request] Fake setup.exe source]]></title>
			<link>http://forum.driverpacks.net/viewtopic.php?pid=23036#p23036</link>
			<description><![CDATA[<p>well i found Pyrons original post and one version of the source code for setup<br /><a href="http://www.msfn.org/board/SOLVED-drivers-from-CD-t12566.html&amp;view=findpost&amp;p=159358#entry159358">http://www.msfn.org/board/SOLVED-driver … ntry159358</a></p><div class="codebox"><pre><code>#include &quot;windows.h&quot;
int APIENTRY WinMain(HINSTANCE hInstance,
                    HINSTANCE hPrevInstance,
                    LPSTR     lpCmdLine,
                    int       nCmdShow )
{

    SHELLEXECUTEINFO mySHELLEXECUTEINFO;

    mySHELLEXECUTEINFO.cbSize=sizeof(SHELLEXECUTEINFO);
    mySHELLEXECUTEINFO.fMask=SEE_MASK_NOCLOSEPROCESS;
    mySHELLEXECUTEINFO.hwnd=NULL;
    mySHELLEXECUTEINFO.lpVerb=&quot;Open&quot;;
    mySHELLEXECUTEINFO.lpFile=&quot;cmd.exe&quot;;
    mySHELLEXECUTEINFO.lpParameters=&quot;/C setup.cmd&quot;;
    mySHELLEXECUTEINFO.lpDirectory=&quot;.&quot;;
    mySHELLEXECUTEINFO.nShow=NULL; // or SW_SHOW;

    ShellExecuteEx(&amp;mySHELLEXECUTEINFO);
    WaitForSingleObject(mySHELLEXECUTEINFO.hProcess,INFINITE);

    return 0;
}</code></pre></div><p>I also noticed you added the last post to that thread... today in fact... </p><p>i guess you didnt read all of the 23 pages - and missed it on page 5 <img src="http://forum.driverpacks.net/img/smilies/wink.png" width="15" height="15" alt="wink" /></p><p>thanks to your interest i now have the source and know who the author was... Yea!</p>]]></description>
			<author><![CDATA[null@example.com (OverFlow)]]></author>
			<pubDate>Fri, 08 Aug 2008 00:06:22 +0000</pubDate>
			<guid>http://forum.driverpacks.net/viewtopic.php?pid=23036#p23036</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Request] Fake setup.exe source]]></title>
			<link>http://forum.driverpacks.net/viewtopic.php?pid=23033#p23033</link>
			<description><![CDATA[<p>NP have a great day!</p><p>PS i would also like to have the source for that file... <img src="http://forum.driverpacks.net/img/smilies/wink.png" width="15" height="15" alt="wink" /></p>]]></description>
			<author><![CDATA[null@example.com (OverFlow)]]></author>
			<pubDate>Thu, 07 Aug 2008 21:04:37 +0000</pubDate>
			<guid>http://forum.driverpacks.net/viewtopic.php?pid=23033#p23033</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Request] Fake setup.exe source]]></title>
			<link>http://forum.driverpacks.net/viewtopic.php?pid=23032#p23032</link>
			<description><![CDATA[<p>Oh, my bad, I thought setup.exe was launched from CD, not from %SystemRoot%... In that case, ok, I can&#039;t do anything <img src="http://forum.driverpacks.net/img/smilies/wink.png" width="15" height="15" alt="wink" /></p><p>Thanks for your answer,<br />Kal</p>]]></description>
			<author><![CDATA[null@example.com (Kal)]]></author>
			<pubDate>Thu, 07 Aug 2008 21:03:56 +0000</pubDate>
			<guid>http://forum.driverpacks.net/viewtopic.php?pid=23032#p23032</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Request] Fake setup.exe source]]></title>
			<link>http://forum.driverpacks.net/viewtopic.php?pid=23029#p23029</link>
			<description><![CDATA[<p>nope it never has been available to me - nor do i know who wrote it...</p><p>fake setup and presetup.cmd both run from %systemRoot%\system32\ </p><p>Why in the world would i need the &#039;fake&#039; setup program to return that value???? <br />(i already have two variables that return that value...&nbsp; SystemDrive and SystemRoot.)<br />[scratches head and is confused]</p><br /><p>you said &quot;Indeed, if there&#039;s a Hard Disk with a OEM folder/file at root, then identification is corrupted.&quot;</p><p>Um no if there is a folder at root named OEM then we have found the DriverPacks. <br />(we are the only ones who use this name <br />if you use it for something else then shame on you, <br />pick a different name) <img src="http://forum.driverpacks.net/img/smilies/wink.png" width="15" height="15" alt="wink" /></p>]]></description>
			<author><![CDATA[null@example.com (OverFlow)]]></author>
			<pubDate>Thu, 07 Aug 2008 20:47:36 +0000</pubDate>
			<guid>http://forum.driverpacks.net/viewtopic.php?pid=23029#p23029</guid>
		</item>
		<item>
			<title><![CDATA[[Request] Fake setup.exe source]]></title>
			<link>http://forum.driverpacks.net/viewtopic.php?pid=23024#p23024</link>
			<description><![CDATA[<p>Hi,</p><p>This is really a good job! I use this trick on every CD I make, for DriverPacks. By the way, I don&#039;t like the way driver letter is detected in presetup.cmd :<br /></p><div class="codebox"><pre><code>REM +==========================================================================+
REM |   Finding CD/DVD driveletter.                                            |
REM |--------------------------------------------------------------------------|
SET TAGFILE=\OEM
FOR %%i IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO IF EXIST &quot;%%i:%TAGFILE%&quot; SET CDDRIVE=%%i::</code></pre></div><p>Indeed, if there&#039;s a Hard Disk with a OEM folder/file at root, then identification is corrupted. One good thing should be that fake setup.exe passes drive letter as argument. This one can detect drive letter from which its launched, easily with windows API.</p><p>Does anybody have the source of fake setup.exe? I could mod it to suit my own needs.</p><p>Cheers,<br />Kal</p>]]></description>
			<author><![CDATA[null@example.com (Kal)]]></author>
			<pubDate>Thu, 07 Aug 2008 14:00:12 +0000</pubDate>
			<guid>http://forum.driverpacks.net/viewtopic.php?pid=23024#p23024</guid>
		</item>
	</channel>
</rss>
