run syncronouscommand local without having to specify drive letter
Posted 05 February 2010 - 12:47 PM
For example, the dvd drive could be D or it could be E
...this is actually going on from a memory stick and the drive letter changes..either way, my question is,
when runsyncrnouscommand runs, what path is it executing from. Does it run from the root of the drive or from sources?
So another example, if runsyncrouscommand was running from the root, and my app was in a folder called apps on the root then the <path> would simply be /apps/file.exe
So you see what I mean about not specifying drive letter.
So basically I want to be able to run copyappsvista.cmd without specifying drive letter, but whatever drive letter it is, the rest of the path will be the same.
I cant use %cdrom or %dvdrom flags because this is running from a flash drive.
Thanks in advanced.
Posted 05 February 2010 - 05:57 PM
1. Have your install copy the program to install to the hard drive. Then write a wrapper (you can use AutoIT) that installs the program and then deletes the install files when it is done.
2. Put your app on a network share. Map the drive and then your drive letter shouldn't ever change.
Posted 06 February 2010 - 12:35 AM
Here are 2 different ways to do it,
for %%i in (C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z:) do if exist %%i\sources\install.wim set MEDIA=%%i ECHO %MEDIA%
EDIT: and you can use the CDROM variable with a USB disk, in fact you can call the variable anything you like, CDROM, MEDIA, it doesn't make any difference. As long as you use the same name later in the script when you try to access the variable. capisce
This post has been edited by MrJinje: 06 February 2010 - 01:03 PM
Posted 18 February 2010 - 10:59 AM
i decided to go with cmdlines that copies all my install files to the c drive (for some reason the $ folders arent working) and then running it using C:\ since that never changes (except with stupid card readers sometimes arghhhh).
Posted 22 February 2010 - 12:24 PM
So is there no way to just not use a drive letter?
for example, if my working directory was D:\sources and i specified \install\run.exe then the working path would be D:\sources\install\run.exe
See what I mean?
Well thats what I want to do, but i need to run a program to do that copying.
Posted 22 February 2010 - 12:40 PM
Posted 23 February 2010 - 09:37 AM
Remember that Vista may use different registry paths and DOES use different paths for the User profile and Programs, since there are no Documents and Settings or Program Files folders anymore. So if you are using any absolute paths for XP, you may need to change them. Easiest might be to detect which type of OS it is, and use one method for XP and the other for Vista.
Posted 23 February 2010 - 01:40 PM
I'm guessing its a problem with drive letters. works in xp no problem but for whatever reason, it doesnt here. SO I need a solution. What would be helpfull is knowing the working directory and put my copyapps.cmd in that and then use the patch \workingpath\copyapps.cmd instead of D:\install\copyapps.cmd
The problem is that this will be run on multiple computers, so while the main drive install will always be C:, the flash drive could be anything else.
Posted 25 February 2010 - 11:57 AM
Thanks for all the input guys.
*now i wonder why my $oem$ folders didnt work in xp..