Jump to content

WIHU Creator


nant15

Recommended Posts

Hello everyone,

i have found that Wihu is very useful and i'm looking for a program like this for a very loooonnnngggg time. I like the app but i hate the fact that i have to edit install.ini on my own which is just fustrating!.

So i code a quick apps to help me out, it is called WIHU Creator and i want to share with all of you. Hope that you will find it useful. And remember, it is for my personal use so that it is based on my needs - don't expect much from it (at least, just for now)

You will need .NET Framework 2.0 Beta 2 to use this app, don't worry by the word beta - it is pretty stable and fast. The app startup in just a flash, unlike .net 1.1

For the source code, i will release it when it is more tidy :P

Thnx BenjaminKalytta for your suggestion!

What it can do:

- Dragging and Dropping Installation Entry around, no more manual editing!

- Opening the existing .ini file, only installation entries is supported for now

- Has some pre-defined command line switch for certain installer types (that is in the msfn unattended guides)

- Automatically generate the .ini file from the selected wihu folder, to use this feature you will have to place your apps you wish to be put into the script in the same folder as wihu.exe. The program will be categorized them using the folder they reside in. Especially for .msi and .reg it will automatically select the switch for you.

Note: The command line generated will be relative path to Wihu (the %WIHU% is placed in place of absolute path)

What it don't:

- Create/Edit User entry

- Create/Edit Environment Variable

- Create/Edit the Evaluation. (those test.x)

- Make the entry selected/hidden/collapsed/locked based on evaluation (no if:true)

Change Log:

0.3.0:

- ADD: Allows discontinuation of command

- ADD: Notification of parsing error when encountered a command which specified to be a sub command of not existing command.

- FIX: Some minor UI Bugs

- IMPROVED: The program is now fully Managed by using NINI Ini parser instead of Windows API. The Ini load performance should be greatly improved as i have avoided data conversion between .NET code and Native Code.

0.2.0:

- ADD: Allows reordering of commands

- FIX: Open Existing file, working quite stable and provide notification for unsupported statements and commands

- FIX: Loading file Created with WIHU Creator no longer resulting in multiple switch being added to the command. ext_creator_originalcommand key were used to keep the original, unaltered command in the entry.

0.1.0a:

- ADD: Drag & Drop

- ADD: Open Existing file. Switch type supported by using ext_creator_switchtype key

0.1.0:

- Initial Release

Enjoy! Comment, Suggestions, Bug Reports are welcome.

post-66747-1123147987_thumb.png

WIHU_Creator_0.3.0.rar

Edited by nant15
Link to comment
Share on other sites


Hum, sound good, I was looking for something like this for a while.

My ini file is a few hundreds line and is quite difficult to maintain right now.

I will test this tonight and let you know.

Thanks

Link to comment
Share on other sites

It's still a bit unstable, I wasn't able to load my install.ini for example. But Im sure you'll fix this soon  :thumbup

I think many people here using WIHU will appreciate  your tool.

Benjamin

Could you please send your .ini file to me? So that i can use it to help debugging my program :hello:

Link to comment
Share on other sites

I've done a quick test yesterday, and it's a bit buggy.

I was not abble to load or to generate any ini file.

I will try it on another machine this evening and let you know the result.

Anyway I like the idea behind, just keep working on.

Link to comment
Share on other sites

@nant15:

I tried the default example INI which is shipped with WIHU by default.

Some hint about loading sub commands:

You could load each command recursively, i.e. make a function which accepts the level index. Just take a look at LoadSubCommands function in my source.

Pseudocode of this idea:

LoadSubCommand(STRING SubCommand) {
   for Idx = 0 TO MAX_LEVEL
       LoadSubCommand(SubCommand + "." + STRING(Idx))
   end for
}

...whereby MAX_LEVEL could be 255 at root level for example and 64 or so for sub levels.

