Rex Posted July 9, 2007 Posted July 9, 2007 Hi i'm trying to recreate a login script. Converting bat to autoit, but i have problem with the dos command subst, i can't finde any function in AutoIt thats "cloning" af folder to a drive(letter) I do not wish to share the folder by network, there for i ude the subst command. Any of u have a sugg. /Rex
Xenobiologist Posted July 9, 2007 Posted July 9, 2007 Hi, what do you mean? DirCopy? So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
Rex Posted July 9, 2007 Author Posted July 9, 2007 Hi,what do you mean? DirCopy?So long,Meganope not dircopy, that would just copy the contains :-)subst mounts a folder as a drive, this i a kinde of using net use (X: \\server\name\folder)where subst don not need the computer to be connecet to a network... eg. subst X: "C:\Temp" would "map" the C:\Temp folder as drive X/Rex
Monamo Posted July 9, 2007 Posted July 9, 2007 $sDriveLetter ="Q:" $sSubstPath = "C:\Temp" Run(@ComSpec & " /c " & 'subst ' &$sDriveLetter &' ' &$sSubstPath , "", @SW_HIDE) - MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]
ChrisL Posted July 9, 2007 Posted July 9, 2007 Run ("SUBST X: D:\HotQ","",@SW_Hide) [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
Rex Posted July 10, 2007 Author Posted July 10, 2007 $sDriveLetter ="Q:" $sSubstPath = "C:\Temp" Run(@ComSpec & " /c " & 'subst ' &$sDriveLetter &' ' &$sSubstPath , "", @SW_HIDE)I would not use the comspec i i can avoide it (don't like to mix old style / newstyle) and there are to many var's to keep track of.. (the script checks the name of the user current login on, and then "clones"/substs the users special folder to a drive) But if the use have speciel car's in the name and the are not translated correctly or somhow the comspec don't regonice them, the script fails :-( /Rex
Rex Posted July 10, 2007 Author Posted July 10, 2007 Run ("SUBST X: D:\HotQ","",@SW_Hide)This alsow just starts the comspec, just a nother way :-( /Rex
ChrisL Posted July 10, 2007 Posted July 10, 2007 I would not use the comspec i i can avoide it (don't like to mix old style / newstyle) and there are to many var's to keep track of.. (the script checks the name of the user current login on, and then "clones"/substs the users special folder to a drive) But if the use have speciel car's in the name and the are not translated correctly or somhow the comspec don't regonice them, the script fails :-( /RexSurely then it is the job of your script to trap for special characters, why calling subst with the run command would cause issues with the amount of variables you need to keep track of. I'll pretty much guarantee that any other method is going to be harder and likely involve more variables than the methods already explained [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
Rex Posted July 10, 2007 Author Posted July 10, 2007 Surely then it is the job of your script to trap for special characters, why calling subst with the run command would cause issues with the amount of variables you need to keep track of. I'll pretty much guarantee that any other method is going to be harder and likely involve more variables than the methods already explainedHmmm this is wher my poor english hits the wall, cource i did't mee var's like in $var but more like somthing out of my hands things, don't know how to say it...In my language, we have som car's that the comspect cant handle except if the are in DOS txt style (can't rember what it's called) so when i want to use the letter "ø" i need to convert i to "" using ALT + 0155 (acsii), and still i can't get i to work thru autoit and comspect, using i i use bat there is no prob at all ???But is't there a func in Autoit that works just like subst ??? see that would be a cool func..../Rex
ChrisL Posted July 10, 2007 Posted July 10, 2007 (edited) But is't there a func in Autoit that works just like subst ??? see that would be a cool func..../RexNo not a built in function.Whatever you put in a bat file would be the same calling run("subst......") Edited July 10, 2007 by ChrisL [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 July 10, 2007 Posted July 10, 2007 Ive just created a folder called FølœR and this code works fine Run ("SUBST X: D:\FølœR","",@SW_Hide) [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
Rex Posted July 10, 2007 Author Posted July 10, 2007 No not a built in function.Whatever you put in a bat file would be the same calling run("subst......")Cant get it to work :-(
Rex Posted July 10, 2007 Author Posted July 10, 2007 Ive just created a folder called FølR and this code works fineRun ("SUBST X: D:\FølR","",@SW_Hide)Damned now i know why the sh.. don't work for me.... i misspelled the folder name Jow it's working, thx/Rex
RDSchaefer Posted July 12, 2007 Posted July 12, 2007 Hi i'm trying to recreate a login script.Converting bat to autoit, but i have problem with the dos command subst, i can't finde any function in AutoIt thats "cloning" af folder to a drive(letter)I do not wish to share the folder by network, there for i ude the subst command.Any of u have a sugg./RexLook up DriveMapAdd(...)Ralph
Rex Posted July 12, 2007 Author Posted July 12, 2007 Look up DriveMapAdd(...)RalphThat requiers a shared folder, and that is just wath i don't want/Rex
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