friends Posted October 17, 2004 Share Posted October 17, 2004 Hi all. This question may sound silly, but i need to know if it could be done. I'm running a LAN environment, where all PCs are Windows 2000 and WinXP. I wonder if a PC-A (Windows 2000) that has no Shared folder at all, can we create a folder in C:\ of PC-A via accessing it from PC-B (Windows XP) ? If it is possible... how would it be done ? Cos I'm writting a script, where I wanted to perform as mentioned above, if the folder does not exists, the script will create itself. Thanks... and any suggestion on that ? Link to comment Share on other sites More sharing options...
Developers Jos Posted October 17, 2004 Developers Share Posted October 17, 2004 Hi all.This question may sound silly, but i need to know if it could be done.I'm running a LAN environment, where all PCs are Windows 2000 and WinXP.I wonder if a PC-A (Windows 2000) that has no Shared folder at all, can we create a folder in C:\ of PC-A via accessing it from PC-B (Windows XP) ?If it is possible... how would it be done ?Cos I'm writting a script, where I wanted to perform as mentioned above,if the folder does not exists, the script will create itself.Thanks... and any suggestion on that ?<{POST_SNAPBACK}>think it should be possible.With Psexec from sysinternals you can start a program/Script on PC A from PC B.The Script can check if the directory exists and Net Share can be used to create the share. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
friends Posted October 17, 2004 Author Share Posted October 17, 2004 I have tested... running my script on PC-A (Win2000), and check if a folder "POS-Log" exists, it does not work at all. This is due to PC-B (WinXP) has no sharing at all.... totally no sharing. in this case... how can we create a folder named "POS-Log" in PC-B from PC-A ? If as you said Psexec can do that... where can I download it ? And, are you very sure of that it works even no sharing was done ? Link to comment Share on other sites More sharing options...
Developers Jos Posted October 17, 2004 Developers Share Posted October 17, 2004 I have tested... running my script on PC-A (Win2000), and check if a folder"POS-Log" exists, it does not work at all. This is due to PC-B (WinXP) hasno sharing at all.... totally no sharing.in this case... how can we create a folder named "POS-Log" in PC-B from PC-A ?If as you said Psexec can do that... where can I download it ?And, are you very sure of that it works even no sharing was done ? <{POST_SNAPBACK}>psexec is an utility which enables you to upload and run a program to another pc.You can find it as part of the pstools on www.sysinternals.com . SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
friends Posted October 17, 2004 Author Share Posted October 17, 2004 sorry... I still don't see how a folder be created in C:\ of PC-B with this tool. mind to explain how ? a) Script run in PC-A, if folder does not exist in PC-B, create the folder named "POS-Log" under C:\ Drive (No sharing at all of PC- Thanks.... Cos I'm confused how the tool can perform this.... Link to comment Share on other sites More sharing options...
Developers Jos Posted October 17, 2004 Developers Share Posted October 17, 2004 sorry... I still don't see how a folder be created in C:\ of PC-B with this tool.mind to explain how ?a) Script run in PC-A, if folder does not exist in PC-B, create the folder named "POS-Log" under C:\ Drive (No sharing at all of PC-Thanks.... Cos I'm confused how the tool can perform this.... <{POST_SNAPBACK}>Let look at this in 2 separated tasks:Task 1=====Assume you can run a script on pcB.That script can check if the directory exists.If not , create it and do a net share command to create the share.Agree this is do able ?Task 2=====Now the only challenge left is to get that script loaded onto pcB from pcA.Thats were psexec comes in. psexec \\pcB -u Administrator -p psw -c script.exe SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
sugi Posted October 17, 2004 Share Posted October 17, 2004 I wonder if a PC-A (Windows 2000) that has no Shared folder at allDo you mean you disabled the default admin shares? If not, every admin can access the share c$ on the PC and simply create the dir using DirCreate('\\pc-a\c$\newfolder'). Link to comment Share on other sites More sharing options...
friends Posted October 22, 2004 Author Share Posted October 22, 2004 thanks JdeB amd Sugi....i'll try out u guys suggestions ! Link to comment Share on other sites More sharing options...
nobby Posted October 22, 2004 Share Posted October 22, 2004 (edited) With simple share enabled (should be by default) on your XP machines, you can always use the admin share which is created automatically for each drive. Admin share also enabled by default on win2k \\PC-A\c$ \\PC-A\d$ Include the relevant credential in your script and you can create folders remotely. Edited October 22, 2004 by nobby CheersNobby Link to comment Share on other sites More sharing options...
friends Posted October 24, 2004 Author Share Posted October 24, 2004 With simple share enabled (should be by default) on your XP machines, you can always use the admin share which is created automatically for each drive.Admin share also enabled by default on win2k\\PC-A\c$\\PC-A\d$Include the relevant credential in your script and you can create folders remotely.<{POST_SNAPBACK}>I have tested out Sugi suggestion (same as what you said above), I failedto create a new folder name "POS-Log" on \\PC-B (WinXP) from PC-A (W2K).Anybody mind to help me out on this by providing sample ?Note : PC-A (W2K) has 2 profiles, one is Administrator, another is STORE. I want to remotely create a folder "POS-Log" on PC-B, from PC-A (W2K) STORE account.Thanks Link to comment Share on other sites More sharing options...
Guest Py7|-|[]/\/ Posted October 25, 2004 Share Posted October 25, 2004 I have a 2000 computer networked with my xp computer also. The folders have different names, but they are there. On the win 2k computer, mine is listed as "My Documents" directly from the desktop. On my xp computer it is listed as C:\Shared Documents. Instead of creating a new folder, you might want to modify the names of those, so that they both match. The only reason being, that if you have a network, I don't think it will let you delete a shared folder completely, but I could be wrong. Link to comment Share on other sites More sharing options...
nobby Posted October 25, 2004 Share Posted October 25, 2004 Just to test:From the command line on PC-A, type net use q: \\PC-B\c$If you are logged in as an user that has admin rights to PC-B, it should map drive Q to the admin share on PC-B. If you are not logged on as above, you should be prompted for credentials.If it fails, then you will have to enable simple shares on the PC-B (winXP). Open an explorer window choose, Tools, Folders Options, View, under advanced settings, the last line. CheersNobby Link to comment Share on other sites More sharing options...
sugi Posted October 25, 2004 Share Posted October 25, 2004 If it fails, then you will have to enable simple shares on the PC-B (winXP).Simple file sharing has absolutely nothing to do with accessing shares like c$. It just hides a few options in the explorer.But like nobby said: try net use * \\pc-b\c$ in the command line and check the error message. If it's system error 53 then the admin shares are disabled. If it tells you that the login failed you'll have to enter an administrative account. Link to comment Share on other sites More sharing options...
friends Posted October 28, 2004 Author Share Posted October 28, 2004 ok.... thanks for another ideas ! i'll try it out.... hope this works ! you guys have enlighten me... may be it couldn't be created due to i'm not logging in PC-B (WinXP) with Admin rights.... thanks again.... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now