Question Importer ou intégrer variable dans un autre script

Plus d'informations
il y a 10 ans 1 mois #21638 par Laurent
Bonjour à tous,

Petite question

J'ai une interface graphique Powershell en WPF avec un bouton installer.

Les script exemple 1, 2, 3, 4, 5, 6, fonctionnent séparément par contre quand je les mets les uns à la suite des autres dans l'événement de mon bouton \"installer\" seul le script exemple1.ps1 se lance et les autres ne se lance pas

Comment faire pour que quand le script example1.ps1 soit terminée le script example2.ps1 se lance

Merci à tous.



[code:1]#Events
$boutoninstaller.Add_Click({


.\..\SCRIPT\\"exemple1\" -Wait
.\..\SCRIPT\\"exemple2\" -Wait
.\..\SCRIPT\\"exemple3\" -Wait
.\..\SCRIPT\\"exemple4\" -Wait
.\..\SCRIPT\\"exemple5\" -Wait
.\..\SCRIPT\\"exemple6\" -Wait


})[/code:1][/code:1]

Message édité par: laurenzo34000, à: 4/04/16 15:50<br><br>Message édité par: laurenzo34000, à: 5/04/16 12:15

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 10 ans 1 mois #21642 par Laurent
j'ai trouver la solution

[code:1]$emplacement = Split-Path $MyInvocation.MyCommand.path

powershell \&quot;$emplacement\'exemple 1.ps1'\&quot;
powershell \&quot;$emplacement\'exemple 2.ps1'\&quot;
powershell \&quot;$emplacement\'exemple 3.ps1'\&quot;
powershell \&quot;$emplacement\'exemple 4.ps1'\&quot;
powershell \&quot;$emplacement\'exemple 5.ps1'\&quot;[/code:1]

Par contre j'ai un nouveau soucis je souhaite intégrer mes variable contenu dans le script en cours \&quot;application.ps1\&quot; dans mes script exemple1.ps1 , exemple2.ps1, exemple3.ps1 ...

Merci pour votre aide<br><br>Message édité par: laurenzo34000, à: 5/04/16 12:15

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 10 ans 1 mois #21643 par xyz
laurenzo34000 écrit:

Par contre j'ai un nouveau soucis je souhaite intégrer mes variable contenu dans le script en cours \&quot;application.ps1\&quot; dans mes script exemple1.ps1 , exemple2.ps1, exemple3.ps1 ...

N'ayant pas le code source du GUI, même de démo pour ton cas, ce n'est pas facile de t'aider. Est-ce donc à tes lecteurs/rices de recréer ce code ?

Ta solution génère autant de contexte différent et cloisonnés que de script. Ce n'est pas possible comme tu le fais.

Mais il faut déjà trouver l'origine du pb pour proposer une solution...

Tutoriels PowerShell

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 10 ans 1 mois #21644 par Laurent
Excuse moi Laurent

Voici mon script Application.ps1 qui se trouve dans le même dossier que mon script 7 Zip.ps1


[code:1]#################################################################
# Chargement des Librairies
#################################################################
[Reflection.Assembly]::LoadWithPartialName(\&quot;PresentationFramework\&quot;«»)
[Reflection.Assembly]::LoadWithPartialName(\&quot;PresentationCore\&quot;«»)
[Reflection.Assembly]::LoadWithPartialName(\&quot;WindowsBase\&quot;«»)




[xml]$xaml = @\&quot;
&lt;Window
xmlns=\&quot;schemas.microsoft.com/winfx/2006/xaml/presentation\";
xmlns:«»x=\&quot;schemas.microsoft.com/winfx/2006/xaml\";
xmlns:d=\&quot;schemas.microsoft.com/expression/blend/2008\";
xmlns:mc=\&quot;schemas.openxmlformats.org/markup-compatibility/2006\";
xmlns:local=\&quot;clr-namespace:WpfApplication2\&quot;

