Is quotes needed for parameter in Windows Task Scheduler?
When running process in Windows Task Scheduler is quotes needed in parameter? Which would this be equivalent to if typing in command prompt?
\\server\myscript.exe 18 import
or
\\server\myscript.exe "18" "import"
do you know?
how many words do you know
See also questions close to this topic
-
WebView2 JS injection returns empty json string
With WebView2 for targeting Windows, I am trying to setup my own context menu. Either by selected text or by underlying element pointed by mouse click.
However, I can't get DOM element by mouse operation or even by byId. I think my JavaScript injection or WebView property setting is something wrong, but not too sure. Can anyone suggest me the resolution?
The version info.
- OS : Windows 10 Pro 21H2 19044.1682
- Visual Studio : Community 2022 17.1.6
- WebView2 : 1.0.1185.39
- Project Property: Target framework=.NET 6.0; Target OS version=10.0.19041.0
Here's the testing code
using Microsoft.Web.WebView2.Core; namespace WinFormsApp1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); HTML(@"C:\temp\test.html"); } public void HTML(string url) { webView21.CoreWebView2InitializationCompleted += WebView2Control_CoreWebView2InitializationCompleted; webView21.Source = new Uri(url); } private void WebView2Control_CoreWebView2InitializationCompleted(object? sender, CoreWebView2InitializationCompletedEventArgs e) { if (!e.IsSuccess) { MessageBox.Show($"WebView2 creation failed, with exception : {e.InitializationException}"); return; } // subscribe to events we are interested in webView21.CoreWebView2.ContextMenuRequested += CoreWebView2_ContextMenuRequested; // user clicked right mouse to show context menu } private async void CoreWebView2_ContextMenuRequested(object? sender, Microsoft.Web.WebView2.Core.CoreWebView2ContextMenuRequestedEventArgs e) { IList<CoreWebView2ContextMenuItem> menuItemList = e.MenuItems; menuItemList.Clear(); // clear default menu items, like prev, next, property //GETTING SELECTED TEXT string text = e.ContextMenuTarget.HasSelection ? e.ContextMenuTarget.SelectionText : ""; // it works if (string.IsNullOrEmpty(text)) // no text selection, then examine DOM { //GET AN UNDERLYING ELEMENT FROM MOUSE POINT var result = await webView21.CoreWebView2.ExecuteScriptAsync($"document.elementFromPoint({e.Location.X},{e.Location.Y})"); //it doesn't work, just returns an empty JSON text (not null) //var result = await webView21.CoreWebView2.ExecuteScriptAsync("function foo(){return 'foo() gets called';}; foo();"); //for testing purpose, it works //var result = await webView21.CoreWebView2.ExecuteScriptAsync("function foo(){return document.getElementById('table-content'};foo();)"); //it returns an empty result } // TO DO // setup menuItem tree based on the result we got //...... //...... e.Handled = true; } } }
-
site only opens in CefSharp
zaakr.net is a site can be opened only in zaakr.exe application or through android(.apk), when opened in browser u been redirected to https://browser.zaakr.net so u download there application, (.exe) file is using cefsharp as a browser so it can access website, from 2 month i could open it from chromium as cefsharp uses chromium, now i can't access website through chromium for some reason idk, i even made a cefsharp browser myself using visual studio nothing worked all the time i been redirected to browser.zaakr.com, i want to access through any browser that have devtools available for a project, note that application zaakr.exe is still using cefsharp even the older version still can access site. i would appreciate any help, sry for any spelling mistakes, thanks.
-
Subprocess $Env:Path python: The filename, directory name, or volume label syntax is incorrect
I am trying to change the windows environment variables, but I am having trouble doing so.
Before I tried to use
os.environ()
I tried out using powershell commands and adding a string to$Env:Path
which worked, but removing it with:$env:Path = ($env:Path.Split(';') | Where-Object -FilterScript {$_ -ne $Remove}) -join ';'
however didn't seem to remove it being my path I want to add
("FFmpeg:C:\Users\user\AppData\"
) and adding it with+= C:/Users/etc..
didn't see, the way to go.Another way I tried to add vars through the Powershell commands was using
SetEnviormentVariable
and it seemed to work fine but once I restarted my PC the entry I made with it was gone.Sadly though all in the end all my powershell commands didn't work with subprocess. Whatever command it was I was using here I got:
PS C:\Users\Me123> python >>> import subprocess >>> subprocess.run("$Env:Path", shell=True) The filename, directory name, or volume label syntax is incorrect. CompletedProcess(args='$Env:Path', returncode=1)
-
Hazelcast cluster member crash results in loosing all scheduled tasks
We are running 4 instances of our java application in hazelcast cluster. We scheduled around 2000 task using schedule executor service schedule method. Hazelcast partition all these 2000 tasks across the 4 instances. Due to some reason one of the cluster member crashes then all the task that are assign to the partition that are owned by the crashed node are lost, rest all 3 cluster member completed their assign task.
So how can we overcome this problem to avoid the lost tasks.
-
Modules not recognized when running script windows task manager
I have a script named Sku_Matching_Salesforce.py. The location of the file is :
C:\Users\User\Desktop\Personal\DABRA\Sku_Matching_Salesforce.py
this is the VENV that is activated:
C:\Users\User\Desktop\Personal\DABRA\venv
If I run the script, it works fine, but when I run it via Windows Task Manager, it doesn't recognize Modules. I get this error message:
Traceback (most recent call last): File "C:\Users\User\Desktop\Personal\DABRA\Sku_Matching_Salesforce.py", line 5, in <module> import matplotlib.pyplot as plt ModuleNotFoundError: No module named 'matplotlib' Traceback (most recent call last): File "C:\Users\User\Desktop\Personal\DABRA\Sku_Matching_JFS-Beta1.py", line 5, in <module> import sqlalchemy ModuleNotFoundError: No module named 'sqlalchemy' Traceback (most recent call last): File "C:\Users\User\Desktop\Personal\DABRA\Sku_Matching_Solodeportes_Beta1.py", line 5, in <module> import sqlalchemy ModuleNotFoundError: No module named 'sqlalchemy' Traceback (most recent call last): File "C:\Users\User\Desktop\Personal\DABRA\Sku_Matching_OpenSports_Beta1.py", line 5, in <module> import sqlalchemy ModuleNotFoundError: No module named 'sqlalchemy' Traceback (most recent call last): File "C:\Users\User\Desktop\Personal\DABRA\Unificador_Salida_Final.py", line 6, in <module> import sqlalchemy ModuleNotFoundError: No module named 'sqlalchemy'
This is how I configured the task in windows manager in "Actions" label:
Program or Script: C:\Windows\py.exe Optional Arguments : Allscript.py (is the file that runs the script) Starts in : C:\Users\User\Desktop\Personal\DABRA\
I don´t know what the problem is...Could someone help me please?
Thanks in advance
-
System variables aren't evaluated in Windows command prompt, user variables are
I would like to be able to
cd
into a folder that is added to a system as a system variable in Windows 11. Here is a visual representation of the problem:As you can see, windows command prompt is able to "resolve" variables from the "User variables" section of the Environment variables configuration in Windows, however variables from the "System variables" aren't.
I need to
cd
into %VS140COMNTOOLS% folder but as you can see it won't be resolved by the command prompt. Is this by design?VS140COMNTOOLS also doesn't appear in
set
output.How can I navigate into %VS140COMNTOOLS%?
-
Cannot compare two values in a batch file for equal, less, or greater
i've a problem with this code in batch:
:start @echo off set/p "a=put a value" set/p "b=put another value" if %a%equ%b% call :equal if %a% lss %b% call :minor if %a% grt %b% call :major :end echo goodbye exit /b :equal echo the first number is equal to the second one goto :eof :minor echo the first number is minor of the second one goto :eof :maggiore echo the first number is major of the second one goto :eof pause>nul
when i try to execute it... the prompt close but i don't understand why... i've tried in 2 pc with Windows 10. Can someone help me? Thanks in advance!
-
Changing the file's format within command prompt to access the file
The 'package' as they call a file is locked and I want to access it. The format of the file is _deb so I want to change the _ for a dot via the command prompt, how do I do this?
Thank you!
Tristan Mayrand