Powershellbefehl mit ja beantworten lassen
Verfasst: 23 Jan 2018, 13:42
Hallo liebes Forum,
und zwar hab ich ein kleines Problem ich möchte ein Befehl mit Powershell ausführen, dies klappt auch wunderbar, jedoch öffnet sich immer ein Powershellfenster indem ich mit "J" bestätigen muss. Kann mir da jemand helfen ?
und zwar hab ich ein kleines Problem ich möchte ein Befehl mit Powershell ausführen, dies klappt auch wunderbar, jedoch öffnet sich immer ein Powershellfenster indem ich mit "J" bestätigen muss. Kann mir da jemand helfen ?
Code: Alles auswählen
[Actions]
requiredWinstVersion >= "4.11.2.6"
DefVar $INST_SystemType$
Set $INST_SystemType$ = GetSystemType
if ($INST_SystemType$ = "x86 System")
Message "Installiere " + "Registry" + " 32 Bit..."
comment "Start setup program"
comment "Copy files"
comment "Patch Registry"
RegistryMd /32Bit
RegistryMT /32Bit
ExecWith_Powershell %Systemdrive%\Windows\System32\WindowsPowerShell\v1.0\powershell.exe winst /32Bit
RegistryMT1 /32Bit
endif
if ($INST_SystemType$ = "64 Bit System")
Message "Installing " + "Registry" + " 64 Bit..."
comment "Start setup program"
comment "Copy files"
comment "Patch Registry"
RegistryMd /64Bit
RegistryMT /64Bit
ExecWith_Powershell %Systemdrive%\Windows\System32\WindowsPowerShell\v1.0\powershell.exe winst /64Bit
RegistryMT1 /64Bit
endif
[RegistryMT]
openkey [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell]
set "Path"='C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe'
set "ExecutionPolicy"='Unrestricted'
[RegistryMT1]
openkey [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell]
set "Path"='C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe'
set "ExecutionPolicy"='Restricted'
[RegistryMd]
openkey [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\QualityCompat]
set "cadca5fe-87d3-4b96-b7fb-a231484277cc" = REG_DWORD:0000000
[ExecWith_Powershell]
Install-Module SpeculationControl
Get-SpeculationControlSettings