Softvoile support forum

It is currently Wed May 22, 2013 5:35 am

All times are UTC




Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: How to make Clipdiary portable
PostPosted: Sat May 13, 2006 11:05 am 
I asked the question in this forum if the excellent Clipdiary could look for the config.cfg and diary.sql in the same folder as clipdiary.exe, there for making it portable or easily run from a USB or network drive without installing it ... The answer was yes, in the next version, but if you want to do it with the current version then create a batch file in the Clipdiary folder and paste the code below into it. Then just run the code, simple as that! I've not run into any problems running it from different drives, USB drives, etc, the only given is you need 32 bit Windows (2000, XP, etc) for the cd line in the batch file, a C: drive which I would have thought is pretty much all PC's and that's about it.

Code:
rem Set the User profile location to the root of C:
set USERPROFILE=C:\
rem Change the directory to location of the batch file
rem The batch file should be in the same folder as the exe
cd /d %~dp0
rem Run Clipdiary
start clipdiary.exe


Just for completeness sake, below is the contents of my config.cfg. The only thing to note is there is no entry for the location of diary.sql. It seems if that's not listed then it does the perfect thing and looks in the clipdiary.exe folder.
Code:
[Main]
HideWindowAfter=1
SelDlgX=210
SelDlgY=70
OptionsIndex=3
HotKeyVK=0
HotKey=0
HotKeyPrevVK=0
HotKeyPrev=0
HotKeyNextVK=0
HotKeyNext=0
CaptureImage=0


Thanks again for an excellent program, even better as its freeware. If anyone gets any problems then please post them here as I've obviously not tested this in every possible scenario.


Top
  
Reply with quote  
 Post subject:
PostPosted: Mon May 15, 2006 9:21 am 
Offline
Site Admin

Joined: Tue Feb 17, 2004 12:49 am
Posts: 587
hello Pembroke

Best Idea! Congratulation!
But I'll add command line parameters support in any case :)

One comment, the good style is using setlocal and endlocal in the bat-file.
Code:
setlocal
rem Set the User profile location to the root of C:
set USERPROFILE=C:\
rem Change the directory to location of the batch file
rem The batch file should be in the same folder as the exe
cd /d %~dp0
rem Run Clipdiary
start clipdiary.exe
endlocal

_________________
Best regards, Tiushkov Nikolay


Top
 Profile  
Reply with quote  
 Post subject: How to make Clipdiary portable
PostPosted: Tue May 16, 2006 1:21 pm 
Thanks for the update and hope the small bit of batch code helps someone else as well! Thanks also for the tip, I'd never heard of setlocal/endlocal before, very useful!


Top
  
Reply with quote  
 Post subject:
PostPosted: Wed Jul 25, 2007 4:56 pm 
Offline

Joined: Tue Jul 24, 2007 9:47 pm
Posts: 2
thank you, so far this is working flawlessly for flashpaste, too!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Oct 02, 2007 2:13 pm 
but "Path to Backup folder" doesn't change..


Top
  
Reply with quote  
 Post subject:
PostPosted: Tue Oct 02, 2007 2:34 pm 
Offline
Site Admin

Joined: Tue Feb 17, 2004 12:49 am
Posts: 587
laburj wrote:
but "Path to Backup folder" doesn't change..

Only if it set by default. This path stored in flashpaste.cfg

[Main]
BackupPath=E:\Private\Flashpaste_Backup\

So if you create this string in your flashpaste.cfg located in this folder, it should work. Create it manually or run Flashpaste as mentioned above and specify new path in options, or disable backup feature :)

But there is better way - read about command line parameters for Flashpaste :)

