ChrisL Posted September 6, 2006 Posted September 6, 2006 Does anybody know how to create a share on Windows XP? I don't think Net Share is going to work because this only enables a read only share. Is there a COM object or something which you can create a share with read/write access for a specific user? Thanks [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
ChrisL Posted September 6, 2006 Author Posted September 6, 2006 I found this but I'm not sure exactly how to convert it, could someone help please Const FILE_SHARE = 0 Const MAXIMUM_CONNECTIONS = 25 strComputer = "atl-ws-01" Set objWMIService = GetObject _ ("winmgmts:\\" & strComputer & "\root\cimv2") Set objNewShare = objWMIService.Get("Win32_Share") errReturn = objNewShare.Create _ ("C:\Public", "PublicShare", FILE_SHARE, _ MAXIMUM_CONNECTIONS, "Public share for Fabrikam employees.") [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
lod3n Posted September 6, 2006 Posted September 6, 2006 Search for VAConvert. It converts VBS to AU3. [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]
GaryFrost Posted September 6, 2006 Posted September 6, 2006 Not tested: Const $FILE_SHARE = 0 Const $MAXIMUM_CONNECTIONS = 25 $strComputer = "atl-ws-01" $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\cimv2") $objNewShare = $objWMIService.Get("Win32_Share") $errReturn = $objNewShare.Create("C:\Public", "PublicShare", $FILE_SHARE, $MAXIMUM_CONNECTIONS, "Public share for Fabrikam employees.") SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
ChrisL Posted September 6, 2006 Author Posted September 6, 2006 Not tested: Const $FILE_SHARE = 0 Const $MAXIMUM_CONNECTIONS = 25 $strComputer = "atl-ws-01" $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\cimv2") $objNewShare = $objWMIService.Get("Win32_Share") $errReturn = $objNewShare.Create("C:\Public", "PublicShare", $FILE_SHARE, $MAXIMUM_CONNECTIONS, "Public share for Fabrikam employees.") Yes that works great thanks, I was trying to do it with objCreate and not ObjGet like what you have done. Thanks again [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
Burak Posted July 17, 2016 Posted July 17, 2016 On 06.09.2006 at 6:34 PM, GaryFrost said: Not tested: Const $FILE_SHARE = 0 Const $MAXIMUM_CONNECTIONS = 25 $strComputer = "atl-ws-01" $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\cimv2") $objNewShare = $objWMIService.Get("Win32_Share") $errReturn = $objNewShare.Create("C:\Public", "PublicShare", $FILE_SHARE, $MAXIMUM_CONNECTIONS, "Public share for Fabrikam employees.") How to access from other computers, read, write and how we can give permissions to?
Moderators JLogan3o13 Posted July 18, 2016 Moderators Posted July 18, 2016 @Burak did you not notice that this thread is almost 10 years old? Please don't resurrect old posts, as the language has grown in 10 years and what worked then may no longer be the best method to solve your problem. You are much better served by creating a new thread, explaining in detail what you are trying to accomplish, along with what you have tried on your own already to show you've put some effort in. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Recommended Posts