Jump to content

CMenu


MHz

Recommended Posts


  • 3 weeks later...

Hi MHz -

I just pulled down the latest 2.3, and something seems a little weird with the silent install. It's in the RunOnceEx.cmd like this :

REG ADD %KEY%\%NUM% /V 20 /D "%DIR%\CMenu.exe /silent" /f

Yet during the install, it pops up with these windows, one after another :

cmenu7ts.png

I click yes to move from one to the other.

What did I goof up ? This one is 1,484,770 bytes in size.

D.

Link to comment
Share on other sites

Your RunOnceEx command looks fine.

The windows are automated and have a 5 second timeout for the wait. If you have a window idle for more then 5 seconds then it is fair to say that the automation has failed to deal with the window and manual assistance maybe needed. There is a very small chance that failure can happen for an unknown reason. Heh, lightning normally does not strike the same spot twice so your next install should be a success.

Link to comment
Share on other sites

  • 1 month later...

I get these windows everytime, but they only apper for less than half a second each and also cause the computer to beep at each window, which scares the living daylights out of me each and everytime.

It always work, thought, so I dont care. Gotta have something to keep me awake.

A quality product. Thanx MHz

Rik :)

Link to comment
Share on other sites

  • 4 weeks later...

@rikgale

Glad you like CMenu too. :)

@Weed

Sad that x64 doesn't support CMenu and I am not sure as to why exactly. I guess CMenu is available for only 32bit OSes :(

I have uploaded CMenu v2.4 which fixes some minor bugs. See the 1st post for details.

Edited by MHz
Link to comment
Share on other sites

  • 4 months later...

I did use many times CMenu but i do not did use make Autoit script , now i try .

I did Autoit script but not work , only starting first insttalation window.

Here is my Autoit skript for Total commander

#region - tcup16 install script - (Automated with WinExists functions)

Opt('TrayIconDebug', 1)

Opt('WinDetectHiddenText', 1)

Opt('WinTitleMatchMode', 4)

; Installer.

$executable = 'tcup16.exe'

; Show progess.

$splash = 0

; Default catagory folder in startmenu.

$group = ''

; New catagory to move the default folder into.

$catagory = ''

; Installation folder in Program Files.

$directory = ''

; Allowed time for installation.

$allowed = 60 * 1000

; Run the installer.

$pid = _Install()

$time = TimerInit()

Do

Select

Case WinExists('', '')

ControlClick('', '', '')

Case WinExists('', '')

ControlClick('', '', '')

Case WinExists('', '')

ControlClick('', '', '')

Case WinExists('', '')

ControlClick('', '', '')

Case WinExists('', '')

ControlClick('', '', '')

Case Else

Sleep(250)

EndSelect

Sleep(10)

If TimerDiff($time) > $allowed Then _Abort()

Until Not ProcessExists($pid)

; Remove shortcuts.

If _MainShortcut('?.lnk') Then

; Relative to shortcut directories

; Remove Startmenu shortcuts

FileDelete('?.lnk')

FileDelete('?.lnk')

FileDelete('?.lnk')

FileDelete('?.lnk')

FileDelete('?.lnk')

; Remove other shortcuts

_Desktop('?.lnk')

_QuickLaunch('?.lnk')

EndIf

#endregion

Exit

Func _Install($path = 'Default')

; Run the installer in Default Script directory.

Dim $splash, $processblock

If $path = 'Default' Then $path = @ScriptDir

If StringRight($path, 1) <> '\' Then $path = $path & '\'

