emass Posted December 31, 2004 Share Posted December 31, 2004 Hi everybody!First of all, WPI rocks!! I discovered it just a few days ago, and it's just what I've been looking for!Anyway, I've got a question...Is it possible in the list of commands for a program to have something launched and left open while another program is run? The default behaviour is to wait for program #1 to close, then launch program #2. I would need program #1 running while program #2 launches.It would be useful for programs which require a serial number but don't save the information clearly in the registry. I would open a notepad window with the serial number and simultaneously the installation of the program. Then, when asked for the serial, I would just Alt-Tab to Notepad, copy and paste it.Is it possible with WPI? Is there any way to trick the program into doing it?Thanks everybody, and have a wonderful New Year!!Ciao,Ema. Link to comment Share on other sites More sharing options...
emass Posted January 1, 2005 Author Share Posted January 1, 2005 OK, solved it myself...Yesterday I was probably too hammered by partying to find a viable solution I entered the following 2 lines:cmd /C start /d"%cdrom%\APPS_DRIVERS\Apps" notepad Serial.txt"%cdrom%\APPS_DRIVERS\Apps\Setup.exe"Thats's it - pretty obvious... today Ciao,Ema. Link to comment Share on other sites More sharing options...
Astalavista Posted January 1, 2005 Share Posted January 1, 2005 huh?use autoit to enter the serial for u. what u are talking about is not unattended at all. Link to comment Share on other sites More sharing options...
BritishBulldog Posted January 1, 2005 Share Posted January 1, 2005 I agree either use an autoIt script or a VBScript then you can install your program in the normal unattended way in say cmd1 and in cmd2 have the script run the program and enter the serial number while you sit back and watch.If you need any help let me know Link to comment Share on other sites More sharing options...
Astalavista Posted January 1, 2005 Share Posted January 1, 2005 nologic has virtually all programs that need manual entry of serialsin his personal autoit thread. check it out. Link to comment Share on other sites More sharing options...
emass Posted January 1, 2005 Author Share Posted January 1, 2005 Thanks guys,I actually like a certain degree of control over my installations, so I'm not shooting for a totally unattended install, but I'll definitely look both into AutoIt and VBScript BritishBulldog, could you give a sample of code?Ciao,Ema. Link to comment Share on other sites More sharing options...
BritishBulldog Posted January 1, 2005 Share Posted January 1, 2005 here is a copy of a vbs script for Power DVDset WshShell = WScript.CreateObject ("WScript.Shell")Set fso = CreateObject("Scripting.FileSystemObject")'programme startsWScript.Sleep 1000WshShell.RUN ("C:\Programme\CyberLink\PowerDVD\PowerDVD.exe")WScript.Sleep 2000WshShell.SendKeys "{TAB 3}"WScript.Sleep 1000WshShell.SendKeys " "WScript.Sleep 1000WshShell.SendKeys "{TAB}"WScript.Sleep 1000WshShell.SendKeys " "WScript.Sleep 1000WshShell.SendKeys "{TAB 2}"WScript.Sleep 1000WshShell.SendKeys "{ENTER}"WScript.Sleep 500WshShell.SendKeys "xxxxx"WScript.Sleep 500WshShell.SendKeys "xxxxx"WScript.Sleep 500WshShell.SendKeys "xxxxx"WScript.Sleep 500WshShell.SendKeys "xxxxx"WScript.Sleep 500WshShell.SendKeys "xxxxx"WScript.Sleep 500WshShell.SendKeys "xxxxx"WScript.Sleep 1000WshShell.SendKeys "{TAB}"WScript.Sleep 1000WshShell.SendKeys "{ENTER}"WScript.Sleep 1000WshShell.SendKeys "{ENTER}"the xxxxx are the parts of the serial number Link to comment Share on other sites More sharing options...
emass Posted January 1, 2005 Author Share Posted January 1, 2005 Thanks a lot, much appreciated!Will play around a little bit to create all my installations Ciao,Ema. Link to comment Share on other sites More sharing options...
Astalavista Posted January 1, 2005 Share Posted January 1, 2005 ; <AUT2EXE VERSION: 3.0.102.0>; ----------------------------------------------------------------------------; <AUT2EXE INCLUDE-START: D:\XPCD\XP2\Software\DesktopX\DesktopX_2.40_au3.au3>; ----------------------------------------------------------------------------; ----------------------------------------------------------------------------;; AutoIt Version: 3.0; Language: English; Platform: Win9x / NT; Author: Nologic;; Script Function:; Stardock DesktopX v2.40;; ----------------------------------------------------------------------------; ----------------------------------------------------------------------------; End User Var"s; ----------------------------------------------------------------------------$SF_1 = "DesktopX240__enhanced.exe" ; Setup File Name$SN_1 = "xxxxxxxxxxxxxxxxxxxxxx" ; Serial Number;$SM_1 = "\DesktopX" ; Location For Main Folder;$GM_1 = "\Tools - Shell" ; Location For Group Folder; Delete DesktopX Short Cuts;$SC_1 = "N" ; (Y)es or (N)o - Delete Short Cut For DesktopX;$SC_2 = "Y" ; (Y)es or (N)o - Delete Short Cut For DesktopX Readme;$SC_3 = "N" ; (Y)es or (N)o - Delete Short Cut For Developers Guide;$SC_4 = "Y" ; (Y)es or (N)o - Delete Short Cut For Online Documentation & FAQ;$SC_5 = "N" ; (Y)es or (N)o - Delete Short Cut For Scripting Guide;$SC_6 = "Y" ; (Y)es or (N)o - Delete Short Cut For Uninstall DesktopX;$SC_7 = "N" ; (Y)es or (N)o - Delete Short Cut For Users Guide; ----------------------------------------------------------------------------; Prevent Duplicates From Running; ----------------------------------------------------------------------------$g_szVersion = $SF_1If WinExists($g_szVersion) Then Exit ; It"s already runningAutoItWinSetTitle($g_szVersion); ----------------------------------------------------------------------------; Script Defaults; ----------------------------------------------------------------------------Opt ("CaretCoordMode", 1) ;1=absolute, 0=relativeOpt ("ExpandEnvStrings", 0) ;0=don't expand, 1=do expandOpt ("MouseClickDelay", 10) ;10 millisecondsOpt ("MouseClickDownDelay", 10) ;10 millisecondsOpt ("MouseClickDragDelay", 250) ;250 millisecondsOpt ("MouseCoordMode", 0) ;1=absolute, 0=relativeOpt ("MustDeclareVars", 0) ;0=no, 1=require pre-declareOpt ("PixelCoordMode", 1) ;1=absolute, 0=relativeOpt ("RunErrorsFatal", 1) ;1=fatal, 0=silent set @errorOpt ("SendAttachMode", 0) ;0=don't attach, 1=do attachOpt ("SendCapslockMode", 1) ;1=store and restore, 0=don"tOpt ("SendKeyDelay", 1) ;5 millisecondsOpt ("SendKeyDownDelay", 1) ;1 millisecondOpt ("TrayIconDebug", 0) ;0=no info, 1=debug line infoOpt ("TrayIconHide", 0) ;0=show, 1=hide tray iconOpt ("WinDetectHiddenText", 0) ;0=don't detect, 1=do detectOpt ("WinSearchChildren", 1) ;0=no, 1=search children alsoOpt ("WinTitleMatchMode", 3) ;1=start, 2=subStr, 3=exact, 4=...Opt ("WinWaitDelay", 250) ;250 milliseconds; ----------------------------------------------------------------------------; Script Start; ----------------------------------------------------------------------------Run ( $SF_1 );Enter Serial NumberWinWaitActive ( "Enter DesktopX Serial Number" )ControlSetText ( "Enter DesktopX Serial Number", "", "Edit1", $SN_1 )ControlClick ( "Enter DesktopX Serial Number", "OK", "Button2" ); LicenseSleep ( 500 )If WinExists ( "License Agreement" ) = 1 Then ControlClick ( "License Agreement", "I Agree", "Button4" ) ControlClick ( "License Agreement", "&Next >", "Button1" )EndIf;WelcomeWinWaitActive ( "Welcome" )ControlClick ( "Welcome", "&Next >", "Button1" );Destination LocationWinWaitActive ( "Choose Destination Location" );ControlClick ( "Choose Destination Location", "B&rowse...", "Button5" );Choose Folder;WinWaitActive ( "Select Destination Directory" );ControlSetText ( "Select Destination Directory", "", "Edit1", @ProgramFilesDir & $GM_1 & $SM_1 );ControlClick ( "Select Destination Directory", "OK", "Button1" );Destination Location (Continued);WinWaitActive ( "Choose Destination Location" )ControlClick ( "Choose Destination Location", "&Next >", "Button1" );Start InstallationWinWaitActive ( "Start Installation" )ControlClick ( "Start Installation", "&Next >", "Button1" );FinishWinWaitActive ( "Installation Complete" )ControlClick ( "Installation Complete", "&Finish >", "Button1" )If WinExists( "Object Desktop") Then WinClose( "Object Desktop")EndIf#cs; Create Directorys if Non-ExistantIf FileExists ( @ProgramsCommonDir & $GM_1 ) = 0 Then DirCreate ( @ProgramsCommonDir & $GM_1 ); Copy DirectorysDirCopy ( @ProgramsDir & "\Object Desktop\DesktopX", @ProgramsCommonDir & $GM_1 & $SM_1 , 1 ); Copy FilesFileCopy ( @ProgramsDir & "\Object Desktop\DesktopX.lnk", @ProgramsCommonDir & $GM_1 & $SM_1 & "\DesktopX.lnk" , 1 ); Delete Old DirectoryDirRemove ( @ProgramsDir & "\Object Desktop", 1 ); Delete DesktopX Short Cuts$local = @ProgramsCommonDir & $GM_1 & $SM_1 & "\"If $SC_1 = "y" Then FileDelete ( $local & "DesktopX.lnk" )If $SC_2 = "y" Then FileDelete ( $local & "DesktopX Readme.lnk" )If $SC_3 = "y" Then FileDelete ( $local & "Developers Guide.lnk" )If $SC_4 = "y" Then FileDelete ( $local & "Online Documentation & FAQ.lnk" )If $SC_5 = "y" Then FileDelete ( $local & "Scripting Guide.lnk" )If $SC_6 = "y" Then FileDelete ( $local & "Uninstall DesktopX.lnk" )If $SC_7 = "y" Then FileDelete ( $local & "Users Guide.lnk" )#ceExit;EOF Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now