Jump to content











Photo
- - - - -

UltraISO script by Galapo


  • Please log in to reply
29 replies to this topic

#1 Sirquil

Sirquil

    Frequent Member

  • Advanced user
  • 108 posts
  • Location:Indianapolis, Indiana
  •  
    United States

Posted 25 January 2008 - 04:56 PM

Could someone give the correct syntax for this line:

If,NotExistFile,"%Target_prog%\ExpEnvVar\ExpEnvVar.txt",FileCreateBlank,"%Target_prog%\ExpEnvVar\ExpEnvVar.txt"

#2 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 25 January 2008 - 06:29 PM

Could someone give the correct syntax for this line:

If,NotExistFile,"%Target_prog%\ExpEnvVar\ExpEnvVar.txt",FileCreateBlank,"%Target_prog%\ExpEnvVar\ExpEnvVar.txt"

The syntax is correct!

If you have troubles, I assume that %Target_prog% is not defined or contains an invalid value when your script runs.
To test, insert a line
Message,%Target_prog%,Information
before this suspicious line.

Peter

#3 Sirquil

Sirquil

    Frequent Member

  • Advanced user
  • 108 posts
  • Location:Indianapolis, Indiana
  •  
    United States

Posted 26 January 2008 - 09:26 PM

Peter,

I inserted this line above the suspious line in UltraISO; I asked about correct syntax.

Message,%Target_prog%,Information

All I received was the %Target_prog% in a pop up message. Is this because the variable is undefined?

I am not knowledgeable about what I should see and how to fix it if the variable needs defined.

Bill

#4 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 26 January 2008 - 09:45 PM

Hi Bill!

If the message box reads %Target_prog% instead of the value that should be contained in the variable, then the variable is not defined.

:thumbsup:

#5 Arvy

Arvy

    Frequent Member

  • Developer
  • 430 posts
  • Location:Canada, Parry Sound
  • Interests:IT, Outdoors, Horses
  •  
    Canada

Posted 26 January 2008 - 10:27 PM

That's strange. VistaPE's script.project file defines %Target_Prog% as %TargetDir%\Programs. So both %TargetDir% and %Target_Prog% should be properly defined unless the UltraISO script is failing to read the project environment. The only other possiblility I can think of would be if your script.project file for VistaPE had been corrupted somehow?

#6 Sirquil

Sirquil

    Frequent Member

  • Advanced user
  • 108 posts
  • Location:Indianapolis, Indiana
  •  
    United States

Posted 27 January 2008 - 12:35 AM

Why does the %Target_Dir% not show up when I have inserted the line:

Message,%Target_Dir%,Information

All I get is: %Target_Dir%

Bill

#7 allanf

allanf

    Gold Member

  • .script developer
  • 1256 posts

Posted 27 January 2008 - 01:15 AM

Message,%Target_Dir%,Information


Hi Sirquil,

I'm not sure if that is a typo in your post or from the actual script. It should be

Message,"%TargetDir%",Information
... no underscore. This should definitely resolve to the setting in Winbuilder's Paths Tab

Or the other one... "%Target_prog%" is it?

I prefer to use quotes around path variables.

BTW, thanks for zipping the log. VistaPE's log file seems to be getting way out of hand size-wise. Unfortunately, still too big for me to download with slow connection and not unlimited downloads.

Regards

#8 Sirquil

Sirquil

    Frequent Member

  • Advanced user
  • 108 posts
  • Location:Indianapolis, Indiana
  •  
    United States

Posted 27 January 2008 - 02:07 AM

Does this work inside a script?

###############################Script.project ######################
#default setting - all to disk
%Target_Prog%=%TargetDir%\Programs <<< Does this work inside a script? <========

###############################################################


################################UltraISO.script v011########


This is the pop-up error message. FileCreateBlank,"%Target_prog%\ExpEnvVar\ExpEnvVar.txt"


Thanks to the community for the project and for your support!

#9 allanf

allanf

    Gold Member

  • .script developer
  • 1256 posts

Posted 27 January 2008 - 02:31 AM

%Target_Prog%=%TargetDir%\Programs <<< Does this work inside a script?