Title=\&quot;Installation et configuration \&quot; Height=\&quot;600\&quot; Width=\&quot;800\&quot; ResizeMode=\&quot;NoResize\&quot; WindowStartupLocation=\&quot;CenterScreen\&quot;&gt;
&lt;Grid&gt;
&lt;Button x:Name=\&quot;installer\&quot; Content=\&quot;Installer\&quot; HorizontalAlignment=\&quot;Left\&quot; Height=\&quot;29\&quot; Margin=\&quot;624,507,0,0\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;112\&quot; FontSize=\&quot;16\&quot; RenderTransformOrigin=\&quot;0.527,2.586\&quot;/&gt;
&lt;Button x:Name=\&quot;quitter\&quot; Content=\&quot;Quitter\&quot; HorizontalAlignment=\&quot;Left\&quot; Height=\&quot;29\&quot; Margin=\&quot;447,507,0,0\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;112\&quot; FontSize=\&quot;16\&quot;/&gt;

&lt;Label x:Name=\&quot;label\&quot; Content=\&quot;7 Zip\&quot; HorizontalAlignment=\&quot;Left\&quot; Margin=\&quot;112,87,0,0\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;108\&quot; FontSize=\&quot;16\&quot; Height=\&quot;32\&quot;/&gt;

&lt;Label x:Name=\&quot;label_Copy\&quot; Content=\&quot;Adobe Flash Player\&quot; HorizontalAlignment=\&quot;Left\&quot; Margin=\&quot;112,131,0,0\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;155\&quot; FontSize=\&quot;16\&quot; Height=\&quot;32\&quot;/&gt;
&lt;Label x:Name=\&quot;label_Copy1\&quot; Content=\&quot;Adobe Reader DC\&quot; HorizontalAlignment=\&quot;Left\&quot; Margin=\&quot;112,180,0,0\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;155\&quot; FontSize=\&quot;16\&quot; Height=\&quot;32\&quot;/&gt;
&lt;Label x:Name=\&quot;label_Copy2\&quot; Content=\&quot;CD Burner XP \&quot; HorizontalAlignment=\&quot;Left\&quot; Margin=\&quot;112,228,0,0\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;115\&quot; FontSize=\&quot;16\&quot; Height=\&quot;32\&quot;/&gt;
&lt;Label x:Name=\&quot;label_Copy3\&quot; Content=\&quot;Google Chrome \&quot; HorizontalAlignment=\&quot;Left\&quot; Margin=\&quot;112,280,0,0\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;137\&quot; FontSize=\&quot;16\&quot; Height=\&quot;32\&quot;/&gt;
&lt;Label x:Name=\&quot;label_Copy4\&quot; Content=\&quot;Java\&quot; HorizontalAlignment=\&quot;Left\&quot; Margin=\&quot;112,330,0,0\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;108\&quot; FontSize=\&quot;16\&quot; Height=\&quot;32\&quot;/&gt;
&lt;Label x:Name=\&quot;label_Copy5\&quot; Content=\&quot;Libre Office\&quot; HorizontalAlignment=\&quot;Left\&quot; Margin=\&quot;112,376,0,0\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;108\&quot; FontSize=\&quot;16\&quot; Height=\&quot;32\&quot;/&gt;
&lt;Label x:Name=\&quot;label_Copy6\&quot; Content=\&quot;Microsoft Office 2013\&quot; HorizontalAlignment=\&quot;Left\&quot; Margin=\&quot;428,87,0,0\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;190\&quot; FontSize=\&quot;16\&quot; Height=\&quot;32\&quot;/&gt;
&lt;Label x:Name=\&quot;label_Copy7\&quot; Content=\&quot;Mozilla Firefox\&quot; HorizontalAlignment=\&quot;Left\&quot; Margin=\&quot;428,131,0,0\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;149\&quot; FontSize=\&quot;16\&quot; Height=\&quot;32\&quot;/&gt;
&lt;Label x:Name=\&quot;label_Copy8\&quot; Content=\&quot;Mozilla Thunderbird\&quot; HorizontalAlignment=\&quot;Left\&quot; Margin=\&quot;428,180,0,0\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;172\&quot; FontSize=\&quot;16\&quot; Height=\&quot;32\&quot;/&gt;
&lt;Label x:Name=\&quot;label_Copy9\&quot; Content=\&quot;PDF Creator\&quot; HorizontalAlignment=\&quot;Left\&quot; Margin=\&quot;428,228,0,0\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;108\&quot; FontSize=\&quot;16\&quot; Height=\&quot;32\&quot; RenderTransformOrigin=\&quot;0.481,0.688\&quot;/&gt;
&lt;Label x:Name=\&quot;label_Copy10\&quot; Content=\&quot;Symantec Endpoint Protection\&quot; HorizontalAlignment=\&quot;Left\&quot; Margin=\&quot;428,280,0,0\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;246\&quot; FontSize=\&quot;16\&quot; Height=\&quot;32\&quot;/&gt;
&lt;Label x:Name=\&quot;label_Copy11\&quot; Content=\&quot;TeamViewer\&quot; HorizontalAlignment=\&quot;Left\&quot; Margin=\&quot;428,328,0,0\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;108\&quot; FontSize=\&quot;16\&quot; Height=\&quot;32\&quot;/&gt;
&lt;Label x:Name=\&quot;label_Copy12\&quot; Content=\&quot;VLC\&quot; HorizontalAlignment=\&quot;Left\&quot; Margin=\&quot;428,376,0,0\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;108\&quot; FontSize=\&quot;16\&quot; Height=\&quot;32\&quot;/&gt;



