PortableApps.com Platform and Suite 1.6 have been released.
VirtualDriveSet Portable 2.2![]() Submitted by Dijaboro on January 8, 2008 - 7:12am
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. Update Version 2.2 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 ( categories: )
|



It works fine BUT, on
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 X: 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
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
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!!!
@Edit
..so it is.A lot is discussed here http://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
ini file
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
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.
Section "Main" ReadINIStr $DISABLESPLASHSCREEN "$EXEDIR\${NAME}.ini" "${NAME}" "DisableSplashScreen" FindProcDLL::FindProc "tick5gui.exe" ;if running, exit StrCmp $R0 "1" TheEnd StrCmp $DISABLESPLASHSCREEN "true" SkipSplash ;=== Show the splash screen before processing the files InitPluginsDir File /oname=$PLUGINSDIR\splash.jpg "${NAME}.jpg" newadvsplash::show /NOUNLOAD 1000 200 0 -1 /L $PLUGINSDIR\splash.jpg SkipSplash: IfFileExists `$PROFILE\Tick5.ini` "" MoveIni ; Check if local Tick5.ini exists -- No: Goto MoveIni Rename `$PROFILE\Tick5.ini` `$EXEDIR\Data\settings\Tick5.ini.bak` ; Backup the local machine's Tick5.ini file MoveIni: IfFileExists `$EXEDIR\Data\settings\Tick5.ini` "" Execute ; If settings saved from last time -- No: Run program to generate a new ini Rename `$EXEDIR\Data\settings\Tick5.ini` `$PROFILE\Tick5.ini` ; Copy ini back to profile dir Execute: ExecWait `"$EXEDIR\App\Tick5\tick5gui.exe"` Rename `$PROFILE\Tick5.ini` `$EXEDIR\Data\settings\Tick5.ini` ; Save settings back to portable IfFileExists `$EXEDIR\Data\settings\Tick5.ini.bak` "" TheEnd ; Check if local Tick5.ini file backed up? Rename `$EXEDIR\Data\settings\Tick5.ini.bak` `$PROFILE\Tick5.ini` ; Return original ini file to the local machine TheEnd: newadvsplash::wait SectionEndCancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!
tried it several times ..
tried it several times .. can't get it running ... maybe someone can help me
thats because
its not the complete sourcecode...
"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate
unsubst
here was a really quick way i came up with it
here you go
$var = IniRead("Data\VirtualDriveSet.ini", "VirtualDriveSet", "Driveletter", "B:") if FileExists ($var&"\") Then Run ("subst.exe /d "& $var) Else $var = "subst.exe "&$var&" \" Run($var) EndIfthis 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
And
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
yea that would prob help
just another quick addon for the source file
If Not FileExists("Data\VirtualDriveSet.ini") Then IniWrite ("Data\VirtualDriveSet.ini", "VirtualDriveSet", "Driveletter", "X:") EndIf $var = IniRead("Data\VirtualDriveSet.ini", "VirtualDriveSet", "Driveletter", "B:") if FileExists ($var&"\") Then Run ("subst.exe /d "& $var) Else $var = "subst.exe "&$var&" \" Run($var) EndIfnow even if the file does not exist it will create it with the drive letter X:
enjoy
Please search before posting. ~Thanks
hmmm
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.
this will work...
If Not FileExists("Data\VirtualDriveSet.ini") Then IniWrite ("Data\VirtualDriveSet.ini", "VirtualDriveSet", "Driveletter", "X:") EndIfOR
;=== Program Icon Icon "${NAME}.ico" Var DISABLESPLASHSCREEN Section "Main" ReadINIStr $DISABLESPLASHSCREEN "$EXEDIR\${NAME}.ini" "${NAME}" "DisableSplashScreen" FindProcDLL::FindProc "PNotes.exe" ;if running, exit StrCmp $R0 "1" TheEnd IfFileExists Data\VirtualDriveSet.ini Continue createIni CreateIni: CopyFiles App\DefaultData\VirtualDriveSet.ini Data\VirtualDriveSet.ini Continue: StrCmp $DISABLESPLASHSCREEN "true" SkipSplash ;=== Show the splash screen before processing the files InitPluginsDir File /oname=$PLUGINSDIR\splash.jpg "${NAME}.jpg" newadvsplash::show /NOUNLOAD 1000 200 0 -1 /L $PLUGINSDIR\splash.jpg SkipSplash: Exec `App\VirtualDriveSet\VirtualDriveSet.exe` TheEnd: newadvsplash::wait SectionEndPlease search before posting. ~Thanks
yessssss
i like the autoit version. thx a lot. new version is finished.
also if the ini does not
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 and no
yes would be nice for novices but no the tool got already more features as planned.
not as a system for novices,
not as a system for novices, but because sometimes the X: 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
If Not FileExists("Data\VirtualDriveSet.ini") Then IniWrite ("Data\VirtualDriveSet.ini", "VirtualDriveSet", "Driveletter", "X:") EndIf $var = IniRead("Data\VirtualDriveSet.ini", "VirtualDriveSet", "Driveletter", "B:") if FileExists ($var&"\") Then Run ("subst.exe /d "& $var) Else $var = "subst.exe "&$var&" \" Run($var) EndIfPlease search before posting. ~Thanks
...
do you have any messenger ? icq ? skype ? msn ? please send me a alias via the contact form on my page.
done
received mail ?
yup
thanx
Please search before posting. ~Thanks
Great!
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 X: 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
2.2 available
see above
Thx for saving me time
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
Does it work with Vista
After writing the in ini each time I open the program nothing seems to happen, does this program work with Vista?
Vista & W7
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.