Topic: Questions and Answers  (Read 11878 times)

Re: Questions and Answers
« Reply #20 on: October 30, 2018, 10:23:12 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Ok understand. The message come from builder.
Ok understand.
on LiveSystemPro it comes from builder.
Sorry, I thought it would be the same with WB.
no wb do not give such message.
on LiveSystemPro it requires [ONBUILDEXIT] in Project.man with message.. etc.

If the message bothers you, you would have to think about removing it.
I need to wait for next LiveSystemPro version.  :smile:

:turtle:

Re: Questions and Answers
« Reply #21 on: October 30, 2018, 01:34:33 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Kare,

A cosmetic small request if you are interested:


Ex:
LiveSyspro.exe -P=Win10PE "-S=D:\S\Win 10_x64_5\"
This works fine
https://www.dropbox.com/s/lzfq1zrqk242sa9/Run_Default_2018-10-30_162606.gif?dl=0

Can we have an option to get standard screen with command line

ex:
LiveSyspro.exe -R=Standard -P=Win10PE "-S=D:\S\Win 10_x64_5\"
->
https://www.dropbox.com/s/hpaya6yxeudv8h4/Run_Standard_2018-10-30_161913_.gif?dl=0


Reason Behind:
Standard screen looks much better.  :cool:

:turtle:

Re: Questions and Answers
« Reply #22 on: November 03, 2018, 06:10:10 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Kare,

I believe Minimize missing with Add_Shortcut

Reason behind:
It is easier for the end user Minimize for Startup .cmd files instead of hiderun.

See eg.
http://theoven.org/index.php?topic=2603.msg28450#msg28450

11 parameters for Startup.exe will be good. (Minimize and Maximize)

11 parameter for shortcut.exe will be good. (Minimize and Maximize)



*
I see shortcut.exe parameter 3 only support  Desktop or StartMenu or QuickLaunch
Can we have path support for parameter 3 so we can create a shortcut anywhere inside PE?
eg. parameter 3 : "D:\LSP\Target\Win10PE\Users\MyShortcuts"

:turtle:

Edit:
« Last Edit: November 03, 2018, 11:15:59 AM by Lancelot »

Re: Questions and Answers
« Reply #23 on: November 03, 2018, 09:48:49 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Kare,

also I could not figure out shortcut.exe 10th parameter ?

:turtle:

Re: Questions and Answers
« Reply #24 on: November 03, 2018, 04:42:19 PM »

CD-RW

  • Moderator, LiveSystem pro
  • Chef
  • *****
  • Date Registered: Oct 2010
  • Posts: 168
@Lancelot

Parameter 10 is available in shortcut.exe v1.0.0.7.

Add_Shortcut,<Type>,<[StartMenuFolder]>[,<FullFileName>][,<Title>][,<Workfolder>][,<Parameters>][,<IconFile>][,ShowCommand]

Work in all projects WinXPE,Win7PE,Win8PE and Win10PE.

Ex.
Parameter 10:
------------------
Nothing = Default Window
Min=Minimized
Max=Maximized

Code: [Select]
; Project WinXPE
set,%ProgramTitle%,Notepad
set,%ProgramEXE%,"notepad.exe
Add_Shortcut,Desktop,".","#$pSystemRoot#$p\system32\%ProgramEXE%",%ProgramTitle%,,,,min

Note:
Replace the shortcut.exe in .zip file  with %tools%\shortcut.exe.

Kare
--
« Last Edit: November 03, 2018, 04:45:03 PM by CD-RW »

Re: Questions and Answers
« Reply #25 on: November 03, 2018, 04:57:44 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Thanks

I will test when I get back home  :thumbsup:

*
What you think about
+
Normal gui idea with -S. ...
http://theoven.org/index.php?topic=295.msg28836#msg28836

:turtle:
« Last Edit: November 03, 2018, 04:58:39 PM by Lancelot »

Re: Questions and Answers
« Reply #26 on: November 03, 2018, 07:10:26 PM »

CD-RW

  • Moderator, LiveSystem pro
  • Chef
  • *****
  • Date Registered: Oct 2010
  • Posts: 168
I see shortcut.exe parameter 3 only support  Desktop or StartMenu or QuickLaunch
Can we have path support for parameter 3 so we can create a shortcut anywhere inside PE?
eg. parameter 3 : "D:\LSP\Target\Win10PE\Users\MyShortcuts"

No, it supports as many parameters as you define.
Look into the shortcut script in the WinXPE project.