It should work if it is in the [Variables] Section. EDIT: With or without the percentage signs around Target_Prog?? Note that in that Section, quotation marks around a Path can not be used when defining a variable. (One exception is the %SourceDir% Variable in script.project!?)

In the [Process] or Custom Sections, you need the 'Set' Command. eg
Set,"%Target_Prog%","%TargetDir%\Programs"
followed by (if the variable was previosly defined)
System,RefreshVars

But as Arvy pointed out, ,%Target_Prog% is already defined in VistaPE. Maybe it is losing the definition when RunFromRAM is being selected, because in that case, %Target_Prog% should be re-Set to "%TargetDir%\Program#$sFiles" (... I assume.)


:thumbsup:

#10 Arvy

Arvy

    Frequent Member

  • Developer
  • 430 posts
  • Location:Canada, Parry Sound
  • Interests:IT, Outdoors, Horses
  •  
    Canada

Posted 27 January 2008 - 02:39 AM

Does this work inside a script?

It would IF the %TargetDir% variable were defined properly before using it. That is THE critical question. All else is merely a corollary.

Why are variables that are defined in VistaPE's script.project file are not being properly read and handled within the application script that you are trying to use? Until you pin down and resolve that underlying problem NOTHING is likely to work.

#11 pedrole15

pedrole15

    Silver Member

  • .script developer
  • 731 posts
  •  
    France

Posted 28 January 2008 - 04:34 PM

Could someone give the correct syntax for this line:
If,NotExistFile,"%Target_prog%\ExpEnvVar\ExpEnvVar.txt",FileCreateBlank,"%Target_prog%\ExpEnvVar\ExpEnvVar.txt"

