Jump to content

Create Desktop Shortcut & Wait Untill Desktop Load


Recommended Posts

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

Edited by Sentionline
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...