Ex.
Standards+Autostart and AD Tools (Shortcuts WinXPE)
Code: [Select]
iniwrite,%Projectini%,Shortcut,StartMenu,\%doc_and_sett%\Default User\%startmenu_prog%
iniwrite,%Projectini%,Shortcut,Desktop,\%doc_and_sett%\Default User\%desktop%
iniwrite,%Projectini%,Shortcut,QuickLaunch,\%doc_and_sett%\Default User\%app_data%\%ms_ie_quicklaunch%
iniwrite,%Projectini%,Shortcut,Autostart,\%doc_and_sett%\Default User\%startmenu_prog_startup%
iniwrite,%Projectini%,Shortcut,AD,\%doc_and_sett%\ALL Users\%startmenu_prog%\%admin_tools%

setmacro,Add_Shortcut,Shellexecute,hide,%Tools%\Shortcut.exe,#$q%PreUserdata%#$q #$q%Projectini%#$q #$q#1#$q #$q#2#$q #$q#3#$q #$q#4#$q #$q#5#$q #$q#6#$q #$q#7#$q #$q#8#$q,PERMANENT

Shortcut Window 7/8/10
Code: [Select]
iniwrite,%Projectini%,Shortcut,StartMenu,\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
iniwrite,%Projectini%,Shortcut,Desktop,\Users\Default\Desktop
setmacro,Add_Shortcut,Shellexecute,hide,%Tools%\Shortcut.exe,#$q%TargetDir%#$q #$q%Projectini%#$q #$q#1#$q #$q#2#$q #$q#3#$q #$q#4#$q #$q#5#$q #$q#6#$q #$q#7#$q #$q#8#$q,PERMANENT

%PreUserData% is the Basisdirectory and the defines is the extended.
TargetDir= %PreUserdata%+DefineDir

Kare
--
« Last Edit: November 03, 2018, 07:24:40 PM by CD-RW »

Re: Questions and Answers
« Reply #27 on: November 03, 2018, 09:10:40 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Kare,

following your post:

%PreUserData% is the Basisdirectory and the defines is the extended.
TargetDir= %PreUserdata%+DefineDir

If DefineDir is empty we can add shortcuts to %PreUserdata%

Add_Shortcut,<Type>,<[StartMenuFolder]>

I try to add Type = TargetDir

Test 1:
This does not work
Code: [Select]
; Project WinXPE
iniwrite,%Projectini%,Shortcut,TargetDir,

set,%ProgramTitle%,Notepad
set,%ProgramEXE%,"notepad.exe
Add_Shortcut,TargetDir,"\Users\MyShortcuts","#$pSystemRoot#$p\system32\%ProgramEXE%",%ProgramTitle%,,,,min


Test 2:
I manually add %Projectini% -> [Shortcut] TargetDir= value
eg.
Code: [Select]
[Shortcut]
StartMenu=\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
Desktop=\Users\Default\Desktop
QuickLaunch=\Users\Default\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch
TargetDir=

Still not working:
Code: [Select]
; Project WinXPE
set,%ProgramTitle%,Notepad
set,%ProgramEXE%,"notepad.exe
Add_Shortcut,TargetDir,"\Users\MyShortcuts","#$pSystemRoot#$p\system32\%ProgramEXE%",%ProgramTitle%,,,,min


:turtle:

Re: Questions and Answers
« Reply #28 on: November 04, 2018, 06:57:33 AM »

CD-RW

  • Moderator, LiveSystem pro
  • Chef
  • *****
  • Date Registered: Oct 2010
  • Posts: 168
Ok. I had a limit only for the startmenu. It is now removed.
Now it works with everyone.

Use version ShortcutV1007-B.zip.

or use the old version.

Ex:
Code: [Select]
[Shortcut]
StartMenu=\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
Desktop=\Users\Default\Desktop
QuickLaunch=\Users\Default\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch
TargetDir=\Users\MyShortcuts

Code: [Select]
; Project WinXPE
set,%ProgramTitle%,Notepad
set,%ProgramEXE%,"notepad.exe
Add_Shortcut,TargetDir,".","#$pSystemRoot#$p\system32\%ProgramEXE%",%ProgramTitle%,,,,min

Kare
--
« Last Edit: November 04, 2018, 07:17:14 AM by CD-RW »

Re: Questions and Answers
« Reply #29 on: November 04, 2018, 01:33:53 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Kare,

