Page 1 of 1 1
Topic Options
#190110 - 2008-10-13 04:19 PM Script a COM port disable/enable reset
ahoover Offline
Just in Town

Registered: 2008-10-13
Posts: 2

Normal first post jargon:
I'm new, but like the forum, hopefully you can answer my questions, and thanks ahead of time to any that answer.

Problem: At work we use a program that likes to take hold of the local communications port, and doesn't like to share.

Current Solution:
In order then to use the COM port for another program/label printer etc. we have to first disable, and then enable the COM port.

What I'm looking for:
I have been trying to find a way to use a batch file to reset the COM port automatically without having to use devmgmt.msc every time I want to change programs.

Any help/advice would be appreciated. I just discovered KiXtart today and have liked what I've seen so far.



#190111 - 2008-10-13 07:11 PM Re: Script a COM port disable/enable reset [Re: ahoover]
Allen Administrator Offline
KiX Supporter

Registered: 2003-04-19
Posts: 4455
Loc: USA
See if Devcon will do what you want.;EN-US;Q311272

#190112 - 2008-10-13 08:03 PM Re: Script a COM port disable/enable reset [Re: ahoover]
Benny69 Offline

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
Hello ahoover and welcome to the board,

Another tool you could use is:

It will let you:
View a list of available COM ports on your computer
Disable and enable these COM ports

Operating System Requirements
COMDisable is supported on computers that are running the following operating systems:
Windows Server 2003
Microsoft Windows XP
Microsoft Windows 2000 Service Pack 3 (SP3) or later

COMDisable Syntax
COMDisable uses the following syntax:

comdisable /list
comdisable /disable COMPortNumber
comdisable /enable COMPortNumber
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

#190127 - 2008-10-15 01:38 PM Re: Script a COM port disable/enable reset [Re: Benny69]
ahoover Offline
Just in Town

Registered: 2008-10-13
Posts: 2
First, thanks to both of you.

Benny69, unfortunately that is a passive reset needed reboot. So that won't work for my scenario.

Allen, this worked for me. I'll add this to a batch script to run on startup, and add another on the desktop of the laptop to run on command.

Thnaks again, and hopefully at a later time I can jump into the logon KiXtart scripting world.


#211097 - 2016-02-12 11:12 AM Re: Script a COM port disable/enable reset [Re: ahoover]
AndersExt Offline
Just in Town

Registered: 2016-02-12
Posts: 1
Loc: Sweden
Hi Andy,
Could you please post the batch script that you uses? Can't make it work at all...

#211098 - 2016-02-12 12:08 PM Re: Script a COM port disable/enable reset [Re: AndersExt]
Mart Moderator Offline
KiX Supporter

Registered: 2002-03-27
Posts: 4642
Loc: The Netherlands
Hi Anders,

Andy made his last post in 2008 so I guess he is no longer an active user.

Can you share what you tried and the code you have up until now?

- Chuck Norris once sold ebay to ebay on ebay.

Page 1 of 1 1

Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 181 anonymous users online.
Newest Members
gkustra, emnipetro, Hirze, thequeen, ameliaryan
17642 Registered Users

Generated in 0.067 seconds in which 0.049 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google: