Note that there are some explanatory texts on larger screens.

plurals
  1. POWshShell.run and major problems in Windows 7
    primarykey
    data
    text
    <p></p> <p>This is a VBScript that I would like to improve. I would like four things :</p> <p>1) Add a line that would rename the extension cleanup.dll to cleanup.exe, so as it can be called by the WshShell.run and executed (hidden).</p> <p>2) The way it is written just below, the script opens two screens : the screen of the cleanup.exe and a blank screen, which should be hidden for the user and it is not what is happening ! How to hide the second screen ? I want to run it invisibly (the user cannot close or manipulate the second screen. It will be closed via code that is inside the cleanup.exe).**NOTE : The code below works perfectly in Windows XP, but not on Windows 7. How to make it work in all Windows platforms ?</p> <p><strong>VBSCRIPT "Second.vbs"</strong></p> <pre><code>Set WshShell = CreateObject("WScript.Shell") Set objFSO = CreateObject("Scripting.FileSystemObject") objFSO.MoveFile "cleanup.dll" , "cleanup.exe" WshShell.Run "c:\cleanup.exe", 0, TRUE Set WshShell = Nothing </code></pre> <p><strong>BATCH "Master.bat"</strong></p> <pre><code>@echo off wscript Second.vbs exit /b </code></pre> <p><strong>3) Is there a good and reliable software to convert from VBS to EXE ?</strong></p> <p> <strong>4) The other problem I am having is that the command line below does not yield results.Must I use the second pard of the code below instead ? Why ??</strong> </p> <p>Suppose that my Batch file is in located in drive f:\ </p> <p>If I double click on it, my screen should be then populated with information extracted from the TXT file, which actually resides in drive c:\ </p> <pre><code>@echo off set DRV=C:\August\MyProgram cd\ cd %DRV% type test.txt &amp; pause&gt;nul @echo off set DRV=C:\August\MyProgram cd\ c: cd %DRV% type test.txt &amp; pause&gt;nul </code></pre> <p> </p> <p>Thank you in advance for the explanations and solutions</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload