Jump to content

CMenu


MHz

Recommended Posts

the 2 download links are down

the rapidshare may still ok but I'm having a little problem:

This IP XXXXXXXXXXX is not allowed to use the free-service anymore today. We detected very extreme downloads. Don't worry! This has not to be your fault.

Maybe you use a proxy-server. Premium-users are not affected by this ban. Maybe you might want to get a PREMIUM-Account, too.

It is just a one-time fee and you will have access instantly. Please see our big FAQ, if you still have questions.

so any upload to have fun in the next weekend?! :P

Link to comment
Share on other sites


2MHz: Few questions:

1.) Would you mind to rip Identify Installer out from CMenu?

2.) What about creating database of known switches for setups, that dont support common installation?

@Martin

Interesting requests.

Could you supply a reason for asking for Identify Installer's removal. This request does seem unusual, to what I would expect. Perhaps you may wish to pm your concerns?

The database idea seems interesting, but I would consider too much information to process. My spare time would be used up in adding entries into a database for all the programs that exist.

@Wesmosis

Sorry for the disappointment. A better download link, will be setup.

Link to comment
Share on other sites

Again thank you for such a very useful tool.

I do have one request and it may seem a bit stupid.

Is there anyway you can make it so that you can have the choice to write a simple autoit script such as:

Runwait("setup.exe /silentmode")

Reason I ask, is because I normally write my own AutoIt scripts for silent installs and I usually have something like this:

SplashTextOn('', "Installing NOD32 v2.50.25", 400, 25, -1, -1, 1, '', 14)

adorning the top of it.

To take the concept a step further, the ability to create our own autoit templates would be great (i.e., it would add that SplashTextOn to each of my scripts I generate) Just a couple ideas...

I love the app and if I am at all out of line, then my sincerest apologies.

-redfive

Link to comment
Share on other sites

Sure, you can customize the templates. You are not out of line, as I assumed that users would like to customize the templates, from the very beginning.

This is how CMenu 1.6 does this.

It installs the template files into Program Files\CMenu\Templates. The text files are read by Identify Installer and the au3 files are read, when you create an AutoIt script.

If example Inno Setup is identified, and you want to create a script, then the Inno_Setup.au3 will be read. A file called Common_Functions.au3 will also be read, for any installer. The data will be checked for the strings, Program_name and filename.ext, and will be replaced by, for example NOD32 v2.50.25 and NOD32 v2.50.25.exe. If a recording was made of the installation, then the recorded files could be read. The variables at the top of the script may have the information added to them. The script is then created in the installers directory. That is the script making process.

Now, as Identify Installer reads these files, then if you make change to the files, in the templates folder, the output would be what you have changed them to. If you want no common functions for the scripts, then clear the code from the Common_Functions.au3, so when it is read, nothing is returned. Now you may want to customize the Inno Setup output, so you would open the Inno_Setup.au3, in your editor. Do note the strings mentioned previously, that will help to fill some information in automagically.

A sample of what you may want in the template:

; Script for Program_name

SplashTextOn('', "Program_name", 400, 25, -1, -1, 1, '', 14)

Runwait("filename.ext /silentmode")

SplashOff()

This is your custom template for Inno Setup. When it would be read by Identify Installer, and the known strings are replaced, then the output script would look like:

; Script for NOD32 v2.50.25

SplashTextOn('', "NOD32 v2.50.25", 400, 25, -1, -1, 1, '', 14)

Runwait("NOD32 v2.50.25.exe /silentmode")

SplashOff()

Now, quick and easily, the output script is created to suit your needs.

When customizing, you may want to backup the original templates, in case you want use some information from them? You should definately backup your customized templates, to prevent tragic loss.

End of lessen :)

If you are like me, and get tired of all the extra comments that display the workings in the script alot, then you may use this script.

If MsgBox(4, 'Comment remover', 'Remove comments, are you sure?') = 7 Then Exit
$read_handle = FileOpen($cmdline[1], 0)
$write_handle = FileOpen($cmdline[1] & '.temp', 2)
If $cmdline[0] = 1 Then
   _SafeRemoval()
ElseIf $cmdline[0] = 2 Then
   _FullRemoval()
EndIf
FileClose($read_handle)
FileClose($write_handle)
Sleep(100)
If FileRecycle($cmdline[1]) Then FileMove($cmdline[1] & '.temp', $cmdline[1])

Func _SafeRemoval()
   While 1
       $line = FileReadLine($read_handle)
       If @error Then ExitLoop
       $check = StringStripWS($line, 3)
       If Not (StringLeft($check, 2) = ';~') And _
           Not (StringRight($check, 1) = '.') And _
           StringLeft($check, 1) = ';' Then ContinueLoop
       FileWriteLine($write_handle, $line)
   WEnd
EndFunc

Func _FullRemoval()
   While 1
       $line = FileReadLine($read_handle)
       If @error Then ExitLoop
       $check = StringStripWS($line, 3)
       If StringLeft($check, 1) = ';' Then ContinueLoop
       FileWriteLine($write_handle, $line)
   WEnd
EndFunc

Compile it. If you drag'n'drop a script onto this, it will remove comments that do not end with a period (.). You can also add it into your editor to pass the script path to the compiled exe. Or you can pass the script path by commandline to the compiled exe.

If you pass a 2nd switch to it also, which can be anything, it will remove all comments. Not recommended, as when you come back to look at the script latter, you will need to re-interpret what the script code is accomplishing throughout.

The original script is put into the recyle bin, and the replaced by the comment removed version.

I have it setup in the Scite directory, and have added to the user options file:

# 17 Comment Remover 
command.17.$(file.patterns.au3)=comment_remover.exe "$(FilePath)"
command.name.17.$(file.patterns.au3)=Comment Remover
command.subsystem.17.$(file.patterns.au3)=1
command.save.before.17.$(file.patterns.au3)=1
command.is.filter.17.$(file.patterns.au3)=1

This will appear in the tools dropdown menu as Comment Remover, and will remove the comments without ending in a period, from the script displayed in the editor.

End of Comment Remover :)

Good luck.

Link to comment
Share on other sites

Hi,

TNX for this very usefull utility :thumbup

I've 2 questions.

1) Does CMenu "Execute with Parameters" the .msi files???

2) What does "Start in" in "Execute with Parameters" used for and how to use it???

In fact I tested installing MsnMsgs.msi with parameters IAGREE="Yes" ADDEXPLORERTOOLBAR="" SETSEARCHENGINE="" SETHOMEPAGE="" /QB and Start in empty... Nothing happens! Messenger wasn't installed.

Again TNX for this nice utility

coucou

Link to comment
Share on other sites

1) Yes, "Execute with Parameters" supports .msi files.

2) "Start in" sets the initial working directory for the file being executed. Normally installers do not need this to be entered. When you look at the properties of a shortcut, you will see a "Start in" edit field. Some programs will not run, unless they have this Start in field, so they can see their support files. I believe MS Office is one that requires it. So If you execute "C:\Program Files\Office\WinWord.exe", the Start in may require "C:\Program Files\Office" to run, or perhaps another folder to have as it's working directory.

Msi files are called with msiexec. The /i switch for installing msi files would be required. So you would use:

/i | IAGREE="Yes" ADDEXPLORERTOOLBAR="" SETSEARCHENGINE="" SETHOMEPAGE="" /QB

Above would br the same as if you typed in a command prompt:

msiexec /i "Path\to\the\file.msi" IAGREE="Yes" ADDEXPLORERTOOLBAR="" SETSEARCHENGINE="" SETHOMEPAGE="" /QB

Msiexec is always executed with "Execute with Parameters" as to executing msi files. Typing /? as a parameter and executing will show you the required parameters to use it.

I will update the helpfile to help clarify that msiexec is called directly for msi files. Originally, Comspec was used, so the /i switch could have been left omitted.

HTH

;)

Link to comment
Share on other sites

TNX MHZ for yr clear explanation. :thumbup

In fact, until today i used a small and Freeware utility (75k only):

Parametriser it's not executing .msi files but have a usefull function "remember the previous 10 entries". May be you can integrate a similar one.

BTW it is possible to add other function such

1) here enclosed SizeLoader (57K only) which display by right-click the folder size

2) MakeISO by Yzöwl

Regards

coucou

Link to comment
Share on other sites

Here another function suggestion to add to "File Management" A .INF file for registering / Unregistering your object libraries..

This power of this code is in the .INF file that updates the registry. The d2 Register/Unregister DLLOCX 2.0 is a 2nd generation release. If you are developing ActiveX components, you totally know "REGSVR32.EXE" isn't part of RAD at all. With d2 Register/Unregister DLLOCX 2.0 it's much quicker: Simply right-click an OCX or DLL file and select "Register control"/ "Unregister control" (for OCX files) or "Register library"/"Unregister library" (for DLL files) from the appearing menu.

coucou

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...