Shortcut: All work (min + custom shortcut) fine now.  :thumbsup:

*
It will be good if you add an empty TargetDir=

Code: [Select]
[Shortcut]
..
TargetDir=

too ALL projects cfg on your next package.  :cool:


:turtle:
« Last Edit: November 04, 2018, 01:34:08 PM by Lancelot »

Re: Questions and Answers
« Reply #30 on: November 04, 2018, 02:20:39 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Kare,

and a small thing I notice:

LiveSystemPro-Win10PE
Default build have an empty "App" folder at StartMenu  :wink:

:turtle:

Re: Questions and Answers
« Reply #31 on: November 05, 2018, 01:08:36 PM »

CD-RW

  • Moderator, LiveSystem pro
  • Chef
  • *****
  • Date Registered: Oct 2010
  • Posts: 168
@Lancelot

Thanks, Apps removed in next version.

Kare
--

Re: Questions and Answers
« Reply #32 on: November 13, 2018, 07:44:45 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Kare,

can we have "4" with DirRemove:

DirRemove,C:\MeinOrdner,4

2 and 0 do not delete subfolders.


*
DirRemove,C:\MeinOrdner,4
Defination: Get empty C:\MeinOrdner folder ready.

DirRemove,C:\MeinOrdner,4
=
A) If Not C:\MeinOrdner exists, create C:\MeinOrdner
B) If C:\MeinOrdner exists

B1)
If folder exists test C:\MeinOrdner writable or not.
If NOT C:\MeinOrdner writable - Delete folder and create again.
(Case: Forgotten Junction folder)

B2)
DirRemove,C:\MeinOrdner,0
+
B3)
DeleteSubFolders


ps:
same with Call,DirDeleteE




**
With DirRemove,<NeuerOrdner>,4

IF,ExistDir,%TargetDir%,Then,DirRemove,%TargetDir%,1
IF,ExistDir,%Target_CD%,Then,DirRemove,%Target_CD%,1
-->
DirRemove,%TargetDir%,4
DirRemove,%Target_CD%,4

Result:
%TargetDir% %Target_CD% junctionable to ramdrive.

:turtle:

Re: Questions and Answers
« Reply #33 on: November 13, 2018, 09:25:33 AM »

CD-RW

  • Moderator, LiveSystem pro
  • Chef
  • *****
  • Date Registered: Oct 2010
  • Posts: 168
The macro is relatively long (near100 lines).  Can you explain to me an example exactly how the function is?
And explain when it is used ?

Kare
--

Re: Questions and Answers
« Reply #34 on: November 13, 2018, 09:43:55 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
It does exactly what I explained on previous post with Steps:
A) B) B1) B2) B3)

To delete subfolders and files, I create a .cmd file and execute,
after execute cmd file
I check folder again and if there are folders files left create .cmd file again if failure...
That is the reason of 100 lines.

generally it success with 1st attempt, so most of 100 lines not use

you can test with

Call,DirDeleteE,C:\Test\MeinOrdner

It will create folder if you do not have.
later put files folders inside C:\Test\MeinOrdner
and use

Call,DirDeleteE,C:\Test\MeinOrdner

check log (not Lines ML) , log will give you better picture..

I have to go now...
:turtle:

Re: Questions and Answers
« Reply #35 on: November 13, 2018, 12:45:20 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Kare,

When you test junction:
*
First create junction
I use junc.exe from Olof L

http://www.ltr-data.se/opencode.html
Junc.zip - 7.7 KB (32 bit) / junc64.zip - 8.2 KB (64 bit) / junc.zip - 11.0 KB (ARM)
compiled 2018-05-13

*
After creating juntion folders for %TargetDir% and %Target_CD%

Delete files and folders manually at %TargetDir% and %Target_CD%

*
Remove these lines

IF,ExistDir,%TargetDir%,Then,DirRemove,%TargetDir%,1
IF,ExistDir,%Target_CD%,Then,DirRemove,%Target_CD%,1

*
Make your build.

*******
If you do not remove lines,
You will see junction not work anymore.

Call,DirDeleteE solves this problem  :wink:


Happy Testing  :great:

**********
ps:
Try Grammarly see reply 4
http://theoven.org/index.php?topic=2633.msg29133#msg29133

:turtle:

Re: Questions and Answers
« Reply #36 on: November 13, 2018, 03:14:16 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Kare,

Also make check "ghost junction"

How to Reproduce:
*
Create ram drive eg: Q:

