This project is read-only.

Execution policy is changed to Unrestricted on first run


If Execution Policy is set to anything other than Unrestricted, the Execution Policy is changed to Unrestricted.
set-executionpolicy RemoteSigned
get-executionpolicy returns RemoteSigned
start core config
get-executionpolicy returns Unrestricted


AlxD wrote Oct 17, 2010 at 9:18 PM

I think that this is very unprofessional to write such a code that changes security settings on user's computer without user consent.
Especially when there is an easy way to avoid that:
1) in Start_CoreConfig.wsf comment lines 346-348; this will remove execution policy changing code
2) change line 351 from
iRetCode = WshShell.Run ("%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -WindowStyle Minimized -Sta -file CoreConfig.ps1", 1, True)
iRetCode = WshShell.Run ("%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -executionpolicy Unrestricted -WindowStyle Minimized -Sta -file CoreConfig.ps1", 1, True)

wrote Oct 21, 2011 at 8:35 PM

rlauria wrote Dec 19, 2012 at 1:59 PM

In Start_CoreConfig.wsf change
Function LaunchCoreConfig()
End Function


Function LaunchCoreConfig()
Dim iRetCode
Dim Temp
LaunchCoreConfig = False

On Error goto 0
WshShell.CurrentDirectory = GlobalFolderPath
iRetCode = WshShell.Run ("%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -executionpolicy bypass -WindowStyle Minimized -Sta -file CoreConfig.ps1", 1, True)
If iRetCode <> 0 Then
Call Debug("Error: During launch of CoreConfig! ReturnCode:" & iRetCode)
Call WshShell.Popup("Error: During launch of CoreConfig! ReturnCode:" & iRetCode & Vbcrlf & " Please copy source to local drive and try again!" ,0,"Error", 16)
LaunchCoreConfig = True
End If
End Function

wrote Feb 22, 2013 at 1:07 AM