Jump to content

AlBundy33

Member
  • Posts

    216
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Germany

Everything posted by AlBundy33

  1. This should work: Use this config.txt: ;!@Install@!UTF-8! RunProgram="\"%%T\\Oracle_Client\\run_setup.cmd\" -silent -responseFile \"%%T\\Oracle_Client\\install\\win32\\clientcustom.rsp\"" GUIMode="2" RunProgram="hidcon:cmd /c" ;!@InstallEnd@! and create the file run_setup.cmd in your "Oracle_Client"-folder. This should do the same like setup.exe but waits until the setup is done: @ECHO OFF SET BASE=%~dp0 SET OUI_SRC=%BASE%\stage\Components\oracle.swd.oui\2.2.0.12.0\1\DataFiles\Expanded SET JRE_SRC=%BASE%\stage\Components\oracle.swd.jre\1.3.1.1.0a\1\DataFiles\Expanded SET IMG_SRC=%BASE%\install\images SET TIMESTAMP=%DATE%_%TIME% SET TIMESTAMP=%TIMESTAMP: =_% SET TIMESTAMP=%TIMESTAMP:.=_% SET TIMESTAMP=%TIMESTAMP::=_% SET TIMESTAMP=%TIMESTAMP:,=_% SET TEMP_DIR=%TEMP%\%TIMESTAMP% IF NOT EXIST "%OUI_SRC%" ( ECHO directory not found "%OUI_SRC%"! GOTO :EOF ) IF NOT EXIST "%JRE_SRC%" ( ECHO directory not found "%JRE_SRC%"! GOTO :EOF ) IF NOT EXIST "%IMG_SRC%" ( ECHO directory not found "%IMG_SRC%"! GOTO :EOF ) ::create a temporary folder MD "%TEMP_DIR%" ::initialize the folder like setup.exe XCOPY /Q /S "%OUI_SRC%" "%TEMP_DIR%\oui\" XCOPY /Q /S "%JRE_SRC%" "%TEMP_DIR%\jre\" XCOPY /Q /S "%IMG_SRC%" "%TEMP_DIR%\images\" ::run the installer and wait until it is done START "Install" /WAIT "%TEMP_DIR%\jre\bin\javaw.exe" -Doracle.installer.library_loc="%TEMP_DIR%\oui\bin\win32" -Doracle.installer.startup_location="%BASE%\install" -Doracle.installer.nlsEnabled="TRUE" -mx48m -cp "%TEMP_DIR%;%TEMP_DIR%\oui\lib\OraInstaller.jar;%TEMP_DIR%\jre\lib\rt.jar;%TEMP_DIR%\jre\lib\i18n.jar" oracle.sysman.oii.oiic.OiicInstaller -scratchPath "%TEMP_DIR%" -sourceLoc "%BASE%\install\../stage/products.jar" -sourceType network %* ::delete temporary-folder RD /S /Q "%TEMP_DIR%" The part from START "Install" to ::delete is one line (::delete is on a new line) I think this should work. Good luck. :-) Al
  2. I downloaded the Oracle 9.2 Client from Oracle and now I have the real install-command. so if you want you can try this: ;!@Install@!UTF-8! RunProgram="\"%%T\\Oracle_Client\\jre\\bin\\javaw.exe\" -Doracle.installer.library_loc=\"%%T\\Oracle_Client\\oui\\bin\\win32\" -Doracle.installer.startup_location=\"%%S\\install\" -Doracle.installer.nlsEnabled=\"TRUE\" -mx48m -cp \"%%T\\Oracle_Client;%%T\\Oracle_Client\\oui\\lib\\OraInstaller.jar;%%T\\Oracle_Client\\jre\\lib\\rt.jar;%%T\\Oracle_Client\\jre\\lib\\i18n.jar\" oracle.sysman.oii.oiic.OiicInstaller -scratchPath \"%%T\\Oracle_Client\" -sourceLoc \"%%T\\Oracle_client\\install\\../stage/products.jar\" -sourceType network -silent -responseFile \"%%T\\Oracle_Client\\install\\win32\\clientcustom.rsp\"" GUIMode="2" RunProgram="hidcon:cmd /c" ;!@InstallEnd@! Attention: the RunProgram-line is very long - so maybe you see some line-breaks. you created file should look like this: ... RunProgram=... GUIModel="2" ... Theoretically with this command there's no need to use the sfx-file - you can also run this command from CD (of course you need to replace to %%T\Oracle_Client with you working-dir and %%S. SORRY - THIS DOES NOT WORK: The command above is right - but the problem is, that setup.exe extracts or copys some files to you temp-directory and starts the command from there. Unforutnately I don't know where the files came from.
  3. The dashes are not only after setup.exe The syntax is: RunProgram="command arguments" And because of command and argument can contain spaces we need to quote it. e.g. in command prompt you can not run C:\Documents and Settings\your_name\Desktop\test.exe - it will cause in a file "C:\Documents" not found error. As in this example we have to quote our command and also the arguments with spaces and because of the syntax (command and arguments have to be in quotes) we have to escape the quotes inside (\"). the example above would look like RunProgram="\"C:\Documents and Settings\your_name\Desktop\test.exe\"" because setup.exe does not wait until the installation is done there is no way to delete the folder automatically. of couse we could check the process list and wait until setup.exe terminates but this is not good style. It would be better to find out if there is a way to start setup and wait until its done. --> And if there is a way you could remove the InstallPath-line, so that the folder would deleted automatically. Don't forget: if you run this setup with WPI, WPI starts the sfx, wait until the extraction is done and installs the next programm (it does not wait until the oracle-setup is done!!!). Al
  4. May this could work: Modify the second try to this ;!@Install@!UTF-8! RunProgram="\"%%T\\Oracle_Client\\install\\win32\\setup.exe\" -silent -responseFile \"%%T\\Oracle_Client\\install\\win32\\clientcustom.rsp\"" InstallPath="%TEMP%\oracle_install" GUIMode="2" RunProgram="hidcon:cmd /c" ;!@InstallEnd@! The fixed InstallPath will not be deleted automatically - so the install should work. Can you try this? If this work we "only" have to find a way to wait for the termination of setup.exe. :-) Al
  5. Because of this line Setting value of FROM_LOCATION to C:\DOCUME~1\super\LOCALS~1\Temp\7ZipSfx.000\Oracle_Client\install\../stage/products.jar it seems that The specified response file C:\DOCUME~1\super\LOCALS~1\Temp\7ZipSfx.000\Oracle_Client\install\win32\clientcustom.rsp is not found. should be found - so maybe you are right. What happens if you do the following steps: 1. open command prompt (cmd) 2. change directory to ...Bin\Oracle_Client\install\win32 3. run the following command start "" /wait setup.exe -silent -responseFile clientcustom.rsp Does the command waits until setup is done? Al
  6. C:\DOCUME~1\super\LOCALS~1\Temp\7ZipSfx.00b\Oracle_Client\install\win32\clientcustom.rsp This looks really good. What the content of you archive? If it look at least like this it should work: Oracle_Client + install + win32 + clientcustom.rsp + setup.exe + stage + products.jar Does it? Al
  7. At first: This FROM_LOCATION="\"%%T\Oracle_Client\stage\products.jar" could not work because the installer knows nothing about the 7z-variables. 1. Try ;!@Install@!UTF-8! RunProgram="\"%%T\\Oracle_Client\\install\\win32\\setup.exe\" -silent -responseFile \"%%T\\Oracle_Client\\install\\win32\\clientcustom.rsp\"" GUIMode="2" RunProgram="hidcon:cmd /c" ;!@InstallEnd@! with FROM_LOCATION=".\Oracle_Client\stage\products.jar" Maybe this can solve your problem. 2. Try: ;!@Install@!UTF-8! SetEnvironment="TEMP_DIR=%%T" RunProgram="\"%%T\\Oracle_Client\\install\\win32\\setup.exe\" -silent -responseFile \"%%T\\Oracle_Client\\install\\win32\\clientcustom.rsp\"" GUIMode="2" RunProgram="hidcon:cmd /c" ;!@InstallEnd@! with FROM_LOCATION="%TEMP_DIR%\Oracle_Client\stage\products.jar" This should work if you could use environment-variables in your response-file. 3. Try ;!@Install@!UTF-8! RunProgram="\"%%T\\createResponseFile.cmd\"" RunProgram="\"%%T\\Oracle_Client\\install\\win32\\setup.exe\" -silent -responseFile \"%%T\\clientcustom.rsp\"" GUIMode="2" RunProgram="hidcon:cmd /c" ;!@InstallEnd@! with this createResponseFile.cmd REM create response-file on demand ECHO FROM_LOCATION="%~dp0\Oracle_Client\stage\products.jar">"%~dp0clientcustom.rsp" This works only if FROM_LOCATION is the only entry in your response-file - if not we need a more complex script. In my opinion the first and the second methods are the best one - so if they don't work please post the installer-log (maybe only some paths are wrong). Greetings Al
  8. You can do a search on your harddrive. :-) Or you can try this: ;!@Install@!UTF-8! RunProgram="\"%%T\\Oracle_Client\\install\\win32\\setup.exe\" -silent -responseFile \"%%T\\Oracle_Client\\install\\win32\\clientcustom.rsp\"" GUIMode="2" RunProgram="hidcon:cmd /c" ;!@InstallEnd@! Al
  9. You can try this: ;!@Install@!UTF-8! RunProgram="%systemdrive%\\test\\Oracle_Client\\install\\win32\\setup.exe -silent -responseFile %systemdrive%\\test\\Oracle_Client\\install\\win32\\clientcustom.rsp" RunProgram="RD /S /Q %systemdrive%\\test" InstallPath="%systemdrive%\\test" GUIMode="2" RunProgram="hidcon:cmd /c" ;!@InstallEnd@! As I've read here you can also try to remove the InstallPath: So maybe this could work: ;!@Install@!UTF-8! RunProgram="Oracle_Client\\install\\win32\\setup.exe -silent -responseFile Oracle_Client\\install\\win32\\clientcustom.rsp" GUIMode="2" RunProgram="hidcon:cmd /c" ;!@InstallEnd@! Al
  10. ;!@Install@!UTF-8! RunProgram="%systemdrive%\teste\Oracle 9i Client\install\win32\setup.exe -silent -responseFile %systemdrive%\teste\Oracle 9i Client\install\win32\oracle920.rsp" InstallPath="%systemdrive%\\test" GUIMode="2" RunProgram="hidcon:cmd /c" ;!@InstallEnd@! Maybe the problem is because of the spaces in your path. You can try this RunProgram="""%systemdrive%\teste\Oracle 9i Client\install\win32\setup.exe"" -silent -responseFile ""%systemdrive%\teste\Oracle 9i Client\install\win32\oracle920.rsp""" If this does not work write a batchfile to start your setup. Al
  11. Why do you want to repacked you installer? As I read here you can install it with setup.exe -responseFile -install_oracle11RT.rsp -nowait -force -silent and maybe with setup.exe -responseFile -install_oracle11RT.rsp -wait -force -silent Also have a look here Al
  12. This is not your problem - your problem is, that the application before starts a new process and exit itself. e.g.: some installers simply extract an msi-installer and start it as new process - if you start such an installer wpi doesn't know the msi-installer and starts the next setup. The best way to avoid this, is to extract the installer and run the setup manually. Al
  13. Just have a look on the manual-folder in your WPI-"Installation" (chapter 2).
  14. For this purpose FILEMOVE must do a COPY /Y (or a XCOPY with more options and a DEL or RD afterwards. Therefore I've wrote the following script which does exactly this. @ECHO OFF SETLOCAL ENABLEEXTENSIONS DISABLEDELAYEDEXPANSION IF EXIST "%SYSTEMDRIVE%\SetWPIEnv.cmd" CALL "%SYSTEMDRIVE%\SetWPIEnv.cmd" SET SOURCE="%~1" SET TARGET="%~2" IF "%~3"=="" ( SET /A LOOPS=0 ) ELSE ( SET /A LOOPS=%~3 ) IF NOT "%OVERWRITELOOPS%"=="" SET /A LOOPS=%OVERWRITELOOPS% IF %SOURCE%=="" GOTO :HELP IF %TARGET%=="" SET TARGET=!CD! IF /I "%UNDOMOVE%"=="true" ( ECHO Tausche Quelle und Ziel um die Verschiebung rueckgaengig zu machen. SET CHANGE=%SOURCE% SET SOURCE=%TARGET% SET TARGET=%CHANGE% SET CHANGE= ) IF %SOURCE%==%SOURCE:\=% ( CALL :WAIT "%ALLUSERSPROFILE%\STARTM~1\Programme\%SOURCE:~1,-1%" "%USERPROFILE%\STARTM~1\Programme\%SOURCE:~1,-1%" IF %TARGET%==%TARGET:\=% ( CALL :MOVE "%ALLUSERSPROFILE%\STARTM~1\Programme\%SOURCE:~1,-1%" "%ALLUSERSPROFILE%\STARTM~1\Programme\%TARGET:~1,-1%" ) ELSE ( CALL :MOVE "%ALLUSERSPROFILE%\STARTM~1\Programme\%SOURCE:~1,-1%" "%TARGET:~1,-1%" ) IF %TARGET%==%TARGET:\=% ( CALL :MOVE "%USERPROFILE%\STARTM~1\Programme\%SOURCE:~1,-1%" "%USERPROFILE%\STARTM~1\Programme\%TARGET:~1,-1%" ) ELSE ( CALL :MOVE "%USERPROFILE%\STARTM~1\Programme\%SOURCE:~1,-1%" "%TARGET:~1,-1%" ) ) ELSE ( CALL :WAIT %SOURCE% CALL :MOVE %SOURCE% %TARGET% ) GOTO :END :WAIT SET FOUND=false :LOOP FOR %%X IN (%*) DO ( IF EXIST "%%~X" SET FOUND=true ) IF /I "%FOUND%"=="true" GOTO :NEXT IF %LOOPS% LEQ 0 GOTO :NEXT ECHO Warte bis Quelle existiert ^(%LOOPS%^)... "%~dp0sleep.exe" 1 SET /A LOOPS-=1 GOTO :LOOP :NEXT IF %LOOPS% LEQ 0 ( CALL :ERRORMSG "Quelle existiert nicht." GOTO :END ) GOTO :EOF :MOVE SET SRC="%~1" SET DEST="%~2" IF NOT EXIST %SRC% GOTO :END DIR /A:D %SRC% >NUL 2>NUL IF %ERRORLEVEL%==1 ( SET ISFILE=TRUE ) ELSE ( SET ISFILE=FALSE ) SET PARAMS=/V /I /F /G /H /R /Y IF NOT EXIST %DEST% MD %DEST% IF /I %ISFILE%==FALSE ( IF "%SRC:~-2,1%"=="\" SET SOURCE="%SRC:~1,-2%" IF "%DEST:~-2,1%"=="\" SET TARGET="%DEST:~1,-2%" FOR %%T IN (%SRC%) DO SET DEST="%DEST:~1,-1%\%%~nxT" SET PARAMS=%PARAMS% /E ) IF NOT EXIST %DEST% MD %DEST% XCOPY %PARAMS% %SRC% %DEST% IF NOT %ERRORLEVEL%==0 ( CALL :ERRORMSG "Es ist ein Fehler (ERRORLEVEL: %ERRORLEVEL%) aufgetreten." GOTO :END ) IF %ISFILE%==TRUE ( DEL /F /Q %SRC% ) ELSE ( RD /S /Q %SRC% ) GOTO :END :HELP ECHO.Anwendung: %~nx0 source [target] ECHO. GOTO :END :ERRORMSG ECHO FEHLER: %~1 GOTO :EOF :END ENDLOCAL You can call this script (eMove.cmd) with eMove "WinRAR" "Tools" The script checks the startmenu-folder in %USERPROFILE% and %ALLUSERSPROFILE%, creates (if neccessary) the Tools-folder, copies WinRAR into Tools and deletes the old WinRAR folder. The script should be something better but it works and so I've never changed it. It works also with shortcuts (e.g. eMove.cmd "YouApp.lnk" "just another Folder") --> I can not discribe all variables because I wrote this script a very long time ago. :-) Al
  15. Solution 1: Instead of Run("AdbeRdr910_en_US_Std.exe") you have to use Run("AdbeRdr910_en_US_Std.exe", @ScriptDir) because if WPI runs the script the working-directory is not the application directory. You Script would look like this: $PID = Run("AdbeRdr910_en_US_Std.exe", @ScriptDir) WinWaitActive("Adobe Reader 9.1 - Setup", "Click Next to install to this folder, or click Change to install to a different folder.") ControlClick("Adobe Reader 9.1 - Setup", "&Next >", "Button1") WinWaitActive("Adobe Reader 9.1 - Setup", "Click Install to begin the installation.") ControlClick("Adobe Reader 9.1 - Setup", "&Install", "Button1") WinWaitActive("Adobe Reader 9.1 - Setup", "Setup has successfully installed Adobe Reader 9.1. Click Finish to exit setup.") ControlClick("Adobe Reader 9.1 - Setup", "&Finish", "Button1") If ProcessExists($PID) Then ProcessWaitClose($PID) Solution 2: Install Acrobat Reader with silent-switches instead of AutoIt. "path_to_your_file\AdbeRdr910_en_US_Std.exe" /sPB /rs /rps /l /msi"/qb /norestart ALLUSERS=1 EULA_ACCEPT=YES SUPPRESS_APP_LAUNCH=YES" Al
  16. start install\ScriptGoogleStartup.exe start install\WindowsTweaks\IEHomePage.reg I think both commands cannot work because if WPI starts you cmd-file the working-directory is not the script-directory. You can put the following command to your script to change into the script-directory: pushd "%~dp0" The second one can also not work because you will see a message-box. To avoid this you can use regedit /s install\WindowsTweaks\IEHomePage.reg or reg import install\WindowsTweaks\IEHomePage.reg Your working script should look like this: START /WAIT "%~dp0install\ScriptGoogleStartup.exe" regedit /s "%~dp0install\WindowsTweaks\IEHomePage.reg" Al
  17. This seems not to be a cmd- or wpi-problem - its more an installer-problem. Some installers extracting and/or simply starting a msi-setup. You can try to extrax you setup-file with Universal Extractor and/or run your msi-installer manually with msiexec /i you.msi your_arguments Al
  18. Why do you not use one batch-file for your complete task?!? You can try this - this should work @ECHO OFF COLOR 0b CLS REM change directory to the batch-directory PUSHD "%~dp0" ECHO. ECHO running MyFile silent install... START "" /wait MyFile.msi /qb ECHO. ECHO done ECHO. ECHO copying Registration to MyFile ECHO copy Registration.txt "%PROGRAMFILES%\MyDirectory\" COPY /Y batch2.cmd "%PROGRAMFILES%\MyDirectory\" PUSHD "%PROGRAMFILES%\MyDirectory\" CALL Batch2.cmd /run POPD ECHO. ECHO done POPD
  19. I think this is more a problem of copy and move. To move startmenu entries I wrote a script which copies source to target and removes source. Are you sure that the Link on the Desktop is really a lnk-file? Sometimes the shortcuts are registry-keys (like recycle bin or network) You can try my script to move you startmenu-entries. You need sleep.exe (or remove the line with this command). You can call the script with move.cmd "Acronis" "Brenn und Festplatten Tools" It searches in %USERPROFILE% AND %ALLUSERPROFILE% and creates the target-dir if necessary. Al @ECHO OFF SETLOCAL ENABLEEXTENSIONS DISABLEDELAYEDEXPANSION IF EXIST "%SYSTEMDRIVE%\SetWPIEnv.cmd" CALL "%SYSTEMDRIVE%\SetWPIEnv.cmd" SET SOURCE="%~1" SET TARGET="%~2" IF "%~3"=="" ( SET /A LOOPS=0 ) ELSE ( SET /A LOOPS=%~3 ) IF NOT "%OVERWRITELOOPS%"=="" SET /A LOOPS=%OVERWRITELOOPS% IF %SOURCE%=="" GOTO :HELP IF %TARGET%=="" SET TARGET=!CD! IF /I "%UNDOMOVE%"=="true" ( ECHO Tausche Quelle und Ziel um die Verschiebung rueckgaengig zu machen. SET CHANGE=%SOURCE% SET SOURCE=%TARGET% SET TARGET=%CHANGE% SET CHANGE= ) IF %SOURCE%==%SOURCE:\=% ( CALL :WAIT "%ALLUSERSPROFILE%\STARTM~1\Programme\%SOURCE:~1,-1%" "%USERPROFILE%\STARTM~1\Programme\%SOURCE:~1,-1%" IF %TARGET%==%TARGET:\=% ( CALL :MOVE "%ALLUSERSPROFILE%\STARTM~1\Programme\%SOURCE:~1,-1%" "%ALLUSERSPROFILE%\STARTM~1\Programme\%TARGET:~1,-1%" ) ELSE ( CALL :MOVE "%ALLUSERSPROFILE%\STARTM~1\Programme\%SOURCE:~1,-1%" "%TARGET:~1,-1%" ) IF %TARGET%==%TARGET:\=% ( CALL :MOVE "%USERPROFILE%\STARTM~1\Programme\%SOURCE:~1,-1%" "%USERPROFILE%\STARTM~1\Programme\%TARGET:~1,-1%" ) ELSE ( CALL :MOVE "%USERPROFILE%\STARTM~1\Programme\%SOURCE:~1,-1%" "%TARGET:~1,-1%" ) ) ELSE ( CALL :WAIT %SOURCE% CALL :MOVE %SOURCE% %TARGET% ) GOTO :END :WAIT SET FOUND=false :LOOP FOR %%X IN (%*) DO ( IF EXIST "%%~X" SET FOUND=true ) IF /I "%FOUND%"=="true" GOTO :NEXT IF %LOOPS% LEQ 0 GOTO :NEXT ECHO Warte bis Quelle existiert ^(%LOOPS%^)... "%~dp0sleep.exe" 1 SET /A LOOPS-=1 GOTO :LOOP :NEXT IF %LOOPS% LEQ 0 ( CALL :ERRORMSG "Quelle existiert nicht." GOTO :END ) GOTO :EOF :MOVE SET SRC="%~1" SET DEST="%~2" IF NOT EXIST %SRC% GOTO :END DIR /A:D %SRC% >NUL 2>NUL IF %ERRORLEVEL%==1 ( SET ISFILE=TRUE ) ELSE ( SET ISFILE=FALSE ) SET PARAMS=/V /I /F /G /H /R /Y IF NOT EXIST %DEST% MD %DEST% IF /I %ISFILE%==FALSE ( IF "%SRC:~-2,1%"=="\" SET SOURCE="%SRC:~1,-2%" IF "%DEST:~-2,1%"=="\" SET TARGET="%DEST:~1,-2%" FOR %%T IN (%SRC%) DO SET DEST="%DEST:~1,-1%\%%~nxT" SET PARAMS=%PARAMS% /E ) IF NOT EXIST %DEST% MD %DEST% XCOPY %PARAMS% %SRC% %DEST% IF NOT %ERRORLEVEL%==0 ( CALL :ERRORMSG "Es ist ein Fehler (ERRORLEVEL: %ERRORLEVEL%) aufgetreten." GOTO :END ) IF %ISFILE%==TRUE ( DEL /F /Q %SRC% ) ELSE ( RD /S /Q %SRC% ) GOTO :END :HELP ECHO.Anwendung: %~nx0 source [target] ECHO. GOTO :END :ERRORMSG ECHO FEHLER: %~1 GOTO :EOF :END ENDLOCAL
  20. You can use my script in a command prompt and in WPI. Simple store it in a file createLink.vbs and call it with cscript.exe (script is called in command-shell). What Do you mean with "machlink" - my script or machlink.exe? I asked becaus I wrote the script to replace machlink.exe - I do nearly the same but a little bit more (e.g. I create the directory for the link if it not exist). The arguments should be compatible with MachLink.exe. Al
  21. Why do you need to start a program in background and kill it later?!? To start a setup inbackground has no sense because WPI would call the next command and so the installer will start and immediately killed. To create shortcuts my script can included into WPI. Al Store it as vbs-file (e.g. createLink.vbs) and call it with cscript createLink.vbs - then you should see the available arguments. option explicit Function createShortcut(source, target, icon, arguments, workdir, description, hotkey, window) Dim shell, shortcut, fso If Not isValidSource(source) Then WScript.Echo """" & source & """ ist keine gültige Quelldatei." createShortcut = 2 Exit Function End If If Not isValidTarget(target) Then WScript.Echo """" & target & """ ist keine gültige Verknüpfung." createShortcut = 3 Exit Function End If source = processQuotes(source) target = processQuotes(target) If IsNull(window) OR isEmpty(window) Then window = 1 If Not isNull(icon) AND Not isEmpty(icon) Then icon = processQuotes(icon) Else icon = source End If Set fso = WScript.CreateObject("Scripting.FileSystemObject") If isNull(workdir) OR isEmpty(workdir) Then workdir = fso.GetParentFolderName(source) If Not IsNull(arguments) AND Not isEmpty(arguments) Then arguments = processQuotes(arguments) If Not isNull(workdir) AND Not isEmpty(workdir) Then workdir = processQuotes(workdir) If Not isNull(description) AND Not isEmpty(description) Then description = processQuotes(description) If Not isNull(hotkey) AND Not isEmpty(hotkey) Then hotkey = processQuotes(hotkey) Set shell = WScript.CreateObject("WScript.Shell") Set shortcut = shell.CreateShortcut(target) If (Instr(Trim(target), ".lnk") = Len(Trim(target)) - 3) Then createTargetFolder(target) shortcut.Hotkey = hotkey shortcut.arguments = arguments shortcut.Description = description shortcut.WorkingDirectory = workdir shortcut.IconLocation = icon shortcut.WindowStyle = window End If shortcut.TargetPath = source shortcut.Save If fileExists(target) Then createShortcut = 0 Else createShortcut = 1 End If End Function Function processQuotes(str) Dim tmp tmp = Replace(str, "''", "&singlequote;") tmp = Replace(tmp, "'", """") tmp = Replace(tmp, "&singlequote;", "'") processQuotes = tmp End Function Sub createTargetFolder(target) Dim folders, f, root, filesys, i, folder Set filesys = CreateObject("Scripting.FileSystemObject") If isNull(target) OR isEmpty(target) OR Instr(target, "\") = 0 Then Exit Sub target = Trim(target) folder = Left(target, InStrRev(target, "\")) folders = Split(folder, "\") root = folders(0) If Not Right(root, 1) = ":" Then If Not filesys.FolderExists(root) Then filesys.CreateFolder(root) End If For i = 1 To UBound(folders) Step 1 root = root & "\" & folders(i) If Not filesys.FolderExists(root) Then filesys.CreateFolder(root) Next End Sub Function isValidSource(source) 'isValidSource = NOT IsNull(source) AND NOT isEmpty(source) OR (InStr(1, source, "http://", vbTextCompare) = 1 OR fileExists(source)) isValidSource = NOT IsNull(source) AND NOT isEmpty(source) OR InStr(1, source, "http://", vbTextCompare) = 1 End Function Function isValidTarget(target) isValidTarget = NOT IsNull(target) AND NOT isEmpty(target) AND (_ (Instr(Trim(target), ".url") = Len(Trim(target)) - 3) OR _ (Instr(Trim(target), ".lnk") = Len(Trim(target)) - 3)) End Function Function fileExists(file) Dim FSO Set FSO = WScript.CreateObject("Scripting.FileSystemObject") fileExists = FSO.FileExists(file) Set FSO = Nothing End Function Function folderExists(folder) Dim FSO Set FSO = WScript.CreateObject("Scripting.FileSystemObject") folderExists = FSO.FolderExists(folder) Set FSO = Nothing End Function Sub showUsage Dim usage usage = WScript.ScriptName " created 2006 by Hawk" usage = usage & vbCrLf & "Anwendung: " & WScript.ScriptName & " -q:""Quelldatei"" -z:""Ziel"" [zusätzliche Parameter]" usage = usage & vbCrLf & " -q:""Quelldatei"" - Ziel der Verknüpfung" usage = usage & vbCrLf & " -z:""Zieldatei"" - die Verknüpfung (muss mit .lnk oder .url enden)" usage = usage & vbCrLf & "" usage = usage & vbCrLf & " zusätzliche Parameter" usage = usage & vbCrLf & " -i:""Icon"" - Das zu verwendende Symbol für die Verknüpfung" usage = usage & vbCrLf & " z.B. ""%WINDIR%\system32\shell32.dll, 10""" usage = usage & vbCrLf & " -a:""Parameter"" - zusätzliche Parameter für das auszuführende Programm" usage = usage & vbCrLf & " -w:""Verzeichnis"" - Verzeichins, in dem das Programm ausgeführt werden soll" usage = usage & vbCrLf & " -d:""Kommentar"" - Kommentar für die Verknüpfung" usage = usage & vbCrLf & " -h:""Tastenkomb."" - Tastenkombination, für die Verknüpfung" usage = usage & vbCrLf & " z.B. ""CTRL+ALT+V""" usage = usage & vbCrLf & " -s:Fenster - Fensterstatus für das ausgeführte Programm" usage = usage & vbCrLf & " 1 = Normales Fenster" usage = usage & vbCrLf & " 3 = Minimiert" usage = usage & vbCrLf & " 7 = Maximiert" usage = usage & vbCrLf & "" usage = usage & vbCrLf & "Hinweis: Innerhalb der Argumente ' statt "" verwenden." usage = usage & vbCrLf & " Sollte der Ordner für das Ziel nicht existieren, wird er erstellt." WScript.Echo usage End Sub If WScript.Arguments.Count < 2 Then showUsage WScript.Quit(1) End If Dim i, source, target, icon, arguments, workdir, description, hotkey, window For i=0 To WScript.Arguments.Count - 1 If Instr(1, WScript.Arguments.Item(i), "-q:", vbTextCompare) = 1 Then source = Trim(Right(WScript.Arguments.Item(i), Len(WScript.Arguments.Item(i)) - 3)) If Instr(1, WScript.Arguments.Item(i), "-z:", vbTextCompare) = 1 Then target = Trim(Right(WScript.Arguments.Item(i), Len(WScript.Arguments.Item(i)) - 3)) If Instr(1, WScript.Arguments.Item(i), "-i:", vbTextCompare) = 1 Then icon = Trim(Right(WScript.Arguments.Item(i), Len(WScript.Arguments.Item(i)) - 3)) If Instr(1, WScript.Arguments.Item(i), "-a:", vbTextCompare) = 1 Then arguments = Trim(Right(WScript.Arguments.Item(i), Len(WScript.Arguments.Item(i)) - 3)) If Instr(1, WScript.Arguments.Item(i), "-w:", vbTextCompare) = 1 Then workdir = Trim(Right(WScript.Arguments.Item(i), Len(WScript.Arguments.Item(i)) - 3)) If Instr(1, WScript.Arguments.Item(i), "-d:", vbTextCompare) = 1 Then description = Trim(Right(WScript.Arguments.Item(i), Len(WScript.Arguments.Item(i)) - 3)) If Instr(1, WScript.Arguments.Item(i), "-h:", vbTextCompare) = 1 Then hotkey = Trim(Right(WScript.Arguments.Item(i), Len(WScript.Arguments.Item(i)) - 3)) If Instr(1, WScript.Arguments.Item(i), "-s:", vbTextCompare) = 1 Then window = Trim(Right(WScript.Arguments.Item(i), Len(WScript.Arguments.Item(i)) - 3)) Next WScript.Quit(createShortcut(source, target, icon, arguments, workdir, description, hotkey, window))
  22. Why do you think it's an wpi.cmd problem? First have look into Taskmanager too what tasks are running. if mshta.exe is running it is not a wpi.cmd problem if no cmd.exe is runnig it's not WPI problem, Do you have integratesome application in you image thatwill be installed at T13? Al
  23. There are also executeBefore and executeAfter commands in config-wizard. Al
  24. Maybe there is a problem with your config. Simply move config.js and useroptions.js to another location (or rename it) and try to start WPI. If you get the error again download WPI, extract it to any location you want copy your config.js and useroptions.js into WPIScripts and try to run this version. Al
  25. Of course not. Depending on the installer you have more or less possibilities. Here are some examples: MSI msiexec /i "!CD!\********.msi" ADDLOCAL=ALL REBOOT=ReallySuppress /passive /norestart /qb You can also create a transform-file with all informations NSIS "!CD!\********.exe" /S Installs all - no other options possible Inno-Setup "!CD!\********.exe" /SILENT /NOCANCEL /NORESTART /SP- Install all - with arguemnt /SAVEINF="settings.inf" you can store you changes and use them later with /LOADINF="settings.inf" "!CD!\********.exe" /SILENT /NOCANCEL /NORESTART /SP- /COMPONENTS="********" /TASKS="" /LANG="********" /PASSWORD="********" /DIR="%PROGRAMFILES%\********" Some more switches - I get the necessary values bythe SAVEINF-arguemnt Installshield "!CD!\********.exe" -r Create a file with all informations (can be found in c:\windows\setup.iss) "!CD!\********.exe" -s -f1"!CD!\setup.iss" -f2"%WINDIR%\Temp\********.log" Run the setup with the created setup-file. To find application-switches I use appdeploy.com Al
×
×
  • Create New...