Jump to content

Recommended Posts

Posted
  On 3/26/2024 at 8:08 PM, Andreik said:

In my opinion would be more nice to display this splash before starting the copy process and close it when it's done without any pause in the script.

Expand  

Got it, really better to display it before than later !

Posted (edited)

Dear Andreik i need some help,

For example after this command:

DirCopy($sSourceDir & '\' & _GUICtrlListView_GetItemText($cList, $Index), $sDestinationDir, 1)

  I would like to add:

RunWait($sSourceDir & '\' & _GUICtrlListView_GetItemText($cList, $Index), "\setup.exe")

But it doesn't work

Setup.exe is an simple sfx archive (sometimes will be usefull to apply some registry keys, .bat scripts and so on... )

We may use this   RunWait( "checked folder", "\setup.exe") for each checked folder even setup.exe  doesn't exist into folder. if there is no setup, the script will continue without questions..

How can we find the checked folder when we use RunWait command ?

Hope you understand my reach English

Thank you

 

 

Edited by Antivoyager
Posted (edited)

Why is a comma between file path and filename?

RunWait($sSourceDir & '\' & _GUICtrlListView_GetItemText($cList, $Index), "\setup.exe")

should be

RunWait($sSourceDir & '\' & _GUICtrlListView_GetItemText($cList, $Index) & "\setup.exe")

Or

RunWait("setup.exe", $sSourceDir & '\' & _GUICtrlListView_GetItemText($cList, $Index))

Or if you want to check if setup.exe exists before running

$sSetupPath = $sSourceDir & '\' & _GUICtrlListView_GetItemText($cList, $Index) & "\setup.exe"
 If FileExists($sSetupPath) Then RunWait($sSetupPath)

Please read the documentation of the function that you use.

Edited by Andreik
Posted (edited)
  On 3/27/2024 at 9:04 PM, Andreik said:

Or if you want to check if setup.exe exists before running

$sSetupPath = $sSourceDir & '\' & _GUICtrlListView_GetItemText($cList, $Index) & "\setup.exe"
 If FileExists($sSetupPath) Then RunWait($sSetupPath)
Expand  

Realy good, I will use this one abowe!

Another question, how can we also add if the setup.exe doesn't exist then we doing

DirCopy($sSourceDir & '\' & _GUICtrlListView_GetItemText($cList, $Index), $sDestinationDir, 1) 

I tried different ways to use If Not FileExists($sSetupPath) Then

DirCopy($sSourceDir & '\' & _GUICtrlListView_GetItemText($cList, $Index), $sDestinationDir, 1)

but always  get errors statement with no matching ...

Edited by Antivoyager

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...