Skip to content

Troubleshoot CompStart.ps1 using JSON file from issue #11 #57

Description

@dEhiN

As mentioned in issue #11:

While testing out the functionality of the json_adder function, 2 new and valid startup items were added to the startup data file.

However, when the CompStart.bat script was run, there were some issues with starting all the programs. The new test JSON file contains all 5 programs so the script can be troubleshot at a later time.

The new test JSON file mentioned is called startup_data--issue11.json and is found at /devenv/data/old_data/python-tool-testing/. The JSON data it contains is the following:

{
    "TotalItems": 5,
    "Items": [
        {
            "ItemNumber": 1,
            "Name": "Calculator",
            "FilePath": "calc",
            "Description": "A simple calculator",
            "Browser": false,
            "ArgumentCount": 0,
            "ArgumentList": []
        },
        {
            "ItemNumber": 2,
            "Name": "Google",
            "FilePath": "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe",
            "Description": "The Google Homepage",
            "Browser": true,
            "ArgumentCount": 3,
            "ArgumentList": [
                "--profile-directory=Default",
                "--new-window",
                "https://www.google.com/"
            ]
        },
        {
            "ItemNumber": 3,
            "Name": "Notepad",
            "FilePath": "%windir%\\system32\\notepad.exe",
            "Description": "A text editor",
            "Browser": false,
            "ArgumentCount": 0,
            "ArgumentList": []
        },
        {
            "ItemNumber": 4,
            "Name": "PowerShell Admin",
            "FilePath": "powershell",
            "Description": "PowerShell run as admin",
            "Browser": false,
            "ArgumentCount": 1,
            "ArgumentList": [
                "--RunAs"
            ]
        },
        {
            "ItemNumber": 5,
            "Name": "Dir of C",
            "FilePath": "dir",
            "Description": "Showing the directory listing for C:\\",
            "Browser": false,
            "ArgumentCount": 1,
            "ArgumentList": [
                "C:"
            ]
        }
    ]
}

When CompStart.ps1 ran, there were problems with startup items 3-5. Specifically:

  • Startup item 3 resulted in the Windows program chooser window for opening a file that's not associated with an existing program. In this case, selecting Notepad or another text editor (like Notepad++) showed a bash script.

  • Startup item 4 opened a PowerShell window but then showed an error with the argument "--RunAs". Will need to recall the argument to pass to run a PS session as admin.

  • Startup item 5 didn't seem to run at all.

Will probably need to debug the script using this JSON file to see what's going on, since the script works fine using the default startup file. Additionally, startup items 1-2 opened correctly during this testing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status
    Back-Burner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions