Search the Community
Showing results for tags 'variabels'.
-
Hello and Good Day to All! I am trying to install .NET 3.5 on Windows 10 x64bit via autoit (via ShellExecuteWait + PowerShell). If I run this line, it will runs without issues: ShellExecuteWait('PowerShell.exe', '-executionpolicy Bypass -File "' & @ScriptDir & '\OJP83BU523.ps1' & '"') "OJP83BU523.ps1" contains: DISM /Online /Enable-Feature /FeatureName:NetFX3 /All /Source:D:\Sources\sxs /LimitAccess However, since I won't know in advance the drive letter of the "sources" folder, I created a script to generate a PowerShell Script to give a correct path for it. With the modified script below, PowerShell only blinks and nothing happens ShellExecuteWait('PowerShell.exe', '-executionpolicy Bypass -File "' & @ScriptDir & '\' & $filename & '"') or ShellExecuteWait('PowerShell.exe', '-executionpolicy Bypass -File "' & $filename & '"') I wish I know the difference with "$filename" and "\OJP83BU523.ps1" usage, as for me, it should be the same. Attached is my entire autoit script. any help is appreciated!, many thanks in advance! test.au3
- 5 replies
-
- shellexecute
- shellexecutewait
-
(and 2 more)
Tagged with:
-
I want to make a while loop, that creates variables based on a array. For thist I created the array $iDsO with the number and the name of folders in an other folder. Every folder has a different name an I want to create variables(arrays) for each folder that show me all the files in that folder. For example: I have the Folder \Folder1. In it there are the Folders \1, \2, \3. In 1, 2 and 3 there are some files(.png). The array for Folder1 is $iDsO and now I want to crate the arrays $iDsO1, $iDsO2 and $iDsO3 with the files in them can I make something like this: While $iDs > 0 ;$iDs is the number of files in Folder1>> $iDsO[0] $iDs#here should come the Foldername for example '1'# = _FileListtoArray(@ProgramFilesDir&"\Folder1\"&$iDsO[$iDs]) $iDs = $iDs - 1 Wend So that in the End I have three variabels ($iDs1, $iDs2 and $iDs3) Is this posible or if not what could I do instead ( I donĀ“t know the number of folders in Folder1 in the begining).