OS: Windows 8 64bit
PowerShell Studio 2015 Version: 4.2.86
Issue
so im having this issue here with the preview test run.
i have a script im creating that creates a registry key and counts against it 5 times before its forcing you to a 2nd screen..
ive Deleted the registry key that ive created and its contents so it shouldnt see it anymore, but yet in still it moves to the 2nd screen as if it see it there and maxed out
Code: Select all
$strRetryCnt = (Get-ItemProperty HKLM:SOFTWARE\Sage).Count
function Main {
<#
.SYNOPSIS
The Main function starts the project application.
.PARAMETER Commandline
$Commandline contains the complete argument string passed to the script packager executable.
.NOTES
Use this function to initialize your script and to call GUI forms.
.NOTES
To get the console output in the Packager (Forms Engine) use:
$ConsoleOutput (Type: System.Collections.ArrayList)
#>
Param ([String]$Commandline)
#--------------------------------------------------------------------------
#TODO: Add initialization script here (Load modules and check requirements)
if ($strRetryCnt -eq 5)
{
Call-final_psf
}
elseif ($strRetryCnt -ne 5)
{
Call-MainForm_psf
}
#--------------------------------------------------------------------------
$global:ExitCode = 0 #Set the exit code for the Packager
}
but yet when i go back to the actual editor and do a run in console it shows that it doesn't Exist
[powershell]PS C:\Users\sfox\Documents\SAPIEN\Projects\Office365UI> (Get-ItemProperty HKLM:SOFTWARE\Sage).Count Get-ItemProperty : Cannot find path 'HKLM:\SOFTWARE\Sage' because it does not exist. At line:1 char:2 + (Get-ItemProperty HKLM:SOFTWARE\Sage).Count + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (HKLM:\SOFTWARE\Sage:String) [Get-ItemProperty], ItemNotFoundException + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemPropertyCommand 0[/powershell]
also the item that Drove me to going in with run as administrator is that its not allowing me to do any registry changes even tho i have the elevated permissions button clicked. is that normal?