How to use Shell.Application to eject a USB device on Windows XP? - vb6

I'm new to coding and I have never used Visual Basic before.
I was asked to write a script that ejects the USB drive.
Public sub cmdClose_Click()
'CreateObject("Shell.Application").NameSpace("E:").Self.InvokeVerb "Eject"
End Sub
The above script that I found works on Windows 7 but not on XP.
If someone could give me an example of how to eject on Windows XP, that would be great.

Related

windows 10 microphone monitoring

I am trying to build an application for windows 10 to inform me when a process starts using my microfone. I tried to inspect opened files (handlers) with ProcessExplorer but it doesn't give me any specific information about which handler corresponds to my default sound input. What I am trying to do is almost what windows 10 already does when it puts a mic icon on system tray whenever a process open my microfone. I am hoping someone who have some knowledge on how windows sub systems works could shed some light into this. Thanks.

Launching WinRT app from PowerShell

I have a Windows RT app that I need to launch with a script. I've already installed the app on the device with PowerShell, but I need to launch the app with PowerShell or the command prompt. Is there a way to do this? Thanks.
P.S. It looks like there's a way to launch Metro apps on Windows 8 with the Start-MetroApp command, but this doesn't work on Windows RT. Is there some sort of equivalent for Windows RT?
You can use protocol activation, if you want to make your app such that any one can open it from either explorer, run, powershell or cmd
Here's MSDN sample of protocol activation.
Here's the way to launch the app.
For run and explorer : myapp://
For cmd and power shell : explorer.exe myapp://
Moreover, read this awesome blog post, Inter-Process communication (Windows Store App & Desktop Apps) with protocol association in WinRT
I would look at the technique mentioned in Launch Windows 8 Metro Apps From a Desktop Shortcut or Command Line, e.g.:
explorer.exe bingnews://
It also mentions a MetroLauncher utility that will work for apps without a protocol.

Auto Open USB Drive on Mac 10.6/7/8/Windows XP/Vista/7

I'm creating a FAT32 formatted USB Stick/Drive to ship a product. We'd like it to behave a bit more like the hybrid CD/DVD's that we create:
Insert the disk on Mac 10.6 or later and the drive opens up and shows you a window with the application in it. We can do it from a DMG or CD but the USB drive doesn't seem to want to honor the bless command.
On Windows, we've set up an autorun.inf. On XP it's not showing the icon, label, or opening the specified file. I know that you can't have Windows Vista and Windows 7 automatically open something or add an entry to the AutoPlay list by default, but it still should show the Volume Label and icon.
Here is my autorun.inf:
[AutoRun]
Action="Install My Cool App"
Open="InstallThis.exe"
icon="Ultimate.ico"
[Content]
MusicFiles=false
PictureFiles=false
VideoFiles=false
Are these things too much to ask for a USB stick? Anyone else out there shipping things on a USB flash drive and have overcome these issues?
As of Windows 7, AutoRun feature is not supported on USB drives. Only the following commands are supported:
label
icon
See Improvements to AutoPlay on Engineering Windows 7 blog.
Examples in Autorun.inf Entries do not use quotes for values. Does it work without the quotes?
MacOS might have implemented a similar approach to Windows 7: do not autorun anything from a flash drive automatically to protect you from malware.

Autolaunch exe on USB in windows XP SP3

I want to autolaunch my application on USB as soon as I plug it into a PC running on windows XP SP3. I have made an autorun.inf (having below written code) and also tried to lauch setup using a batch file(autorun.bat) but none of these seem to be working.
I have also read that a particular windows update (KB971029) disables the autorun/autoplay feature of USB. How can I overcome it? (I can't ask my client to uninstall a windows security update for using my product..)
Code Of autorun.inf file
[autorun]
UseAutoPlay=1
icon=setup.exe
Open=setup.exe
action="Start my application"
Label=setup
[Autoplay]
shellexecute=autorun.bat
Icon=setup.exe
My product contains some media (video) files too so on inserting the USB I get a pop up asking following options
1.) to open files in explorer
2.) play files using media player
3.) take no action
If autorun is disabled, you cannot use autorun. It's that simple.

How can I customize the login screen for Windows Vista & 7?

I need to create a windows login UI for Windows 7 & Vista which logs user name and image from webcam (replacing their login screen). I don't know where to start from. Can I do this in C# or will I have to use C++? Any link will be helpful.
If you just need Windows 7 and Windows Vista support, you are looking for Credential Provider. You can find some samples in Windows SDK.
If you want to extend pre-Vista Windows, you are looking for GINA

Resources