If StringInStr($executable, '\') Then $path = ''

If Not FileExists($path & $executable) Then Exit 1

If $processblock <> '' Then Call('_' & 'ProcessBlock')

If $splash Then _Splash('Installing:' & StringTrimRight(StringReplace(@ScriptName, '_', ' '), 4))

If StringRight($executable, 3) = 'msi' Then

Return Run(@SystemDir & '\msiexec /i "' & $path & $executable & '"')

Else

Return Run($path & $executable)

EndIf

EndFunc

Func _Abort()

; close process if exists then exit.

Dim $pid

If ProcessExists($pid) Then

ProcessClose($pid)

Exit 2

Else

Exit 3

EndIf

EndFunc

Func _Desktop($shortcut)

; Delete a Desktop shortcut.

If FileExists(@DesktopDir & '\' & $shortcut) Then

Return FileChangeDir(@DesktopDir) And FileDelete($shortcut)

ElseIf FileExists(@DesktopCommonDir & '\' & $shortcut) Then

Return FileChangeDir(@DesktopCommonDir) And FileDelete($shortcut)

EndIf

EndFunc

Func _MainShortcut($shortcut, $rename = '')

; Change working directory to correct StartMenu\Group directory.

Dim $group, $catagory, $splash

If $group = '' Then Return 0

If FileExists(@ProgramsDir & '\' & $group) Then

FileChangeDir(@ProgramsDir & '\' & $group)

ElseIf FileExists(@ProgramsCommonDir & '\' & $group) Then

FileChangeDir(@ProgramsCommonDir & '\' & $group)

Else

Return 0

EndIf

; Wait for main shortcut.

If $splash Then _Splash('Waiting for shortcuts')

For $i = 1 To 20

If FileExists($shortcut) Then ExitLoop

Sleep(500)

Next

If $splash Then _Splash('Cleaning up:' & StringTrimRight(StringReplace(@ScriptName, '_', ' '), 4))

; If catagory not assigned anything, then return.

If $catagory = '' Then Return 1

; Move the group folder into the catagory folder.

If FileChangeDir('..') And DirCopy($group, $catagory & '\' & $group, 1) Then

If DirRemove($group, 1) Then

; If optional rename parameter is used, then rename the group folder.

If $rename <> '' And FileChangeDir($catagory) Then

If DirCopy($group, $rename, 1) And DirRemove($group, 1) Then

Return FileChangeDir($rename)

EndIf

Else

Return FileChangeDir($catagory & '\' & $group)

EndIf

EndIf

EndIf

EndFunc

Func _QuickLaunch($shortcut)

; Delete a Quicklaunch shortcut.

Local $subdirs = '\Microsoft\Internet Explorer\Quick Launch'

If FileExists(@AppDataDir & $subdirs & '\' & $shortcut) Then

Return FileChangeDir(@AppDataDir & $subdirs) And FileDelete($shortcut)

ElseIf FileExists(@AppDataCommonDir & $subdirs & '\' & $shortcut) Then

Return FileChangeDir(@AppDataCommonDir & $subdirs) And FileDelete($shortcut)

EndIf

EndFunc

Func _Splash($text = '')

; Shows a small borderless splash message.

Dim $splash

If $splash Then

If $text Then

SplashTextOn('', $text, 500, 25, -1, 5, 1, '', 14)

Else

SplashOff()

EndIf

EndIf

EndFunc

Func _WinClose($title, $text = '')

; Close a window with further attempts.

For $i = 1 To 10

WinClose($title, $text)

If Not WinExists($title) Then Return 1

Sleep(500)

Next

EndFunc

Func OnAutoItStart()

; A 2nd script instance will exit.

Local $interpreter

If StringInStr($cmdlineraw, '/dummy') Then Exit

$interpreter = StringTrimRight(@ScriptName, 4) & ' Script Interpreter'

If WinExists($interpreter) Then Exit

AutoItWinSetTitle($interpreter)

EndFunc

where i need write some options , will work good

how somebody can put here goodone sript ( thisone or other from CMmenu i will very glad)

i now we have Autoit Forum but my engish is not too good

Yurek3

Link to comment
Share on other sites

Yurek3,

Make sure that you read the CMenu Helpfile. In the Identify Installer page is some links at the bottom which shows a simple example. The Helpfile does let you know of the tasks to be done by you to complete the script as the scipt created is just based on a template. The script needs editting between the "#region" and "#endregion" fold keywords.

As for using 'tcup16.exe, I would guess you have the 16 bit version that is used on Windows 3.1.

I will show a working example script of installing the 32 bit version.

View Script: _tcmdr655.html

Download Script: _tcmdr655.au3

The CMenu Helpfile does mention that the WinExists type of script can be the most advanced, so using a WinWait script might make it easier for you to learn making an automation script. Silent installation scripts made by Identify Installer are also available for installers that support silent install.

:)

Link to comment
Share on other sites

Thenks a lot i will learn Auotit script.

One more thinks

You did Autoit script for exist now you can do waits please.

step by step

big THX for You

Edited by Yurek3
Link to comment
Share on other sites

Yurek3,

I converted the Total commander using WinExist() with a Loop, into a WinWait() script for you.

View: _tcmdr655.html

Download: _tcmdr655.au3

You will notice the scripts are similar but WinExist() will check multiple windows at once to process the first match with the condition of the loop, while WinWait() is one window to handle, then the next window to handle so is easier to manage for new users of AutoIt3.

;)

Link to comment
Share on other sites

  • 3 weeks later...

Hello friends, I am wanting to create an installation for the program Nitro PDF Pro, however I am having difficulties to do.

If somebody can me to help I thank.

this is the link: http://www.nitropdf.com/Professional/trial.asp

I want the script to close the program and also close the page of the site that opens in the end.

I thank to who can me to help.

Link to comment
Share on other sites

I want the script to close the program and also close the page of the site that opens in the end.

If you have a script made and need some help, then I'm sure that I or someone else maybe able to help you with the problems in your script. There are some samples above of using scripts made with CMenu templates.

I'm sure that ProcessClose() can perhaps handle your issues.

:)

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