mentalindustrie Posted September 19, 2004 Share Posted September 19, 2004 OK i have a little problem here.no its not part of my unattended install, but i figure this is where most of the batch file people will be and have the most knowledge.I have created an autorun.inf for my usb flash disk. so when ever i double click on it from my computer it will run a small batch file to Synchronize my hard drive files to my flash drive files at home or at uni, depening where i am. then finnaly so i don;t have to right click on the drive I have added explorer X:explorer E:As the last to lines.However id like to close the "explorer E:" window when im at home.(e: is what is is called at uni, while i have ity set as x at home)I have tried taskkill /f /FI "windowtitle eq ISO*"But that seems to do nothingDoes anybody know how i can close that window, title ISO as well as My ComputerThanks Mentalindustries Link to comment Share on other sites More sharing options...
jdoe Posted September 19, 2004 Share Posted September 19, 2004 I don't think you can make it work for My Computer so I recommand using CMDOW.EXE for thatCMDOWCMDOW.EXE "My Computer" /CLSCMDOW.EXE "ISO" /CLS Link to comment Share on other sites More sharing options...
XtremeMaC Posted September 19, 2004 Share Posted September 19, 2004 i think u can get computer names and make some if statements for it.so when it founds that u're at home it'll open E drivewhen u're at your uni it'll open X drive.i'm sure u sit at different computers at uni so make if at home open e driveelse open x...so this way u won't have to deal with closing the window, only opening.. Link to comment Share on other sites More sharing options...
mentalindustrie Posted September 19, 2004 Author Share Posted September 19, 2004 Thank you XtremeMaC and jdoeWorks greatEcho.ECHO opening up explorer to USBIF EXIST E:\autorun.inf (Explorer E:)IF EXIST E:\autorun.inf (E:\apps\cmdow.exe "My Computer" /CLS)IF EXIST X:\autorun.inf (Explorer X:)IF EXIST X:\autorun.inf (X:\apps\cmdow.exe "My Computer" /CLS)E: at home will never have a autorun.inf as it is a storage drive not cdrom.If anyone has a even better solution for example build on XtremeMaC idea of %computername% (note this does NOT work) remebering will be used on a somewhat controlled system eg no reg edits allowed , then feel free as im sure there will be more people wanting to do this as time goes by.note:. X:\ is what the drive is called (at home) and is not a random variable.ThanksMentalindustires 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