Autorun file does not execute the batch file
Autorun file does not execute the batch file
Hello,
I am using portable apps on a USB. I have installed portable start menu (psmenu) for these apps.
I want to run psmenu when ever I connect this USB to a computer. For this I created a batch file (PSMenu.cmd) to run psmenu application. I then created autorun.inf file to execute the psmenu batch file. I put both the batch file and autorun file at the root of USB drive. I have the following code in the autorun file.
[autorun]
OPEN=PSMenu.cmd
ICON=.\PSMenu\psmenu.exe
LABEL=My Name
When I insert the USB, the autorun file does label the drive as My Name and also displays the icon, But it does not execute the psmenu batch file.
To verify if the batch file is working, I double click it and it opened the PSMenu application.
Any help will be greatly appreciated.
Thanks
I am using portable apps on a USB. I have installed portable start menu (psmenu) for these apps.
I want to run psmenu when ever I connect this USB to a computer. For this I created a batch file (PSMenu.cmd) to run psmenu application. I then created autorun.inf file to execute the psmenu batch file. I put both the batch file and autorun file at the root of USB drive. I have the following code in the autorun file.
[autorun]
OPEN=PSMenu.cmd
ICON=.\PSMenu\psmenu.exe
LABEL=My Name
When I insert the USB, the autorun file does label the drive as My Name and also displays the icon, But it does not execute the psmenu batch file.
To verify if the batch file is working, I double click it and it opened the PSMenu application.
Any help will be greatly appreciated.
Thanks
Re: Autorun file does not execute the batch file
What OS are you using? If its XP, have you checked that AutoRun isn't disabled? This can be done with XP-AntiSpy:
http://www.portablefreeware.com/index.php?id=659
http://www.portablefreeware.com/index.php?id=659
Re: Autorun file does not execute the batch file
Hello Webfork,
Thanks for your quick response.
Yes, I am using Windows XP Home edition, SP3.
I checked Autorun setting as per your instructions. The autorun is enabled.
Just to double check, I disabled and then enabled autorun, but nothing changed.
Note: I restarted my machine both after disabling and re-enabling autorun as required by XP-Antispy.
Any other suggestions?
Thanks......
Thanks for your quick response.
Yes, I am using Windows XP Home edition, SP3.
I checked Autorun setting as per your instructions. The autorun is enabled.
Just to double check, I disabled and then enabled autorun, but nothing changed.
Note: I restarted my machine both after disabling and re-enabling autorun as required by XP-Antispy.
Any other suggestions?
Thanks......
Re: Autorun file does not execute the batch file
Maybe you're using an AV, FW or Security Suite that blocks this?
Re: Autorun file does not execute the batch file
Hi joby_toss,
Yes, I have NIS 2012 at home.
How would I know if Norton is blocking the autorun file and is there a way to stop Norton from doing so.
Thanks for your reply.
Yes, I have NIS 2012 at home.
How would I know if Norton is blocking the autorun file and is there a way to stop Norton from doing so.
Thanks for your reply.
Re: Autorun file does not execute the batch file
Sorry, I have no idea, I don't use Norton... But I believe all these apps can be disabled in some way.
I use Comodo and all I have to do is right click the tray icon and choose "disable" for the service I want disabled.
I use Comodo and all I have to do is right click the tray icon and choose "disable" for the service I want disabled.
Re: Autorun file does not execute the batch file
I disabled auto protect and smart firewall in Norton.
Then I inserted the USB. But disabling auto protect and firewall did not help at all.
Don't know what to do...
Then I inserted the USB. But disabling auto protect and firewall did not help at all.
Don't know what to do...
Re: Autorun file does not execute the batch file
Perhaps it's best to google around a bit or contact a support forum that specialises in Norton.
Re: Autorun file does not execute the batch file
Hi,
Thanks to all who tried to help me to resolve my issue.
I disabled Norton on my system and then plugged in the USB, but still the autorun did not execute the required file.
I even tried it on a system which has no anti virus or firewall installed. but did not have any luck. The autorun does not execute the file. So it does not seem like an issue caused by Norton.
I have tried google so many times, but I did not find answer to my question. That's when I came to this forum and posted my question.
Any help is greatly appreciated.
Thanks.
Thanks to all who tried to help me to resolve my issue.
I disabled Norton on my system and then plugged in the USB, but still the autorun did not execute the required file.
I even tried it on a system which has no anti virus or firewall installed. but did not have any luck. The autorun does not execute the file. So it does not seem like an issue caused by Norton.
I have tried google so many times, but I did not find answer to my question. That's when I came to this forum and posted my question.
Any help is greatly appreciated.
Thanks.
Re: Autorun file does not execute the batch file
First, I can't get any autorun.inf to work from a flash drive on my Win XP machine either. I cannot immediately explain this, though I speculate that Microsoft may have turned off that function as a security measure in a some recent update.
Second, as far as I know a autorun.inf file can ONLY run executable files, nothing else. There are a couple of ways around this. You can create a compiled script in AutoHotkey or AutoIT to replace your .cmd file, or you could try using shellexecute instead of open.
I may have no idea what I am talking about, but I thought these worth mentioning.
Second, as far as I know a autorun.inf file can ONLY run executable files, nothing else. There are a couple of ways around this. You can create a compiled script in AutoHotkey or AutoIT to replace your .cmd file, or you could try using shellexecute instead of open.
I may have no idea what I am talking about, but I thought these worth mentioning.
Re: Autorun file does not execute the batch file
I still can't get anything to automatically run on drive insertion, but the instructions near the top of this page let me add a custom item to the menu that pops up when I insert the drive:
http://www.visualdesigning.com/autorun-usb/#basic
Note: I know ABSOLUTELY NOTHING about the software this page is pushing, but the information was helpful.
http://www.visualdesigning.com/autorun-usb/#basic
Note: I know ABSOLUTELY NOTHING about the software this page is pushing, but the information was helpful.
Re: Autorun file does not execute the batch file
Microsoft has disabled Autorun with a security update on February 2011.
http://support.microsoft.com/kb/971029
I use USBDLM to get autorun working on my computer. USBDLM is a powerful tool and probably overkill if you only want autorun. Its autorun settings are documented here: http://www.uwe-sieber.de/usbdlm_help_e.html#autorun
BTW, here is my complete USBDLM configuration. It might be of interest to someone.
http://support.microsoft.com/kb/971029
I use USBDLM to get autorun working on my computer. USBDLM is a powerful tool and probably overkill if you only want autorun. Its autorun settings are documented here: http://www.uwe-sieber.de/usbdlm_help_e.html#autorun
BTW, here is my complete USBDLM configuration. It might be of interest to someone.
Code: Select all
[Settings]
AutoRunOnLogon=1
AutoRunOnStartup=0
AutoRunInf=7
AutorunInfRestricted=1
[OnDeviceArrival10]
DeviceID1=USB\VID_04E8&PID_1F06\00000011E0BB3
open="C:\Program Files\Ext2Fsd\Ext2Mgr.exe"
elevated=1
[BalloonTips]
Enabled=1
[OnBalloonClick1]
open=%windir%\explorer %root%
My YouTube channel | Release date of my 13th playlist: August 24, 2020