If you connect your drive to the computer you get the drive letter of the first free letter. that can differ between the systems you use. Some people want/need a fixed drive letter for their portable drive. So the idea of some people was simple: Mount the portable drive to a virtual drive. Windows itself got all tools (normally) onboard. It is done by subst.exe.
Since version 2.0 its possible to configure a drive letter. There is a INI file named VirtualDriveSet.ini, which is located in the application main folder. Modify the variable Driveletter to your choice.
Update
Version 2.1
add un-subst
add lable for virtual drive
add paf like ini handling
Version 2.2
add configuration on first run
code cleanup
IF YOU USE A PAM MOD WITH EJECT FUNCTION, THE EJECT FUNCTION STOP WORKING AFTER STARTING VIRTUALDRIVESET!!!
Download VirtualDriveSet Portable 2.2
cu & hf
Dijaboro
ps: thx @ porwerjuice
It works fine BUT,
on windows 2000 the drive letter will be set but now i have 2 Drive. The old F: drive and the new drive. i found the same error on version 1.0.
at home i will test it with XP.
BTW, when you can fix this, so that i have only 1 drive (the new X:) then you are my Personal hero.
greetz and thanks
NeoRame
Hell was full, so I came back!!!
Sorry for my lousy English!!!
Need to store a copy of the ini file in /Data/settings so the PA backup utility will backup the settings for the app.
Portable app launcher needs to check for the existence of the file in the /Data/settings dir and use that if it exists by copying it to the proper location.
Need to create a way to "un-susbt" (un-mount virtual drive) so the user doesn't have virtual drives that point to no where. What happens if I plug in my drive, assign a drive letter to to it, and then remove the drive? For portable hard drives at least, a disk icon with a red question mark shows up in Explorer. Not good. Compile additional Autoit program to undo the subst command (subst [drive-letter] /D) along with additional portable app launcher unless you re-code the current one to have two radio buttons with a prompt for what you want the user to do. Mount or unmount the virtual drive letter.
EDIT: I'm on WinXP and you end up with two drive letters also. I thought this was normal with the subst command. It's not?
Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!
is there another way to set a new drive letter, without showing 2 drives?
Hell was full, so I came back!!!
Sorry for my lousy English!!!
..so it is.A lot is discussed here https://portableapps.com/node/9691 already.
Safely removing the drive only works with the virtual drive letter, though file changes are synchronized between clone and original drive even when you make changes on the original drive. A "switch" between subst and \subst would do better...
"Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis .." Friday Next -
"May The Schwartz be with You!" Yogurt the Yoda
can you give me a howto for the right ini handling ?
a solution for unsubst will be available in the next version
This is the code I use for the Tick5 game and it's fully commented in my source. This code backs up a copy of the .ini on the local machine if you have Tick5 permanently installed (per John's guidance). You don't need to worry about that since your program will be run from a portable device only so you can trim this code down when you customize the file names and locations.
Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!
tried it several times .. can't get it running ... maybe someone can help me
its not the complete sourcecode...
"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate
here was a really quick way i came up with it
here you go
this one will also look for the ini in the data folder
luv this program btw
Edit:
also do you really need all that code for the launcher?
here is a base you can use
you can change the names in the beginning.
Please search before posting. ~Thanks
you need to change the line where it says:
FindProcDLL::FindProc "PNotes.exe" ;if running, exit
"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate
yea that would prob help
just another quick addon for the source file
now even if the file does not exist it will create it with the drive letter
enjoy
Please search before posting. ~Thanks
the unsubst was never a problem. a right ini handling was requested. i just need somthing like that :
VirtualDriveSetPortable
+App
+Data
+Setting
+Default
+Other
+...
+...
If no ini ist located in folder Setting it should be copied from folder Default to folder Setting. Thats the only problem i still have.
OR
Please search before posting. ~Thanks
i like the autoit version. thx a lot. new version is finished.
also if the ini does not exist why dont you ask the user what letter they want the virtual dirve to be
Please search before posting. ~Thanks
yes would be nice for novices but no the tool got already more features as planned.
not as a system for novices, but because sometimes the drive is taken, so if you let them choose then they wont run into the problem of not seeing the drive and thinking it is a bug
just out of curiosity (i am not a autoit master)
how is what you did better than
Please search before posting. ~Thanks
do you have any messenger ? icq ? skype ? msn ? please send me a alias via the contact form on my page.
received mail ?
thanx
Please search before posting. ~Thanks
Works without any complaint.
On/off switch just as I like it. And even the drive letters already on the system are neglected ( I didn´t change the in the .ini before the first start though I had adrive X already).Good work!
"Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis .." Friday Next -
"May The Schwartz be with You!" Yogurt the Yoda
see above
I was going to write this app.. you beat me to it!
Works like a charm.. Actual Drive, and Virtual Drive showing .. no problems!
-Mark
After writing the in ini each time I open the program nothing seems to happen, does this program work with Vista?
actually i don't have any vista available. but i will get my windows 7 this year. than i will create a compatible version if necessary.