shortcut - another query
#1
Posted 21 July 2007 - 11:50 AM
When I run WB the following happens, there is a shortcut on the desktop - CHESS - when I click on that I get the message " Cannot find opening.bk" program then program continues.
If I exit program and go to where chess.exe is located and create another shortcut and drag this new shortcut to the desktop and click on it then the chess program starts (obviously it found the opening.bk file) if I exit the program and then right click on the 2 shortcuts and go to properties I get the following:
Original WB shortcut:
Target:rmdrive%\Program Files\programs\chess.exe
Start In: This box is empty!
The new shortcut:
Target:"X:\Program Files\programs\chess.exe
Start In:"X:\Program Files\Programs
Any explanation?
#2
Posted 21 July 2007 - 12:00 PM
Look inside the BuildModel script - it contains a lot of switches that you can use..
#3
Posted 21 July 2007 - 12:10 PM
nativeEx based projects refresh shortcuts on boot, using 'resShort.exe'Original WB shortcut:
Target:rmdrive%\Program Files\programs\chess.exe
Start In: This box is empty!
The new shortcut:
Target:"X:\Program Files\programs\chess.exe
Start In:"X:\Program Files\Programs
You can switch this behaviour off by checking 'Do not refresh shortcuts on ISO boot' in buildModel.Script.
As a result, maybe you do not see the app's icon.
Peter
#4
Posted 21 July 2007 - 12:31 PM
Would your refresh program, add informations into the shortcut like the target folder?
#5
Posted 21 July 2007 - 12:45 PM
I do not know how Bill G. handles this code:@psc
Would your refresh program, add informations into the shortcut like the target folder?
if FileExists(actFile) then begin linkTarget := WideString(actFile); PFile.Load(PWideChar(linkTarget), 2); Writeln(Output, 'Resolving Shortcut ' + actFile); SLink := PFile as IShellLink; SLink.Resolve(0, SLR_NO_UI or SLR_UPDATE); PFile := SLink as IPersistFile; PFile.Save(PWideChar(linkTarget), false); end;
Peter
#6
Posted 21 July 2007 - 01:33 PM
#7
Posted 21 July 2007 - 01:45 PM
I understood your question.Sorry, ment will your program also add the 'Ausführen in' setting when not specified originaly, or will it just try to clean things up?
But <IShellLink>.LinkResolve is an API call which rebuilds the link.
I do not know and cannot influence the rules of this call.
Peter
#8
Posted 21 July 2007 - 02:46 PM
#9
Posted 21 July 2007 - 02:56 PM
Just a personal response to MedEvil:Ahh, i see. Just thought you must have tested it sometime.
Alter Nörgler!
Peter
#10
Posted 21 July 2007 - 05:22 PM
nativeEx based projects refresh shortcuts on boot, using 'resShort.exe'
You can switch this behaviour off by checking 'Do not refresh shortcuts on ISO boot' in buildModel.Script.
As a result, maybe you do not see the app's icon.
Peter
Thanks, tried above still doesn't work. I'm struggling here, can't understand the other replies!
#11
Posted 21 July 2007 - 05:58 PM
Try to adapt this as needed:
Run,%BuildModelScript%,Add-Shortcut,"DE","#$qX:\Program Files\programs\chess.exe#$q","Chess","-SW:#$qX:\Program Files\programs\#$q"
Haven't tested and I'm using fixed paths, but I really recommend you to read the help page inside buildmodel.
I can also create a new script if you wish - just post the game on a new topic.
#12
Posted 21 July 2007 - 06:24 PM
Just a personal response to MedEvil:
Alter Nörgler!
Peter
Sorry completely forgot, you don't test your software!
#13
Posted 22 July 2007 - 06:43 PM
Thanks, tried above still doesn't work. I'm struggling here, can't understand the other replies!
Have found solution. the attached shortcut.script file does it all, makes windows shortcuts, same as XP. These shortcuts are 1kb long as against the 2kb for WB shortcuts.
Have attached shortcut.script and the chess program as sample of use. Seems better method than existing WB method?
Attached Files
#14
Posted 22 July 2007 - 06:51 PM
Have found solution. the attached shortcut.script file does it all, makes windows shortcuts, same as XP. These shortcuts are 1kb long as against the 2kb for WB shortcuts.
Have attached shortcut.script and the chess program as sample of use. Seems better method than existing WB method?
What's wrong here? This 3rd attempt to upload shortcut.script.
Attached Files
#15
Posted 23 July 2007 - 12:51 PM
Created a new script using API commands, looks much simpler now and will work with other projects as well.
Only need to use this as header:
[main] Title=Chess Description=The board game Selected=True Level=5 Version=1 Author=David Norris Date=2007-JUL-23 [variables] %ProgramTitle%=Chess %ProgramEXE%=CHESS.EXE %ProgramFolder%=Chess [process] Add_Shortcut,StartMenu,Games unpack
And change the "chess" foldername to "folder" (or download the script) from here.
Enjoy your game!
#16
Posted 23 July 2007 - 04:31 PM
Your chess script contains the lineHave found solution. the attached shortcut.script file does it all, makes windows shortcuts, same as XP. These shortcuts are 1kb long as against the 2kb for WB shortcuts.
Have attached shortcut.script and the chess program as sample of use. Seems better method than existing WB method?
The shortcut will only work on your or other English systems.Run,%AutoRunScript%,Add,shortcut.exe /F:"b:\documents and settings\default user\desktop\chess.lnk"
/A:c /T:"x:\program files\chess\chess.exe" /W:"x:\program files\chess"
If I build a German PE, I have
B:\documents and settings > R:\Dokumente und Einstellungen
program files > Programme.
That is the reason that I created buildModel
BTW: hardcoded drive names is not good!
You should prefer to use %systemdrive%
Peter
#17
Posted 23 July 2007 - 04:41 PM
#18
Posted 25 July 2007 - 10:48 AM
Hi llamedoso!
Created a new script using API commands, looks much simpler now and will work with other projects as well.
Only need to use this as header:[main] Title=Chess Description=The board game Selected=True Level=5 Version=1 Author=David Norris Date=2007-JUL-23 [variables] %ProgramTitle%=Chess %ProgramEXE%=CHESS.EXE %ProgramFolder%=Chess [process] Add_Shortcut,StartMenu,Games unpack
And change the "chess" foldername to "folder" (or download the script) from here.
Enjoy your game!
Hi Nuno,
Yes this looks much better than my shortcut method - BUT one snag I tried it and it doesn't work! No errors reported in log. But I'm using NativePE maybe this is problem?
#19
Posted 25 July 2007 - 11:04 AM
Your chess script contains the line
The shortcut will only work on your or other English systems.
If I build a German PE, I have
B:\documents and settings > R:\Dokumente und Einstellungen
program files > Programme.
That is the reason that I created buildModel
BTW: hardcoded drive names is not good!
You should prefer to use %systemdrive%
Peter
Hi Peter,
I take your point, never thought of other languages! I get confused with variables like %systemdrive% etc. find it easier and less typing to to use hard coding. My WB builds use fixed drive names, i.e X and B for the ram drive, and stuff my own programs use is always in C drive.
Find programming fascinating but somewhat confusing. Guess I'm not too bright! Took me a day to figure out the following problem:-
WB build worked as expected on my Desktop PC but when I transferred iso to Sony laptop found that using keyboard on laptop I got the following when using keyboard...
qwerty456
asdfgh123
zxcvbn0
Simple answer, needed to 'Switch Numlock' to OFF in build
!!
Like I said - not too bright
#20
Posted 25 July 2007 - 12:06 PM
Yes, this is still under testing and development and should become publicly available really soon.
Add the newer liveXP web server on your wb download center: livexp.boot-land.net
This API is already applied over liveXP, porting to nativeEx and other projects should also be simple but will take a little more time until we can finish debug and testing things - but makes life simpler, doesn't it?
#21
Posted 25 July 2007 - 01:18 PM
Are those the same files as from unattended.boot-land.net?Add the newer liveXP web server on your wb download center: livexp.boot-land.net
#22
Posted 25 July 2007 - 01:24 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users