Autorun file does not execute the batch file

Ask other users about problems encountered with portable apps or help by posting solutions to existing problems.
Post Reply
Message
Author
manj
Posts: 5
Joined: Sat Jun 30, 2012 5:23 am

Autorun file does not execute the batch file

#1 Post by manj »

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

User avatar
webfork
Posts: 10821
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: Autorun file does not execute the batch file

#2 Post by webfork »

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

manj
Posts: 5
Joined: Sat Jun 30, 2012 5:23 am

Re: Autorun file does not execute the batch file

#3 Post by manj »

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......

User avatar
joby_toss
Posts: 2971
Joined: Sat Feb 09, 2008 9:57 am
Location: Romania
Contact:

Re: Autorun file does not execute the batch file

#4 Post by joby_toss »

Maybe you're using an AV, FW or Security Suite that blocks this?

manj
Posts: 5
Joined: Sat Jun 30, 2012 5:23 am

Re: Autorun file does not execute the batch file

#5 Post by manj »

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.

User avatar
joby_toss
Posts: 2971
Joined: Sat Feb 09, 2008 9:57 am
Location: Romania
Contact:

Re: Autorun file does not execute the batch file

#6 Post by joby_toss »

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.

Image

manj
Posts: 5
Joined: Sat Jun 30, 2012 5:23 am

Re: Autorun file does not execute the batch file

#7 Post by manj »

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. :cry:

Don't know what to do...

User avatar
guinness
Posts: 4118
Joined: Mon Aug 27, 2007 2:00 am
Contact:

Re: Autorun file does not execute the batch file

#8 Post by guinness »

Perhaps it's best to google around a bit or contact a support forum that specialises in Norton.

manj
Posts: 5
Joined: Sat Jun 30, 2012 5:23 am

Re: Autorun file does not execute the batch file

#9 Post by manj »

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.

User avatar
dmg
Posts: 325
Joined: Fri Jun 04, 2010 2:11 am
Contact:

Re: Autorun file does not execute the batch file

#10 Post by dmg »

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. :)

User avatar
dmg
Posts: 325
Joined: Fri Jun 04, 2010 2:11 am
Contact:

Re: Autorun file does not execute the batch file

#11 Post by dmg »

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.

User avatar
SYSTEM
Posts: 2043
Joined: Sat Jul 31, 2010 1:19 am
Location: Helsinki, Finland

Re: Autorun file does not execute the batch file

#12 Post by SYSTEM »

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.

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

Post Reply