It is currently Mon May 20, 2013 9:19 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Autorun file does not execute the batch file
PostPosted: Sat Jun 30, 2012 10:44 am 
Offline

Joined: Sat Jun 30, 2012 5:23 am
Posts: 5
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


Top
 Profile  
 
 Post subject: Re: Autorun file does not execute the batch file
PostPosted: Sun Jul 01, 2012 5:13 pm 
Offline
User avatar

Joined: Wed Apr 11, 2007 8:06 pm
Posts: 3473
Location: US, Texas
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

_________________
Supporting the Electronic Frontier Foundation | DuckDuckGo user | My GPG key | Projects donated to: VLC, CubicExplorer, Ditto, Greenshot, TrueCrypt


Top
 Profile  
 
 Post subject: Re: Autorun file does not execute the batch file
PostPosted: Mon Jul 02, 2012 10:17 am 
Offline

Joined: Sat Jun 30, 2012 5:23 am
Posts: 5
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......


Top
 Profile  
 
 Post subject: Re: Autorun file does not execute the batch file
PostPosted: Mon Jul 02, 2012 11:45 am 
Offline
User avatar

Joined: Sat Feb 09, 2008 9:57 am
Posts: 1995
Location: Romania
Maybe you're using an AV, FW or Security Suite that blocks this?

_________________
The Venus Project - Imagine Our world with No Laws, No Crime, No Wars, No Prisons


Top
 Profile  
 
 Post subject: Re: Autorun file does not execute the batch file
PostPosted: Mon Jul 02, 2012 12:38 pm 
Offline

Joined: Sat Jun 30, 2012 5:23 am
Posts: 5
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.


Top
 Profile  
 
 Post subject: Re: Autorun file does not execute the batch file
PostPosted: Mon Jul 02, 2012 1:03 pm 
Offline
User avatar

Joined: Sat Feb 09, 2008 9:57 am
Posts: 1995
Location: Romania
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

_________________
The Venus Project - Imagine Our world with No Laws, No Crime, No Wars, No Prisons


Top
 Profile  
 
 Post subject: Re: Autorun file does not execute the batch file
PostPosted: Mon Jul 02, 2012 1:30 pm 
Offline

Joined: Sat Jun 30, 2012 5:23 am
Posts: 5
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...


Top
 Profile  
 
 Post subject: Re: Autorun file does not execute the batch file
PostPosted: Tue Jul 03, 2012 8:01 pm 
Offline
User avatar

Joined: Mon Aug 27, 2007 2:00 am
Posts: 3726
Perhaps it's best to google around a bit or contact a support forum that specialises in Norton.

_________________
Added 177 Applications: Portable and an AutoIt MVP
SoftwareSpot - Portable Apps


Top
 Profile  
 
 Post subject: Re: Autorun file does not execute the batch file
PostPosted: Sun Jul 08, 2012 8:53 am 
Offline

Joined: Sat Jun 30, 2012 5:23 am
Posts: 5
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.


Top
 Profile  
 
 Post subject: Re: Autorun file does not execute the batch file
PostPosted: Sun Jul 08, 2012 4:48 pm 
Offline
User avatar

Joined: Fri Jun 04, 2010 2:11 am
Posts: 283
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. :)

_________________
"My dear Mr Gyrth, I am never more serious than when I am joking."
~Albert Campion
------------------------------------------------------------------------
Website | Demo scripts | Blog | External contact


Top
 Profile  
 
 Post subject: Re: Autorun file does not execute the batch file
PostPosted: Sun Jul 08, 2012 5:03 pm 
Offline
User avatar

Joined: Fri Jun 04, 2010 2:11 am
Posts: 283
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.

_________________
"My dear Mr Gyrth, I am never more serious than when I am joking."
~Albert Campion
------------------------------------------------------------------------
Website | Demo scripts | Blog | External contact


Top
 Profile  
 
 Post subject: Re: Autorun file does not execute the batch file
PostPosted: Sat Jul 14, 2012 1:56 pm 
Offline
User avatar

Joined: Sat Jul 31, 2010 1:19 am
Posts: 807
Location: Helsinki, Finland
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:
[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 fourth playlist: April 11, 2013


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group