forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Safely remove USB Pen

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Mon Aug 23, 2010 1:20 am    Post subject: Safely remove USB Pen Reply with quote

Hi guyz,

it's possible safely remove an usb pen in Vds's script?

Byez
Back to top
View user's profile Send private message Send e-mail
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Mon Aug 23, 2010 11:09 pm    Post subject: Reply with quote

I use the freeware utility called USB Disk Ejector http://quick.mixnmojo.com/ and I have used NIRCmd.exe (you'll have to google it, I don't remember the website). I haven't been able to find a way to safely eject a usb drive using just VDS.
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Tue Aug 24, 2010 9:10 pm    Post subject: Reply with quote

Hi LiquidCode Smile
thankyou for your notice, but I know these softwares and sometimes use, maybe I didn't explained well what I need, sorry, I need a vdsscript to safely remove usb pen.
it's possible create this Vds script and how?

thanks again Smile

Cheers
Back to top
View user's profile Send private message Send e-mail
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Tue Aug 24, 2010 10:01 pm    Post subject: Reply with quote

Try the insert/eject any removeable drive by Codescript.

http://www.vdsworld.com/search.php?keywords=eject&match_type=%200&sid=dc397b51510070ad279a7a3aec237828

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Tue Aug 24, 2010 10:07 pm    Post subject: Reply with quote

Smile Thanks LiquidCode for your info
I will try it

Many thanks Smile
Back to top
View user's profile Send private message Send e-mail
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Wed Aug 25, 2010 10:46 am    Post subject: Reply with quote

HI LiquidCode,

Maybe dll work, I must only resolve the closing of all task active on usb pen

Thank's again
Back to top
View user's profile Send private message Send e-mail
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Fri Aug 27, 2010 12:10 am    Post subject: Reply with quote

Tdk161, If you understand API the GadgetX.dll can do it.
Back to top
View user's profile Send private message Send e-mail
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Sun Aug 29, 2010 1:20 pm    Post subject: Reply with quote

Aslan,
Unfortunatly I don't understand so much API Embarassed Embarassed
Byez and tnx Wink
Back to top
View user's profile Send private message Send e-mail
scotspgc
Newbie


Joined: 13 Dec 2006
Posts: 4

PostPosted: Tue Aug 31, 2010 3:38 am    Post subject: Reply with quote

You can use the windows rundll32.exe option also.

"RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll"

I use that command for windows XP and Windows 7.

Sorry, I think I misunderstood. Are you trying to eject the device automatically?
Back to top
View user's profile Send private message
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Tue Aug 31, 2010 2:38 pm    Post subject: Reply with quote

Hi scotspgc Smile

I already know tjis, and usually use it in my script, I would like when application on usb pen is cloding, show a message box asking to remove usb pen and automaticaly temove it without using external command/application.
But thank you for your help Smile

Byez
Back to top
View user's profile Send private message Send e-mail
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 169
Location: Spain

PostPosted: Tue Aug 31, 2010 4:18 pm    Post subject: Reply with quote

Hi Tdk161:

I've been looking for an application to eject a pendrive (free, of course) Wink ... and I think this one can be usefull:

http://dl.dropbox.com/u/921248/EjectUSB.zip


Good luck!
Back to top
View user's profile Send private message Visit poster's website
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Tue Aug 31, 2010 6:10 pm    Post subject: Reply with quote

Hi Uvedese Smile

I kmow this utility, and sometime I use, it is build with Autoit language, but as I said before I woul like use a routine write in Vds as an internal command in my vds script
Thank you nice info Wink

Byez
Back to top
View user's profile Send private message Send e-mail
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 169
Location: Spain

PostPosted: Wed Sep 01, 2010 3:24 pm    Post subject: Reply with quote

I'm sorry Tdk161 Embarassed

I'm looking for the source code (in Borland Delphi) in order to eject a USB drive.

This page is in Spanish but it has the source code of an application that does eject (for example) a Pendrive:

http://www.ajpdsoft.com/modules.php?name=News&file=article&sid=463

I hope it was usefull for you.

Bye Very Happy
Back to top
View user's profile Send private message Visit poster's website
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 169
Location: Spain

PostPosted: Wed Sep 01, 2010 3:53 pm    Post subject: Reply with quote

More information:

DLL: hotplug.dll

You can eject pendrive calling "HotPlugEjectDevice" function of hotplug.dll Windows library.

Code:
function HotPlugEjectDevice(hwndParent: Cardinal; lpDeviceInstanceId: PWideChar): LongBool; stdcall external 'hotplug';

WinExec CODE:
Code:
WinExec(PChar('c:\windows\system32\rundll32 hotplug.dll,HotplugEjectDevice '),SW_SHOWNORMAL);

This way, a window appears for safely remove an usb pen:
Code:
WinExec(PChar('c:\windows\system32\rundll32 shell32.dll,Control_RunDLL hotplug.dll'),SW_SHOWNORMAL);



I do not know if you clarify something Rolling Eyes and if it can adapt to VDS.

Good luck

Extracted and translated from:

http://delphimagic.blogspot.com/2009_06_01_archive.html
____________

uVeDeSe
____________
Back to top
View user's profile Send private message Visit poster's website
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Mon Sep 06, 2010 9:27 am    Post subject: Reply with quote

Hi Uvedese Smile

thank you , I'm trying your idea

Thank you very much Smile

Byez
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group