*
Create junction folders at Q:

*
After creating juntion folders for %TargetDir% and %Target_CD%

Delete files and folders manually at %TargetDir% and %Target_CD%

*
Remove these lines

IF,ExistDir,%TargetDir%,Then,DirRemove,%TargetDir%,1
IF,ExistDir,%Target_CD%,Then,DirRemove,%Target_CD%,1

*
Make your build.

*
Remove RamDrive Q:

*
Use "Windows Explorer" and browse to
%TargetDir%
You will notice it is  "ghost junction" folder

DirRemove 0 and 2 (maybe also 3) will fail with

IF,ExistDir,%TargetDir%,Then,DirRemove,%TargetDir%,X
IF,ExistDir,%Target_CD%,Then,DirRemove,%Target_CD%,X

X= 0,2,3

*
Solution:
1) your builder can check if it is a "ghost junction"
If yes --》 Delete folder and create again.

2) I make writable test with Call,DirDeleteE
If writable test fails Call,DirDeleteE delete folder and create again.

I believe Solution 1 is better for your builder.
DirRemove 0 2 3 can make same "ghost junction" check and delete and create folder if there is "ghost junction"


*********
Sorry I am away home, only using phone to post.


:turtle:

Re: Questions and Answers
« Reply #37 on: November 15, 2018, 02:20:37 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Kare,

*
After "ghost junction"
one more thing:

To Make syntax simple, Create the folder if not exists.
This way You add ALL projects same line:

eg.

IF,ExistDir,%TargetDir%,Then,DirRemove,%TargetDir%,1
IF,ExistDir,%Target_CD%,Then,DirRemove,%Target_CD%,1

--->
DirRemove,%TargetDir%,X
DirRemove,%Target_CD%,X

If,ExistDir,%targetDir%,then,DirRemove,%TargetDir%\,X
If,ExistDir,%Target_CD%,then,DirRemove,%Target_CD%\,X

--->
DirRemove,%TargetDir%,X
DirRemove,%Target_CD%,X

eg:
All SE/Gena projects have same line Call,DirDeleteE,%TargetDir%



*
Creating junction folder is a one-time operation for ALL projects,
As long as ALL projects use required syntax to delete target folders to support junctions.


eg.
Call,DirDeleteE,%TargetDir%
DirRemove,%TargetDir%,X
DirRemove,%Target_CD%,X

ps:
you can change syntax name

DirRemove,%TargetDir%,X
DirRemove,%Target_CD%,X

-->
DirMake,%TargetDir%,X
DirMake,%Target_CD%,X

DirRemove,%TargetDir%,X aim is to create empty folder.  :wink:
one day I will also change Call,DirDeleteE,%TargetDir% to Call,DirMakeE,%TargetDir%  :cool:

(DirMakeE -> DirMake Empty folder)



******
On next LiveSystemPro I need TargetDir= at ALL projects

I do not want to iniwrite ..... with a custom srt.... , It is better out of box.

Shortcut: All work (min + custom shortcut) fine now.  :thumbsup:

*
It will be good if you add an empty TargetDir=

Code: [Select]
[Shortcut]
..
TargetDir=

too ALL projects cfg on your next package.  :cool:

This way ALL projects under LiveSystemPro out of box ready to create shortcut anywhere at TargetDir.  :great:

:turtle:
« Last Edit: November 15, 2018, 05:16:21 AM by Lancelot »

Re: Questions and Answers
« Reply #38 on: November 16, 2018, 08:47:17 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Kare,

*
It is better "update" screen default English  :wink:

https://www.dropbox.com/s/m7u4pmr0d0b5gus/2018-11-16_114204.gif?dl=0

*
It is better default project be latest (on your case Win10PE) with your zip distribution.

I mean:

LiveSyspro.ini
[Main]
Project=WinXPE
-->
[Main]
Project=Win10PE

most people use latest.  :wink:

:turtle:

Re: Questions and Answers
« Reply #39 on: November 18, 2018, 11:10:36 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Kare,

LiveSystemPro-Win10PE
can not build with Win10_1809_Korean_x64.iso

*

Can we have %ErrorLevel% for LiveSyspro.exe -P ... -S ...

So If LiveSyspro.exe fails, %ErrorLevel% not 0  :wink:

Edit:
I figure out I do not need %ErrorLevel%
Still might be useful for others.

:turtle:
« Last Edit: November 18, 2018, 11:57:06 PM by Lancelot »

 

Powered by EzPortal