&lt;TextBlock x:Name=\&quot;installation\&quot; HorizontalAlignment=\&quot;Left\&quot; Margin=\&quot;40,32,0,0\&quot; TextWrapping=\&quot;Wrap\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;707\&quot; FontSize=\&quot;16\&quot;&gt;&lt;Run Text=\&quot;Pour installer et configurer votre ordinateur avec la liste des logiciels suivants cliquer sur Installer\&quot;/&gt;&lt;Run Text=\&quot;.\&quot;/&gt;&lt;/TextBlock&gt;
&lt;TextBlock x:Name=\&quot;encours\&quot; HorizontalAlignment=\&quot;Left\&quot; Height=\&quot;26\&quot; Margin=\&quot;40,462,0,0\&quot; TextWrapping=\&quot;Wrap\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;707\&quot; FontSize=\&quot;16\&quot; Text=\&quot;\&quot; Foreground=\&quot;Red\&quot;/&gt;
&lt;TextBlock x:Name=\&quot;zip\&quot; HorizontalAlignment=\&quot;Left\&quot; Height=\&quot;32\&quot; Margin=\&quot;80,87,0,0\&quot; TextWrapping=\&quot;Wrap\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;27\&quot; FontSize=\&quot;29.333\&quot;&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot;S\&quot;/&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot; \&quot;/&gt;&lt;/TextBlock&gt;
&lt;TextBlock x:Name=\&quot;flash\&quot; HorizontalAlignment=\&quot;Left\&quot; Height=\&quot;32\&quot; Margin=\&quot;80,131,0,0\&quot; TextWrapping=\&quot;Wrap\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;27\&quot; FontSize=\&quot;29.333\&quot;&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot;S\&quot;/&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot; \&quot;/&gt;&lt;/TextBlock&gt;
&lt;TextBlock x:Name=\&quot;reader\&quot; HorizontalAlignment=\&quot;Left\&quot; Height=\&quot;32\&quot; Margin=\&quot;80,180,0,0\&quot; TextWrapping=\&quot;Wrap\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;27\&quot; FontSize=\&quot;29.333\&quot;&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot;S\&quot;/&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot; \&quot;/&gt;&lt;/TextBlock&gt;
&lt;TextBlock x:Name=\&quot;burner\&quot; HorizontalAlignment=\&quot;Left\&quot; Height=\&quot;32\&quot; Margin=\&quot;80,228,0,0\&quot; TextWrapping=\&quot;Wrap\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;27\&quot; FontSize=\&quot;29.333\&quot;&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot;S\&quot;/&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot; \&quot;/&gt;&lt;/TextBlock&gt;
&lt;TextBlock x:Name=\&quot;chrome\&quot; HorizontalAlignment=\&quot;Left\&quot; Height=\&quot;32\&quot; Margin=\&quot;80,280,0,0\&quot; TextWrapping=\&quot;Wrap\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;27\&quot; FontSize=\&quot;29.333\&quot; RenderTransformOrigin=\&quot;0.481,5.875\&quot;&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot;S\&quot;/&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot; \&quot;/&gt;&lt;/TextBlock&gt;
&lt;TextBlock x:Name=\&quot;java\&quot; HorizontalAlignment=\&quot;Left\&quot; Height=\&quot;32\&quot; Margin=\&quot;80,328,0,0\&quot; TextWrapping=\&quot;Wrap\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;27\&quot; FontSize=\&quot;29.333\&quot;&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot;S\&quot;/&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot; \&quot;/&gt;&lt;/TextBlock&gt;
&lt;TextBlock x:Name=\&quot;libre\&quot; HorizontalAlignment=\&quot;Left\&quot; Height=\&quot;32\&quot; Margin=\&quot;80,376,0,0\&quot; TextWrapping=\&quot;Wrap\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;27\&quot; FontSize=\&quot;29.333\&quot;&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot;S\&quot;/&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot; \&quot;/&gt;&lt;/TextBlock&gt;
&lt;TextBlock x:Name=\&quot;office\&quot; HorizontalAlignment=\&quot;Left\&quot; Height=\&quot;32\&quot; Margin=\&quot;396,87,0,0\&quot; TextWrapping=\&quot;Wrap\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;27\&quot; FontSize=\&quot;29.333\&quot;&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot;S\&quot;/&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot; \&quot;/&gt;&lt;/TextBlock&gt;
&lt;TextBlock x:Name=\&quot;firefox\&quot; HorizontalAlignment=\&quot;Left\&quot; Height=\&quot;32\&quot; Margin=\&quot;396,131,0,0\&quot; TextWrapping=\&quot;Wrap\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;27\&quot; FontSize=\&quot;29.333\&quot;&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot;S\&quot;/&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot; \&quot;/&gt;&lt;/TextBlock&gt;
&lt;TextBlock x:Name=\&quot;thunderbird\&quot; HorizontalAlignment=\&quot;Left\&quot; Height=\&quot;32\&quot; Margin=\&quot;396,180,0,0\&quot; TextWrapping=\&quot;Wrap\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;27\&quot; FontSize=\&quot;29.333\&quot;&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot;S\&quot;/&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot; \&quot;/&gt;&lt;/TextBlock&gt;
&lt;TextBlock x:Name=\&quot;creator\&quot; HorizontalAlignment=\&quot;Left\&quot; Height=\&quot;32\&quot; Margin=\&quot;396,228,0,0\&quot; TextWrapping=\&quot;Wrap\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;27\&quot; FontSize=\&quot;29.333\&quot;&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot;S\&quot;/&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot; \&quot;/&gt;&lt;/TextBlock&gt;
&lt;TextBlock x:Name=\&quot;symantec\&quot; HorizontalAlignment=\&quot;Left\&quot; Height=\&quot;32\&quot; Margin=\&quot;396,280,0,0\&quot; TextWrapping=\&quot;Wrap\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;27\&quot; FontSize=\&quot;29.333\&quot;&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot;S\&quot;/&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot; \&quot;/&gt;&lt;/TextBlock&gt;
&lt;TextBlock x:Name=\&quot;teamviewer\&quot; HorizontalAlignment=\&quot;Left\&quot; Height=\&quot;32\&quot; Margin=\&quot;396,328,0,0\&quot; TextWrapping=\&quot;Wrap\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;27\&quot; FontSize=\&quot;29.333\&quot;&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot;S\&quot;/&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot; \&quot;/&gt;&lt;/TextBlock&gt;
&lt;TextBlock x:Name=\&quot;vlc\&quot; HorizontalAlignment=\&quot;Left\&quot; Height=\&quot;32\&quot; Margin=\&quot;396,376,0,0\&quot; TextWrapping=\&quot;Wrap\&quot; VerticalAlignment=\&quot;Top\&quot; Width=\&quot;27\&quot; FontSize=\&quot;29.333\&quot;&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot;S\&quot;/&gt;&lt;Run Foreground=\&quot;Red\&quot; FontFamily=\&quot;Wingdings 2\&quot; Text=\&quot; \&quot;/&gt;&lt;/TextBlock&gt;

