Martureo

//Martureo
Martureo

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • Martureo
    Participant
    Post count: 4

    Hi,

    Not sure what the specifics are but here are a few random possibilities …
    1. make sure source EXE is local and test the installation via CMD.EXE (elevated permissions)
    2. The vendors media could be the culprit and does NOT support it
    3. If it works on Windows 10 but NOT 7 then it must be the .Net Framework or the PS version you have installed needs updated on your windows 7 system.
    4. If there is a license involved you may have reached your limit and need to Deactivate from your Win10 machine first

    Hope that helps.

    • This reply was modified 4 days, 15 hours ago by  Martureo.
    • This reply was modified 4 days, 15 hours ago by  Martureo.
    • This reply was modified 4 days, 15 hours ago by  Martureo. Reason: grammar corrections
  • Martureo
    Participant
    Post count: 4

    yes … i used the following code:

    <code>cls
    $p = (get-process -Name setup).Id
    $WTitle = (Get-WindowTitle -GetAllWindowTitles | Where-Object {$_.mainwindowtitle -eq $p}).WindowTitle #.ParentProcessId -eq $p}).WindowTitle  # -GetAllWindowTitles | Where-Object {$_.ParentProcessId -eq $p}).WindowTitle
    $WTitle
    Send-Keys -WindowTitle $WTitle -Keys &#039;%n&#039;</code>

    Ineed to change the name of the window so i can wait for the new instance of the next window to occur (all windows seem to use the same parent window and i need to send keys once it is done installing and then prompts for more input. it uses the same original window name for all child windows which is why i need to change the name and wait for the new window to appear

    Im currently using the following code to get the window name and id but not sure how to change the name of the window from here

    <code># Get an Applications Process ID - the Application and its Processes can be found via the task manager
        $AppProcID = (Get-Process &#039;setup&#039;).id
    
    # Get an Applications Window Process ID - the Application and its Processes can be found via the task manager
        $Window = (get-process | where {$_.mainwindowtitle -match $WindowNames[2]}).id # | format-table id, name, mainwindowtitle -autosize</code>

    RECAP : i am trying to create a powershell script that will sendkeys to uninstall HaverAnalytics_DLX_4.x. The challenge and objective is to get the script to identify each child window of the uninstall, but the challenge is that they are all using the same Window name. To workaround this, i have decided to rename the windows as they appear so i can apply logic to the code to know which window\instance of the procedure requires specific sendkeys during the unisntall.

  • Martureo
    Participant
    Post count: 4

    it didnt work at : $WTitle = (Get-WindowTitle -GetAllWindowTitles | Where-Object {$_.ParentProcessId -eq $p}).WindowTitle

    keep getting boolean errors

    Write-Log : Cannot process argument transformation on parameter ‘WriteHost’. Cannot convert value “” to type “System.Boolean”. Boolean parameters accept only Boolean values and numbers, such as $True, $False, 1 or 0.
    + Write-Log -Message ‘Function Start’ -Source ${CmdletName} -DebugMessage
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidData: (:) [Write-Log], ParameterBindingArgumentTransformationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,Write-Log

  • Martureo
    Participant
    Post count: 4

    What powershell code can be used to rename any window during and installation ?

    – i have an installer that uses the same window name for each of the 3 prompts that i am sending keys to.

    – Currently i am using the following to sendkeys to the windows that setup.exe prompts me with:

    <code>[System.Reflection.Assembly]::LoadWithPartialName(&amp;quot;&#039;Microsoft.VisualBasic&amp;quot;)
    $p=get-process | where {$_.name -eq &amp;quot;setup&amp;quot;}
    [Microsoft.VisualBasic.Interaction]::AppActivate($p.ID)
    [System.Windows.Forms.SendKeys]::SendWait(&amp;quot;{ENTER}&amp;quot;)</code>
    • This reply was modified 1 month, 4 weeks ago by  Martureo.
Viewing 4 posts - 1 through 4 (of 4 total)