_________________
Best regards, Tiushkov Nikolay


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Jan 18, 2008 1:39 pm 
Just for completeness sake, after trying the procedure here on FlashNote (see http://softvoile.com/forum/about653.html), I decided to put a similar step by step guide here. 8)

1. Install clipdiary normally and run once;

2. Close by selecting File|Exit from menu (don't do escape or click window upper right x button, program will only minimize);

3. Find clipdiary install folder and copy it elsewhere (to USB drive, for example, if that's where you intend to run it);

4. Find clipdiary database and config files in %Documents and Settings%\%User%\Application Data\clipdiary folder (look for it or search for 'clipdiary.cfg' file if you can't find it) and copy all files to the folder created in step 3;

5. Edit 'clipdiary.cfg' with any text editor -- notepad will do fine -- and in the [Main] section, add 'DBPath' to the [Main] section and fill the name of your clipdiary database (usually 'diary.sql', so you get a line like 'DBPath=diary.sql' without quotes);

6. Still in the folder created in step 3, make a new text file, name it clipdiary.bat and paste the following code into it.

Code:
@echo Launching ClipDiary...
@echo off

rem Make local environment for variables;

setlocal

rem Set the User Profile location to the root of current drive;

set USERPROFILE=\

rem Change the current directory to the location of the batch file;
rem Remember: Batch (.bat) file should reside in same folder as exe;

cd /d %~dp0

rem Run ClipDiary;

start ClipDiary.exe

rem Exit local environment;

endlocal


... And you're all set.

@Softvoile: like the other one, maybe you could make this thread a sticky... :?:


Top
  
Reply with quote  
 Post subject:
PostPosted: Fri Jan 18, 2008 2:00 pm 
Offline
Site Admin

Joined: Tue Feb 17, 2004 12:49 am
Posts: 587
Thanks!
I have deleted one item from your post (Clipdiary does not use BackupPath) and made this topic sticky

_________________
Best regards, Tiushkov Nikolay


Top
 Profile  
Reply with quote  
 Post subject: How to hide the console window
PostPosted: Wed May 21, 2008 10:05 am 
If you have issues with the console window being kept open when you run the clipdiary.bat batch file, have a look at Hidden Start by ntwind Software... (I use it for launching from the Windows start menu).

http://www.ntwind.com/software/utilities/hstart.html


Top
  
Reply with quote  
 Post subject: Re:
PostPosted: Sat Nov 08, 2008 9:59 am 
Is there a way of doing the same in the new version??
Guest wrote:
Just for completeness sake, after trying the procedure here on FlashNote (see about653.html), I decided to put a similar step by step guide here. 8)

1. Install clipdiary normally and run once;

2. Close by selecting File|Exit from menu (don't do escape or click window upper right x button, program will only minimize);

3. Find clipdiary install folder and copy it elsewhere (to USB drive, for example, if that's where you intend to run it);

4. Find clipdiary database and config files in %Documents and Settings%\%User%\Application Data\clipdiary folder (look for it or search for 'clipdiary.cfg' file if you can't find it) and copy all files to the folder created in step 3;

5. Edit 'clipdiary.cfg' with any text editor -- notepad will do fine -- and in the [Main] section, add 'DBPath' to the [Main] section and fill the name of your clipdiary database (usually 'diary.sql', so you get a line like 'DBPath=diary.sql' without quotes);

6. Still in the folder created in step 3, make a new text file, name it clipdiary.bat and paste the following code into it.

Code:
@echo Launching ClipDiary...
@echo off

rem Make local environment for variables;

setlocal

rem Set the User Profile location to the root of current drive;

set USERPROFILE=\

rem Change the current directory to the location of the batch file;
rem Remember: Batch (.bat) file should reside in same folder as exe;

cd /d %~dp0

rem Run ClipDiary;

start ClipDiary.exe

rem Exit local environment;

endlocal


... And you're all set.

@Softvoile: like the other one, maybe you could make this thread a sticky... :?:


Top
  
Reply with quote  
 Post subject: Re: How to make Clipdiary portable
PostPosted: Sun Nov 09, 2008 9:08 am 
Offline
Site Admin

Joined: Tue Feb 17, 2004 12:49 am
Posts: 587
Doesn't this way work for you with new version?

Native support of portable mode will be added in 2.0 or 2.1 version.

_________________
Best regards, Tiushkov Nikolay


Top
 Profile  
Reply with quote  
 Post subject: Re: How to make Clipdiary portable
PostPosted: Mon Nov 10, 2008 3:31 pm 
No, only in version 1.6. I`m getteing massage "couldn`t open the file diary.db".
In the massage I think the adresse to the file have a s strange foldre setting "f:/clipdiary/clipdiary.exe/clipdiary/diary.db"
Best regards Frodo


Top
  
Reply with quote  
 Post subject: Re: How to make Clipdiary portable
PostPosted: Mon Nov 10, 2008 3:46 pm 
Flashnote have an own portable bat file included and it works great. Is it possible to do the same in CD 1,95?
Frode


Top
  
Reply with quote  
 Post subject: Re: How to make Clipdiary portable
PostPosted: Mon Nov 10, 2008 4:39 pm 
Offline
Site Admin

Joined: Tue Feb 17, 2004 12:49 am
Posts: 587
Quote:
Flashnote have an own portable bat file included and it works great. Is it possible to do the same in CD 1,95?


No. It will be added in 2.0 or 2.1.

_________________
Best regards, Tiushkov Nikolay


Top
 Profile  
Reply with quote  
 Post subject: Re: How to make Clipdiary portable
PostPosted: Tue Nov 11, 2008 5:06 pm 
softvoile wrote:
Quote:
Flashnote have an own portable bat file included and it works great. Is it possible to do the same in CD 1,95?


No. It will be added in 2.0 or 2.1.


Do you know the date of realize?


Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group