Skip to content

Commit

Permalink
Windows testing
Browse files Browse the repository at this point in the history
Signed-off-by: Shveta Sachdeva <[email protected]>
  • Loading branch information
sshveta committed Jan 8, 2025
1 parent 3f8a995 commit d4ef4fb
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/windows-nightly-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,15 @@ jobs:
# Step 3: Execute the command using PsExec
Write-Output "Executing PsExec as nonadmin to run 'code --version'..."
Write-Output "PsExec Path: $psExecPath"
# Write-Output "Executing command: & $psExecPath -accepteula -nobanner -u nonadmin -p 'pass123!' powershell.exe -Command 'hostname > $logPathOut 2> $logPathErr'"
try {
& $psExecPath -accepteula -nobanner -u nonadmin -p "pass123!" powershell.exe -Command "hostname"
} catch {
Write-Output "Error running PsExec: $_"
Write-Output "Executing command: & $psExecPath -accepteula -nobanner -u nonadmin -p 'pass123!' powershell.exe -Command \"hostname > 'C:\Users\nonadmin\abcde.txt' 2>&1\""
# Check if the log file exists
if (Test-Path 'C:\Users\nonadmin\abcde.txt') {
Write-Output "File exists. Printing content of abcde.txt..."
# Print the content of the log file
Get-Content 'C:\Users\nonadmin\abcde.txt'
} else {
Write-Output "File 'abcde.txt' does not exist."
}
#& $psExecPath -accepteula -nobanner -u nonadmin -p "pass123!" powershell.exe `
# -Command "hostname > '$logPathOut' 2> '$logPathErr'"
Expand Down

0 comments on commit d4ef4fb

Please sign in to comment.