Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Failing to connect by 'net use'
Post: RE: Failing to connect by 'net use'
My bad! **wink**
I missed little space:
before:
"net use {drl}:\\\\{e_ip}\\c$ /u:someuser somepassword"
after:
"net use"+" "+drl+":"+" \\\\"+e_ip+"\\c$ /u:someuser somepassword" I'm OK now.
Thank yo... |
|
tester_V |
General Coding Help |
1 |
170 |
Apr-20-2024, 06:31 AM |
|
|
Thread: Failing to connect by 'net use'
Post: Failing to connect by 'net use'
Greetings to those that still up at this time! **wink**
I'm failing to map network shares.
I'm identifying "letters not in use" for a share to mount and use it as a variable
and using a list of IPs... |
|
tester_V |
General Coding Help |
1 |
170 |
Apr-20-2024, 05:34 AM |
|
|
Thread: Hide CMD call window
Post: RE: Hide CMD call window
it works, no pop ups! **biggrin**
deanhystad, you are DA MAN! **wink**
Thank you! |
|
tester_V |
General Coding Help |
8 |
302 |
Apr-16-2024, 08:10 PM |
|
|
Thread: Hide CMD call window
Post: RE: Hide CMD call window
I was happy too early **cry**
it still pops up.
I'm not sure how to incorporate "Dead_YEY" snippet correctly to the code I have.
I tried to modify it but it does not work:
import subprocess
from subp... |
|
tester_V |
General Coding Help |
8 |
302 |
Apr-16-2024, 06:30 PM |
|
|
Thread: Hide CMD call window
Post: RE: Hide CMD call window
Yes, DOS window was popping up very hour, I understand it was running " arp -a".
Outstanding! It is what I wanted/needed.
You guys (girls?) are great!
Thank you! |
|
tester_V |
General Coding Help |
8 |
302 |
Apr-16-2024, 05:46 PM |
|
|
Thread: Hide CMD call window
Post: Hide CMD call window
Greetings!
Running my script every hour on a windows machine.
The script has a “arp-a” cmd call and a window pops up that is very annoying **angry** .
How I can suppress the pop up window?
code:
wit... |
|
tester_V |
General Coding Help |
8 |
302 |
Apr-15-2024, 07:45 PM |
|
|
Thread: If a set element has digits in the element
Post: RE: If a set element has digits in the element
I don't know what is wrong with me...
Sorry for taking your time!
I fixed it.
import re
if len(vid_set) > 1 :
for e_vid in vid_set :
if re.findall(r'\d+',e_vid) :
print(e_v... |
|
tester_V |
General Coding Help |
3 |
321 |
Mar-25-2024, 05:10 AM |
|
|
Thread: If a set element has digits in the element
Post: If a set element has digits in the element
Good evening!
I'm trying to find if an element of a set has a digit/digits as a part of an element.
I'm using ".isdigit" but it does not work...
I have to test the set if it has just one element or it... |
|
tester_V |
General Coding Help |
3 |
321 |
Mar-25-2024, 04:34 AM |
|
|
Thread: using PowerShell from Python script for mounting shares
Post: RE: using PowerShell from Python script for mounti...
DeaD_EyE!
That is an amazing way, for me, how one could do that.
Thank you for sharing!
tester_V |
|
tester_V |
General Coding Help |
8 |
543 |
Mar-12-2024, 06:26 PM |
|
|
Thread: using PowerShell from Python script for mounting shares
Post: RE: using PowerShell from Python script for mounti...
Whatever you think is a good idea, it is a good idea for me too man! **dance**
Thank you again. |
|
tester_V |
General Coding Help |
8 |
543 |
Mar-11-2024, 02:39 AM |
|
|
Thread: using PowerShell from Python script for mounting shares
Post: RE: using PowerShell from Python script for mounti...
Like this will do, right?
try :
call(r"net use Z: /delete /yes")
ln1= f'$net = new-object -ComObject WScript.Network'
ln2= f'$net.MapNetworkDrive("Z:", "\\{host_name}\c$", $false, "domain... |
|
tester_V |
General Coding Help |
8 |
543 |
Mar-10-2024, 05:21 AM |
|
|
Thread: using PowerShell from Python script for mounting shares
Post: RE: using PowerShell from Python script for mounti...
I thought when I open the file with "with open..." it closes automatically...
Should I use instead of it :
#with open('C:/Scripts/somescript/Connect-0.ps1','w') as ps :
ps = open('C:/Scripts/s... |
|
tester_V |
General Coding Help |
8 |
543 |
Mar-10-2024, 04:08 AM |
|
|
Thread: using PowerShell from Python script for mounting shares
Post: using PowerShell from Python script for mounting s...
Greetings to you all!
I have a list of Hosts, I need to connect to each host and do something with the files on it.
For some reason some of the hosts refusing connection **angry** , but I can mount it... |
|
tester_V |
General Coding Help |
8 |
543 |
Mar-09-2024, 07:11 AM |
|
|
Thread: Matching string from a file
Post: RE: Matching string from a file
You guys are great! That is what I looking for..get some code and the explanation... **smile** |
|
tester_V |
General Coding Help |
5 |
448 |
Mar-05-2024, 01:31 AM |
|
|
Thread: Matching string from a file
Post: Matching string from a file
Greetings!
I’d like to match strings in files, it seems simple but I’m failing to do this…
It has multiple white spaces before the word Start Time or End Time and the Time and Date of the event
String... |
|
tester_V |
General Coding Help |
5 |
448 |
Mar-04-2024, 09:07 PM |
|
|
Thread: Re Try loop for "net use..." failures
Post: RE: Re Try loop for "net use..." failures
My bad again! **wink** I missed this part:
from subprocess import check_call, CalledProcessError |
|
tester_V |
General Coding Help |
10 |
614 |
Mar-02-2024, 08:15 AM |
|
|
Thread: Re Try loop for "net use..." failures
Post: RE: Re Try loop for "net use..." failures
Gribouillis, thank you for the snipped, but it produces errors:
line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['net', 'use', 'Z:', '/dele... |
|
tester_V |
General Coding Help |
10 |
614 |
Mar-02-2024, 07:50 AM |
|
|
Thread: Re Try loop for "net use..." failures
Post: RE: Re Try loop for "net use..." failures
Here is a snipped that gives me the value from the subprocess call.
from subprocess import run
process = run("net use Z: "+"\\\\"+ips+"\\c$\\S_Files /u:SomeUser Somepass")
... |
|
tester_V |
General Coding Help |
10 |
614 |
Mar-02-2024, 07:39 AM |
|
|
Thread: Re Try loop for "net use..." failures
Post: RE: Re Try loop for "net use..." failures
I'm looking at how to 'retry' without the try/except and I have no idea how to force "retry" on failure... |
|
tester_V |
General Coding Help |
10 |
614 |
Mar-02-2024, 05:09 AM |
|
|
Thread: Re Try loop for "net use..." failures
Post: RE: Re Try loop for "net use..." failures
I see, I'll try it. Thank you! |
|
tester_V |
General Coding Help |
10 |
614 |
Mar-02-2024, 04:33 AM |