MSFN Forum: Create Desktop Shortcut & Wait Untill Desktop Load - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Create Desktop Shortcut & Wait Untill Desktop Load Rate Topic: -----

#1 User is offline   Sentionline 

  • Newbie
  • Group: Members
  • Posts: 13
  • Joined: 31-July 10
  • OS:Windows 7 x64
  • Country: Country Flag

  Posted 27 January 2012 - 03:55 AM

Hello there!

My Problem from this Topic is solved now. I see, that the same Problem is existing here. I did try create an desktop shortcut with Autounattend.xml. I didnt find a usable Option. I try it with AutoIt and it Works. Simply Use;

FileCreateShortcut (@ScriptDir & "\WPI.EXE", @DesktopDir & "\Windows Post Installer.lnk")


and place this compiled command in this directory, where WPI.exe is. It can be your USB Stick or your not already burned DVD with main WPI directory. This command place an WPI Shortcut named "Windows Post Installer" on your Desktop. Its necessary start it via autounattend.xml with follow code;

<SynchronousCommand wcm:action="add">
     <CommandLine>cmd /c 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 Z) do if exist %i:\wpi\WPIShortcut.exe start %i:\wpi\WPIShortcut.exe</CommandLine>
     <Description>Windows Post Install Wizard</Description>
     <Order>1</Order>
<RequiresUserInput>false</RequiresUserInput>


Otherwise you can use AutoIt to wait untill Desktop is fully loaded. With 30 Sek. Timeout, because the hard drive is working for few seconds after your first login in Windows. I did take window Info to detect the Start Button from Windows (sleeptime 1 second to prevent CPU Load);

Do
Sleep (1000)
Until WinExists ("Start", "")
Sleep (30000)
ShellExecute ("WPI.exe", "", @ScriptDir)


Its necessary start it via autounattend.xml with fallow code;

<SynchronousCommand wcm:action="add">
     <CommandLine>cmd /c 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 Z) do if exist %i:\wpi\Wait4Desktop.exe start %i:\wpi\Wait4Desktop.exe</CommandLine>
     <Description>Windows Post Install Wizard</Description>
     <Order>1</Order>
<RequiresUserInput>false</RequiresUserInput>


You can also combine both commands, so you have an shortcut on Desktop and start WPI after full startup;

FileCreateShortcut (@ScriptDir & "\WPI.EXE", @DesktopDir & "\Windows Post Installer.lnk")
Do
Sleep (1000)
Until WinExists ("Start", "")
Sleep (30000)
ShellExecute ("WPI.exe", "", @ScriptDir)


<SynchronousCommand wcm:action="add">
     <CommandLine>cmd /c 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 Z) do if exist %i:\wpi\Combinecommand.exe start %i:\wpi\Combinecommand.exe</CommandLine>
     <Description>Windows Post Install Wizard</Description>
     <Order>1</Order>
<RequiresUserInput>false</RequiresUserInput>


I have sucessfully tested all 3 methods on Windows 7 Ultimate 32Bit. Precompiled Versions without UPX? Here you are;

Wait4Desktop (via Rapid)
WPIShortcut (via Rapid)
Combinecommand (via Rapid)

Put one of theese files in your WPI Folder and dont forget modify your autounattend.xml.

Have Fun! If bad english...be silent!

Greetings from Germany

This post has been edited by Sentionline: 27 January 2012 - 04:10 AM



Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

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



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