Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Windows Networking & This PC
#1
I have 5 Windows PC's on my local home office network. I boot mine first then the other four.
Once the other pc's are up, I'll try to access a directory on pc #2 (drive O:\ ) and windows will throw an error saying that pc is not accessible (which it is really). So in order to access the dir I have to pull up This PC, and goto drive O:\ (has red X icon ). Now I can (Magically) connect to the root of O:\ and can access the dir from the shortcut I originally tried to access before!! And now the red X goes away.

So my question is this:  
Is there a simple way to, after boot, to tell This PC window that the network is up? or
SendMessage or Ping or anything??  I do not know why I would not be able to access O:\Tools from a desktop 
shortcut until I access the mapped PC first. I believe this is a BIG problem in Windows.

Any Ideas Welcome.   Thanks.

Scott

Edit:
Was using this code below, but still was not working...

Function Net_Wake2
Trigger @2     Help - how to add the trigger to the macro
Code:
Copy      Help
/ Net_Wake \
;; ::::::::::::::::  
;; 2021-02-25  Thursday  -  06.58.13
;;;;© Scott_Frohn  †††     -->  Version 2.0.0
;;;
;;;;Description of Function:
;,-->  Wakes up the Network - Access  -->   "J L O V N S"
;;;;Waits 5 minutes.  Also, now with error handling and re-checks for failed connections.  

;sub.clear; end    ;; Use this to clear reg values  --> For testing.  

;wait 300

;;; start
int i
str J L O V N S ss dt jr lr o2r vr nr sr ssr rkey 
rkey="Software\GinDi\QM2\Scott\Folders\NetWake"
Date_Time_To_Log(dt); out dt

int wJ=win("J:\" "CabinetWClass")
int wL=win("L:\" "CabinetWClass")
int wO=win("O:\" "CabinetWClass")
int wV=win("V:\" "CabinetWClass")
int wN=win("N:\" "CabinetWClass")
int wS=win("S:\" "CabinetWClass")

;Drive: J  
if(!FileExists("J:\UT" 1))
,jr="1"
,rset jr "jr" rkey
,J="Can't connect to J:"
,out F"[]{J}"
,goto JL
J = "J Ok."
jr="0"
rset jr "jr" rkey
out F"[]{J}"


;;; JL  
RunConsole2 "ping JL" L
out L
i=find(L "Received = 0" 0)
if i >=0 ;; if found
,i=0
,lr="1"
else
,lr="0"
rset lr "lr" rkey

;;; O2  
RunConsole2 "ping O2" O
out O
i=find(O "Received = 0" 0)
if i >=0 ;; if found
,i=0
,o2r="1"
else
,o2r="0"
rset o2r "o2r" rkey

;;; DELL  
RunConsole2 "ping DELL" V
out V
i=find(V "Received = 0" 0)
if i >=0 ;; if found
,i=0
,vr="1"
else
,vr="0"
rset vr "vr" rkey

;;; JLN
RunConsole2 "ping JLN" N
out N
i=find(N "Received = 0" 0)
if i >=0 ;; if found
,i=0
,nr="1"
else
,nr="0"
rset nr "nr" rkey

;;; SEF  
RunConsole2 "ping SEF" S
out S
i=find(S "Received = 0" 0)
if i >=0 ;; if found
,sr="1"
else
,sr="0"
rset sr "sr" rkey



;;; bottom

;;; Write to File - Log  
ss.from("[][]" dt "[][]" J "[]" L O V N S) ;; Combine all string outputs to (ss).  
;out
;out ss
ss.setfile("$My QM$\Net_Wake.txt" -1 -1 1) ;; from:  -1 append.    nbytes: -1  write whole string.    flags: 1 +newline,

;jr lr o2r vr nr sr
if(jr or lr or o2r or vr or nr or sr ="1")
,mac- "ReNet_Wake"




#sub clear

str jr lr o2r vr nr sr ssr rkey 
rkey="Software\GinDi\QM2\Scott\Folders\NetWake"

jr="0"
lr="0"
o2r="0"
vr="0"
nr="0"
sr="0"

rset jr "jr" rkey
rset lr "lr" rkey
rset o2r "o2r" rkey
rset vr "vr" rkey
rset nr "nr" rkey
rset sr "sr" rkey
#2
Seemed as though RunConsole2 "ping PC" was working at first, but could not reproduce results.
I've searched here, as well as MSDN. Can't seem to come up with reliable solution. 

This Major flaw with windows networking will surely pose a big problem with any of my future programs involving the windows network!
#3
your problem with mapped network drives is a known windows issue. Most of the solutions I read suggest making a script that remaps the drives on login or creating a registry entry for the drive.
#4
Grrrrr 'microsoft'!!   Angry
Thanks Kevin


Forum Jump:


Users browsing this thread: 1 Guest(s)