Another idea of course would be (which presumes that you are not using default PrivateProfileString functions) that you only load existing commands, i.e. don't try each level as above, but only load the command which exists:

Line = LoadStringLine(LineNumber);
IF (Line.Contains("command")) THEN
   DoSomething
END IF

Benjamin

Edited by BenjaminKalytta
Link to comment
Share on other sites

:blink: Didn't load at all???

May be i would have misunderstand your format...

This creator.ini what i'm currently using to test my program, is there something wrong with it ???

I see....there is also a key without "." :blushing:

and....as i said, it didn't support if:true, if:false things yet. The program didn't aware that you can put "if:true" besides 0,1 so it didn't expect that and just crash. :P

creator.ini

Edited by nant15
Link to comment
Share on other sites

Your INI file looks ok.

command without .index will be used to set default keys for a specified section or to override [section] header with a more specific one.

[Section name]
description = Just a new Section

will display "Just a new Section" instead "Section name" for example.

Some things to "if" conditions:

description.0 = Option (will be selected in Windows 2003 by default)
command.0 = cmd.exe /c @echo Option 1.1
test.0.1 = HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentVersion?=5.2
test.eval.0 = 0
selected.0 = if.true
disabled.0 = if.false

Code above will evaluate the result of "test.0.1". Only if the evaluation is true, item will be selected and enabled. If the evaluation is false, item will be unselected and disabled.

Benjamin

Second use of if.true/false is in description text:

description.0 = This is if.false("not") Windows 2003

Above will Show insert the word "not" if evaluation of "test.x.y" don't return true.

Link to comment
Share on other sites

  • 3 weeks later...

PSSST!!! youre linking to the .net SDK....unless im mistaken (quite possible), we' wouldnt need the full, 300 meg SDK...

THIS is the link to the framework...er, runtime, or whatever :P

only 22 megs, a tad more reasonable

Edited by ronin2040
Link to comment
Share on other sites

  • 1 month later...
Hello everyone,

What it can do:

- Dragging and Dropping Installation Entry around, no more manual editing!

- Opening the existing .ini file, only installation entries is supported for now

- Has some pre-defined command line switch for certain installer types (that is in the msfn unattended guides)

- Automatically generate the .ini file from the selected wihu folder, to use this feature you will have to place your apps you wish to be put into the script in the same folder as wihu.exe. The program will be categorized them using the folder they reside in. Especially for .msi and .reg it will automatically select the switch for you.

Note: The command line generated will be relative path to Wihu (the %WIHU% is placed in place of absolute path)

hello nant15,

It's been long time ago that i visited the forum.

Nice to see people are still having fun in creating new applictions to make life easier for creating a unattended.

I was and still am a first time user of WIHU so i was charmed by your ini file creator.

Some remarks (bugs): :P

1 Dragging and Dropping Installation Entry around, no more manual editing!

Not here does not work... :(

2 Has some pre-defined command line switch for certain installer types (that is in the msfn unattended guides)

Does not work either here, not with registry import (tested). It does not save this settings either.

3 Especially for .msi and .reg it will automatically select the switch for you.

Non of my imported programs was recognized and recieved a switch.

Some suggestion...

When saving back to ini is it not possibles not to parse lines that are not used?

example, i only need/use

description.0=DVD2One 1.5.1

command.0=%WIHU%\REG\DVD2ONE.REG

selected.0=1

but the creator parses to the ini:

description.0=DVD2One 1.5.1

command.0=%WIHU%\REG\DVD2ONE.REG

selected.0=1

hidden.0=1

collapsed.0=0

locked.0=0

disabled.0=0

group.0=0

flags.0=

workdir.0=

helptext.0=

ext_creator_switchtype.0=0

ext_creator_originalcommand.0=%WIHU%\REG\DVD2ONE.REG

Anyway, still think its a timesaver...

If you need more indepth info...just yell

congrats

visaV

Edited by visaversa
Link to comment
Share on other sites

  • 1 month later...

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