I have made some test and i get the same error when I enable the checkbox RunFromRam
When disable RunFromRam ,the file is well created with no error
so for resolve this problem I sugest :
Make a blank file 'ExpEnvVar.txt' and encode it in the ExpEnvVar Folder in UltraIso.script
Delete or rem this line :
["If,NotExistFile,"%Target_prog%\ExpEnvVar\ExpEnvVar.txt",FileCreateBlank,"%Target_prog%\ExpEnvVar\ExpEnvVar.txt"]
Other problem the file ExpenVar.exe is not run at startup
You must correct the api.script like this:
#######################################################
#shortcuts
#Add_Shortcut,[Type],[Folder],[FullFileName],[Title],[Work Folder],[Parameters],[IconFile( .ico .exe)],[StartMode(1, 2, 3, or 4)]
#Category|Program Title|Path|Icon|Parameters
[AddShortcut]
#category
If,#1,Equal,Desktop,Set,#2,Desktop
If,#1,Equal,QuickLaunch,Set,#2,QuickLaunch
If,#1,Equal,Autorun,Set,#2,Autorun
If,#1,Equal,AutoStart,Set,#2,Autorun
If,#2,Equal,,StrFormat,filename,%Scriptdir%,#2

#pach to program
If,#3,NotEqual,,StrFormat,path,#3,%Shortcut_Folder%
If,#3,NotEqual,,StrFormat,filename,#3,%Shortcut_Exe%
If,#3,Equal,,Set,%Shortcut_Folder%,%PE_Programs%\%ProgramFolder%\
If,#3,Equal,,Set,%Shortcut_Exe%,%ProgramEXE%
If,#3,Equal,,Set,%RR%,True
#program title
If,#4,Equal,,Set,#4,%ProgramTitle%
If,#4,Equal,,Set,%RR%,True
#iconfile
If,#7,Equal,,Set,#7,""
#check run from ram
IniRead,%VistaInfo%,"VistaInfo","ForceAllToRam","%ForceAllToRam%"
If,"%ForceAllToRam%",Equal,"Yes",Set,"%AtRam%","True"
#
If,%RR%,Equal,True,System,Refreshvars
#process
If,%AtRam%,Equal,True,If,#2,NotEqual,Autorun,IniWriteTextLine,"%VPECFG%","shortcut","#2|#4|%Shortcut_Folder%%Shortcut_Exe%|#7|#6"
If,%AtRam%,Equal,False,If,#2,NotEqual,Autorun,IniWriteTextLine,"%VPECFGCD%","shortcut","#2|#4|%Shortcut_Folder%%Shortcut_Exe%|#7|#6"
#autorun
If,%AtRam%,Equal,True,If,#2,Equal,Autorun,IniWriteTextLine,"%VPECFG%","autorun","wait|#4|%Shortcut_Folder%%Shortcut_Exe%#$s#6"
If,%AtRam%,Equal,False,If,#2,Equal,Autorun,IniWriteTextLine,"%VPECFGCD%","autorun","wait|#4|%Shortcut_Folder%%Shortcut_Exe%#$s#6"

#######################################################
Last problem that i can't correct is :
The variable %SystemRoot% is not reconize by VistaPE
I have look in registry and find this variable only for ultraIso/EasyBoot so it's not implemented by Nightman

#12 Arvy

Arvy

    Frequent Member

  • Developer
  • 430 posts
  • Location:Canada, Parry Sound
  • Interests:IT, Outdoors, Horses
  •  
    Canada

Posted 28 January 2008 - 07:24 PM

Last problem that i can't correct is :
The variable %SystemRoot% is not reconize by VistaPE
I have look in registry and find this variable only for ultraIso/EasyBoot so it's not implemented by Nightman

It really has nothing to do with NightMan, nor with any other WinBuilder project, for that matter. The %SystemRoot% variable is a part of the Windows common environment and is frequently used in the registry by many kinds of applications, including Microsoft's own. In fact, it is generally considered good programming practice to avoid all assumptions about the OS installation path, especially drive letter assignments, wherever possible. Thus the use of variables such as %SystemDrive%, %SystemRoot%, %UserProfile%, etc.

There's nothing unique about VistaPE in that respect. All such registry entries must, however, be of the type REG_EXPAND_SZ in order to be properly utilized by any application. For merging in .reg files, they are shown as hex(02) and in WindBuilder scripts as 0x2 values. For some scripting cases (e.g., Add_Shortcut) the percent signs may need to be expressed as #$p as in #$pSystemRoot#$p.

#13 pedrole15

pedrole15

    Silver Member

  • .script developer
  • 731 posts
  •  
    France

Posted 28 January 2008 - 07:48 PM

Ok but i find strange because the script is well working in livexp not with VistaPE
In Ultraiso configuration under VistaPE
The Value %SystemRoot%\system32\NOTEPAD.EXE is not find :thumbsup:

Perhaps I have not the good VistaPE11 ,i have download from http//:vistape.net/project

#14 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 28 January 2008 - 07:52 PM

[Perhaps I have not the good VistaPE11 ,i have download from http//:vistape.net/project

(Some kidding:) Maybe a new reason to remind on 'VistaPE for Dummies'

Peter :thumbsup:

#15 Arvy

Arvy

    Frequent Member

  • Developer
  • 430 posts
  • Location:Canada, Parry Sound
  • Interests:IT, Outdoors, Horses
  •  
    Canada

Posted 28 January 2008 - 09:38 PM

Ok but i find strange because the script is well working in livexp not with VistaPE ...

Well, I suppose it's possible that you got a bad VistaPE download, but your source is the same as my own. The only thing that VistaPE or any other preinstallation environment can possibly do is to install each application in accordance with the instructions contained in its script and it appears to have done that in this case based on what you report seeing in the registry.

I know that I had to upgrade some of my applications, including commercially purchased ones, that were designed for earlier versions of Windows and that just don't work properly under Vista. That happens with almost every new OS and this may simply be one of those cases. I haven't tried UltraISO myself, but the script author's download notes do indicate that he only tested it with LiveXP. So, perhaps it's not really so strange after all, although an application not being able to find notepad.exe with that explicit registry pointer to its location certainly is peculiar. Did you try changing that registry entry to just 'NOTEPAD.EXE' without any path at all? Other Windows apps installed under VistaPE are certainly able to find it that way.

#16 pedrole15

pedrole15

    Silver Member

  • .script developer
  • 731 posts
  •  
    France

Posted 28 January 2008 - 10:45 PM

I have make an other test
It's working same in LiveXP so it's a problem with the script
The isodrive seem not working under liveXP and VistaPE
Same for the default wiever "Notepad" not fixed
@Galapo can you see that

#17 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 28 January 2008 - 10:52 PM

Hi Pedro,

I'll take a look shortly. But last time I checked the isodrive service and notepad were fine.

Regards,
Galapo.

#18 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 28 January 2008 - 10:57 PM

I have made some test and i get the same error when I enable the checkbox RunFromRam
When disable RunFromRam ,the file is well created with no error
so for resolve this problem I sugest :
Make a blank file 'ExpEnvVar.txt' and encode it in the ExpEnvVar Folder in UltraIso.script
Delete or rem this line :
["If,NotExistFile,"%Target_prog%\ExpEnvVar\ExpEnvVar.txt",FileCreateBlank,"%Target_prog%\ExpEnvVar\ExpEnvVar.txt"]


Do you have an explanation as to why the file isn't created?

Thanks,
Galapo.

EDIT: it's likely due to the folder not being created. I'll update the script.

#19 online

online

    Silver Member

  • Advanced user
  • 767 posts

Posted 28 January 2008 - 11:03 PM

In Ultraiso configuration under VistaPE
The Value %SystemRoot%\system32\NOTEPAD.EXE is not find :thumbsup:

Hi, pedrole15!

Try this

RegAddBoot,&#34;HKU&#34;,0x1,&#34;.DEFAULT\Software\EasyBoot Systems\UltraISO\5.0&#34;,&#34;DefViewer&#34;,&#34;%SystemRoot%\System32\notepad.exe&#34;

it's 100% working. :D

#20 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 28 January 2008 - 11:16 PM

Is this api command working in LiveXP? If not, I cannot yet adopt this solution.

Regards,
Galapo.

#21 Sirquil

Sirquil

    Frequent Member

  • Advanced user
  • 108 posts
  • Location:Indianapolis, Indiana
  •  
    United States

Posted 28 January 2008 - 11:18 PM

pedrole15

I made your suggested changes; have not yet tried to use UltraISO from VistaPE. Registration looks correct. I have
used UltraISO in Vista with no problems. I have Vista Home Prem. (32Bit).

The icon that gets placed for the StartMenu is placed near the bottom of the StartMenu.
Should this icon (ExpEnvVar.exe go into the StartMenu, Startup folder?

Bill

#22 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 28 January 2008 - 11:26 PM

Should this icon (ExpEnvVar.exe go into the StartMenu, Startup folder?

Yes.

#23 Sirquil

Sirquil

    Frequent Member

  • Advanced user
  • 108 posts
  • Location:Indianapolis, Indiana
  •  
    United States

Posted 29 January 2008 - 12:28 AM

From VistaPE running; I used UltraISO to load VistaPE.iso and burn a cd --with no problem.

Created a cd image from my cd drive to an iso file, mounted the image on a virtual
drive; again no problem

All worked as advertized.

Thank you to ALL that have helped to resolve my errors -- truely a World community
here on boot-land.net!

Bill :thumbsup:

#24 pedrole15

pedrole15

    Silver Member

  • .script developer
  • 731 posts
  •  
    France

Posted 29 January 2008 - 01:59 AM

Do you have an explanation as to why the file isn't created?

Thanks,
Galapo.

EDIT: it's likely due to the folder not being created. I'll update the script.

Yes, when you use the api for extract file the folder is make by the api
when you use filecreateblank under vistape in ram the folder is not created but it is in livexp and in vistape not in ram ==>strange
So you encode a blank file or you place the line for extract before the line with filecreatblank

But this is not fixed same under LiveXP and VistaPE
2008_01_29_024822.jpg 2008_01_29_024924.jpg

#25 Arvy

Arvy

    Frequent Member

  • Developer
  • 430 posts
  • Location:Canada, Parry Sound
  • Interests:IT, Outdoors, Horses
  •  
    Canada

Posted 29 January 2008 - 04:33 AM

when you use filecreateblank under vistape in ram the folder is not created ...

If you haven't already done so, you might want to pass that along to NightMan via email so that he can correct it in his ongoing v.12 development.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users