Add ProgMan groups and items from Batch files

Microsoft Windows v.3.11 for workgroups...
July 5, 2010 at 03:31:14
Specs: Windows 3.1, 286
HI,

Do you know any way/tool to add Program Manager groups and items from within a Batch file ?

I made an Install.bat and I would like to automatically add a shortcut in Program Manager for my application.
But how can I create a new icon group or a new Item in ProgMan?

Any idea?

thanks!


See More: Add ProgMan groups and items from Batch files

Report •

#1
July 5, 2010 at 07:45:03
You could use macro recorder to make a dummy and then look at the code.

Report •

#2
July 10, 2010 at 02:07:42
I prefer to add items only within batch files.
So, no one know any tool for this purpose? :(

Report •

#3
July 11, 2010 at 09:25:04
do you only need to add an already created group
or do you need one created and then added?

if you need a group created do you want to
do it using dde and progman
or are you trying for a dos app?

what sort of batch file?

dos only?
dos prompt under windows?
windows only?

wat say?


Report •

Related Solutions

#4
July 15, 2010 at 14:26:39
My batch copy an application from A: to C:\Programs, it also copies the necessary DLLs in C:\windows\system. After doing this would be nice if, through a DOS tool, the batch creates a link in 'Program manager'. For example I would create the group 'Audio applications' and then create a new item (in this group) called 'MyApplication' that point to the file C:\Programs\MyApp\Myapp.exe.
The batch typically runs from the command prompt under Windows 3.11 WFW. No matter if the tool I need requires Windows 3.11 or run directly in pure DOS. The important thing is that there is one that makes it possible =)

Btw, I do not know what DDE is.
I just would like a tool, for example with this syntax.

TOOL.EXE newgroup "Audio applications"
TOOL.EXE newitem "My application" "C:\Programs\MyApp\MyApp.exe" in "Audio applications"

thanks


Report •

#5
July 15, 2010 at 15:41:47
though a program could be made
as far as I know
there are no dos command line tools to do this

progman.exe is the file that usually does all creating and editing of group files
other windows programs make calls to progman using dde (http://en.wikipedia.org/wiki/Dynamic_Data_Exchange)

there is a program that allows you to execute windows programs from a windows dos prompt and so from a dos batch file

of course windows has to be running for method to work
http://win31.no-ip.org/freeware/

asuming the directorys are the same all the time
you might create a group file that your installer moves
to the windows directory

some advanced installers add a program to the window system files
so that it runs once windows starts installs groups then uninstalls its self

if I'm not mistaken
the windows 3.1 group file format is open
so a dos program might be created to work with them

you might need some logic for this one
wat say?


Report •

#6
July 16, 2010 at 01:23:05
I had already realized I have to create a group file (mygroup.grp) and copy it to %windir%. But, I repeat, my problem is that I need some sort of tool to create this GRP file and put-in an item of my program.

You've linked a site (http://win31.no-ip.org/freeware/), you could tell me the name of the tool I might need?

if you have any ideas on *how to practice* I can do this GRP-file, please let me know!

thanks


Report •

#7
July 16, 2010 at 05:50:22
asuming all directorys are standard
create the *.grp file using progman
then copy it to the install disk

have your batch file copy the file to
the windows dir and add the .grp
to progman.ini

the url was for this program
http://win31.no-ip.org/freeware/win...



Report •

#8
July 16, 2010 at 09:26:43
made a windows 3.1 group tool

http://win31.no-ip.org/freeware/pro...

three parameters
makegrp.exe newgroup fileurl appname


wat say?


Report •

#9
July 17, 2010 at 07:07:10
thanks for your help, watler!
however your tool does NOT work under WFW 3.11 !
It's ok under Win98 (a new folder and .LNK will be created under "C:\Windows\Start Menu\Programs"), but under WFW 3.11 it fails without any output or any .grp-file.

I copied START.COM and WINDOS.EXE to C:\DOS.
Added WinDOS to Program Manager, I started WinDOS in order to use START.COM, then:
I started Makegrp with:
START makegrp mygroup c:\windows\notepad.exe Notepad

any idea?
very thanks!


Report •

#10
July 17, 2010 at 08:52:34
makegrp works under 3.11

looks like windos was flawed

congratulations
you are the first person to debug the program

I made a program to replace it
http://win31.no-ip.org/freeware/pro...

try windos2.exe

wat say?


Report •

#11
July 18, 2010 at 14:08:08
Sorry, but it still does not work!
in the archive "http://win31.no-ip.org/freeware/progman/windos2.zip" I found windos.exe, I have not found windos2.exe !!

also I have three questions to you:
(1) Can I use UPX to compress makegrp? it seems big enough for what he does.
(2) could you add a parameter to prevent windows 98 create folders/links instead of a GRP file? Can be possible to force Windows 98 to DO NOT convert GRP into links?
(3) Can you compile makegrp so that it does not need Windos/start?


Report •

#12
July 19, 2010 at 06:20:29
windos2.exe was in a subfolder of windos2.zip
moved it to the main folder reuploaded it
http://win31.no-ip.org/freeware/pro...

upx?
compress it any way you like
I could make it a little smaller

this method only tells progman to make the groups

makegrp does not need windos or start to run
it just has to be run from windows
with 3 paramaters
it simply tells progman.exe what to do

I havent tested 98 yet...
dont know of any paramater to prevent 98

drive a: 1.4mb?
what are your size limits?


I did not make the original windos or start
if you make a windows batch file you wont
need dos and so wont need windos/start

a batch language such as this might work
http://win31.no-ip.org/freeware/bat...

I've made many programs but never
an installer
I'll do some testing

I'll try a test batch file

wat say


Report •

#13
July 19, 2010 at 06:56:16
windows can be run with paramaters

you might do this
cd c:\windows
win a:\makegrp.exe groupname a:\program.exe nospaces

or you might do this
cd c:\windows
win a:\batsh.exe a:\mybatch.bsh

or you might do this
a:
cd a:\svstp
win svstp.exe test.tfs

I could change makegrp.exe so it reads from a text file
win makegrp.exe allicons.txt
though of course this would not help win98 any...

I might be able to detect if win95+ is running
and make makegrp.exe do somthing else for it

http://tech.groups.yahoo.com/group/...

wat say


Report •

#14
August 15, 2010 at 10:43:39
> "win a:\makegrp.exe groupname a:\program.exe nospaces"
only works if Windows 3.1x is not yet started. So this method can not serve me since my batch runs within Windows 3.1x.

When I was wondering if you could make MakeGRP working without WinDos2.exe/Start.exe I mean if it would work under MS-DOS Prompt under Windows 3.1 without having already launched WinDos2.exe. I want my batch-file works by simply double-click on Install.bat, without requiring the user other operations, ... even from within the batch! because I do not know how to check if the user has already started WinDos2.exe (eventually showing an error message).

Microsoft Word (Included in Microsoft Office 4.3) can be run from Windows or directly from MS-DOS (WinWord.exe detect MS-DOS and will run Win.com).
Can you add this feature to MakeGRP? It should check if it was launched from DOS and possibly performs operations using the Windows API. So all I have to do is start it just with:
"makegrp mygroup c:\windows\notepad.exe Notepad"
without any requirements.

Anyway thanks again


Report •

Ask Question