&lt;/Grid&gt;
&lt;/Window&gt;





\&quot;@

$reader=(New-Object System.Xml.XmlNodeReader $xaml)
$Window=[Windows.Markup.XamlReader]::Load( $reader )


#Connecter les controles
$boutoninstaller = $Window.FindName('installer')
$boutonquitter = $Window.Findname('quitter')
$encours = $Window.FindName('encours')
$zip = $Window.FindName('zip')
$flash = $Window.FindName('flash')
$reader = $Window.FindName('reader')
$burner = $Window.FindName('burner')
$chrome = $Window.FindName('chrome')
$java = $Window.FindName('java')
$libre = $Window.FindName('libre')
$office = $Window.FindName('office')
$firefox = $Window.FindName('firefox')
$thunderbird = $Window.FindName('thunderbird')
$creator = $Window.FindName('creator')
$symantec = $Window.FindName('symantec')
$teamviewer = $Window.FindName('teamviewer')
$vlc = $Window.FindName('vlc')


$emplacement = Split-Path $MyInvocation.MyCommand.path

$chemin = Split-Path $emplacement -Parent






#Events
$boutoninstaller.Add_Click({

powershell \&quot;$emplacement\'7 Zip.ps1'\&quot; -Wait

powershell \&quot;$emplacement\'Adobe Reader DC'\&quot; -Wait




})




$boutonquitter.Add_Click(
{

$Window.Close()


})

$Window.ShowDialog() | Out-Null
[/code:1]


Voici mon script 7 Zip.ps1 celui ci contient une variable contenu dans mon fichier Application.ps1 qui permet de changer ma GUI après l'exécution de la commande pour dire que l'opération c'est bien déroulée

Je souhaiterais donc \&quot;importer ou integrer\&quot; les variables Application.ps1 dans mon script 7 Zip.ps1 pour que les variable zip change ma GUI j'espère que c'est pas trop brouillon comme explication.
(Le script 7 Zip fonctionne)

[code:1]# Site internet
# www.7-zip.org/download.html


if ([intptr]::«»size -eq 8)
{
write-output '64 bits'
cd \&quot;..\LOGICIEL\7 ZIP\&quot;

Start-Process \&quot;7z1514-x64.exe\&quot; /S -Wait
$zip.FontFamily =(\&quot;Wingdings 2\&quot;«»)
$zip.Text = (\&quot;R\&quot;«»)
$zip.Foreground = (\&quot;Green\&quot;«»)

}
elseif ([intptr]::«»size -eq 4)
{
write-output '32 bits'
cd \&quot;..\LOGICIEL\7 ZIP\&quot;
Start-Process \&quot;7z1514-x32.exe\&quot; /S -Wait
$zip.FontFamily =(\&quot;Wingdings 2\&quot;«»)
$zip.Text = (\&quot;R\&quot;«»)
$zip.Foreground = (\&quot;Green\&quot;«»)
}

[/code:1]<br><br>Message édité par: laurenzo34000, à: 5/04/16 13:30

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 10 ans 1 mois #21652 par xyz
laurenzo34000 écrit:

Excuse moi Laurent

Pas de soucis, prends la peine de te mettre à la place de celui qui lira ton post.

Avant de regarder de + près (si j'ai le temps), peux-tu tester en forçant la 'location' (le path courant de PS) ou utiliser des nom de chemin complet avant d'appeler tes scripts.<br><br>Message édité par: Laurent Dardenne, à: 5/04/16 15:38

Tutoriels PowerShell

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 10 ans 1 mois #21660 par Laurent
Erreur du débutant le chemin de retour du script n'était pas correct.

Je dois donc rajouter

[code:1]Set-location \&quot;$emplacement\&quot;[/code:1]
entre chaque exécution de script

Le seul petit bémol mes variables $zip $flash $reader

[code:1]$zip.FontFamily =(\&quot;Wingdings 2\&quot;«»)

$zip.Text = (\&quot;R\&quot;«»)

$zip.Foreground = (\&quot;Green\&quot;«»)[/code:1]

sont effectué à la fin de tous les scripts et non pas à la fin de chaque script ce qui me permettrai de savoir en temps réel si le logiciel Adobe reader est bien installé.

Une petite aide ?

Encore merci à tous

Connexion ou Créer un compte pour participer à la conversation.

Temps de génération de la page : 0.046 secondes
Propulsé par Kunena