Jump to content











Photo
- - - - -

Problem with 1 apps shortcut not appearing in build

shortcuts win7pese

  • Please log in to reply
2 replies to this topic

#1 KeithK

KeithK
  • Members
  • 2 posts
  •  
    United States

Posted 06 June 2013 - 01:50 AM

I'm running into a problem creating the start menu shortcut for my script.  Everything else works perfectly.  I have other apps that I built and/or modified and the shortcuts are OK.  This is for the BartPE version of Get Data Back for NTFS.   I've tried a number of different methods to create the shortcut, from simple to more advanced. Below are 2 of the script I've tried.  The program installs and registers corrrectly.  I can even start Explorer, find the exe and run it with no errors.  I even downloaded a completely new copy of Winbuilder 082 and Win7PSE in hopes that something had gotten corrupt and that would fix it.  The scripts are fairly simple.  Any help would be greatly appreciated.

Thanks,

Keith

 

Initial Script

[Main]
Title=GetDataBack for NTFS
Level=4
Type=Script
Selected=True

[Process]
IniRead,"%ProjectInfo%","TargetStrings","sProgram_Files","%WorkDir%"
Echo,Processing files Build[(None)]...
DirMake,"%TargetDir%\I386\system32"
DirMake,"%TargetDir%\%WorkDir%\programs\gdbnt"
FileCopy,"%ScriptDir%\gdbnt.exe","%TargetDir%\%WorkDir%\programs\gdbnt\"
FileCopy,"%ScriptDir%\gdbnt.DEU","%TargetDir%\%WorkDir%\programs\gdbnt\"
FileCopy,"%ScriptDir%\gdbnt.FRA","%TargetDir%\%WorkDir%\programs\gdbnt\"
FileCopy,"%ScriptDir%\gdbnt.ini","%TargetDir%\%WorkDir%\programs\gdbnt\"

Echo,"Loading registry hive: [software]"
Echo,"Writing new values on registry hive.."
RegHiveLoad,Tmp_Software,%RegSoftware%
RegWrite,"HKLM",0x1,"Tmp_Software\Runtime Software\GetDataBackNT","InstallDir",\programs\gdbnt
RegWrite,"HKLM",0x1,"Tmp_Software\Runtime Software\GetDataBackNT","Version",3.32.000
RegWrite,"HKLM",0x1,"Tmp_Software\Runtime Software\GetDataBackNT\License","Name","USER_NAME"
RegWrite,"HKLM",0x1,"Tmp_Software\Runtime Software\GetDataBackNT\License","Key",SERIAL_NUMBER
RegWrite,"HKLM",0x1,"Tmp_Software\Microsoft\Windows NT\CurrentVersion\Fonts","MS Sans Serif 8,10,12,14,18,24",SSERIFE.FON
RegWrite,"HKLM",0x1,"Tmp_Software\Microsoft\Windows NT\CurrentVersion\Fonts","MS Serif 8,10,12,14,18,24",SERIFE.FON
RegWrite,"HKLM",0x1,"Tmp_Software\Microsoft\Windows NT\CurrentVersion\Fonts","Small Fonts",SMALLE.FON
RegHiveUnLoad,Tmp_Software

Add_Shortcut,StartMenu

 

Modified Script

[Main]
Title=GetDataBack for NTFS
Level=4
Type=Script
Selected=True

[Variables]
%ProgramFolder%=gbnt
%ProgramEXE%=gbnt.exe
%ProgramTitle%=gbnt


[Process]
IniRead,"%ProjectInfo%","TargetStrings","sProgram_Files","%WorkDir%"
Echo,Processing files Build[(None)]...
DirMake,"%TargetDir%\I386\system32"
DirMake,"%TargetDir%\%WorkDir%\programs\gdbnt"
FileCopy,"%ScriptDir%\gdbnt.exe","%TargetDir%\%WorkDir%\programs\gdbnt\"
FileCopy,"%ScriptDir%\gdbnt.DEU","%TargetDir%\%WorkDir%\programs\gdbnt\"
FileCopy,"%ScriptDir%\gdbnt.FRA","%TargetDir%\%WorkDir%\programs\gdbnt\"
FileCopy,"%ScriptDir%\gdbnt.ini","%TargetDir%\%WorkDir%\programs\gdbnt\"


Echo,"Loading registry hive: [software]"
Echo,"Writing new values on registry hive.."
RegHiveLoad,Tmp_Software,%RegSoftware%
RegWrite,"HKLM",0x1,"Tmp_Software\Runtime Software\GetDataBackNT","InstallDir",\programs\gdbnt
RegWrite,"HKLM",0x1,"Tmp_Software\Runtime Software\GetDataBackNT","Version",3.32.000
RegWrite,"HKLM",0x1,"Tmp_Software\Runtime Software\GetDataBackNT\License","Name","USER_NAME"
RegWrite,"HKLM",0x1,"Tmp_Software\Runtime Software\GetDataBackNT\License","Key",SERIAL_NUMBER
RegWrite,"HKLM",0x1,"Tmp_Software\Microsoft\Windows NT\CurrentVersion\Fonts","MS Sans Serif 8,10,12,14,18,24",SSERIFE.FON
RegWrite,"HKLM",0x1,"Tmp_Software\Microsoft\Windows NT\CurrentVersion\Fonts","MS Serif 8,10,12,14,18,24",SERIFE.FON
RegWrite,"HKLM",0x1,"Tmp_Software\Microsoft\Windows NT\CurrentVersion\Fonts","Small Fonts",SMALLE.FON
RegHiveUnLoad,Tmp_Software
//Add_Shortcut,StartMenu

//Add_Shortcut,[Type],[Folder],[FullFileName],[Title],[Work Folder],[Parameters],[IconFile( .ico .exe)],[StartMode(1, 2, 3, or 4)]
If,%pCheckBoxStartMenu%,Equal,True,Add_Shortcut,StartMenu,%pTextBoxStartFolder%,%PE_Programs%\%ProgramFolder%\%ProgramEXE%,%pTextBoxStartTitel%
If,%pCheckBoxDesktop%,Equal,True,Add_Shortcut,Desktop,,%PE_Programs%\%ProgramFolder%\%ProgramEXE%,%pTextBoxStartTitel%
If,%pCheckBoxQuickL%,Equal,True,Add_Shortcut,QuickLaunch,,%PE_Programs%\%ProgramFolder%\%ProgramEXE%,%pTextBoxStartTitel%

[Interface]
pBevelShortcuts=pBevel1,1,12,6,6,395,170
pTextBoxStartTitel="Name for Shortcuts:",1,0,20,40,200,18,%ProgramTitle%
pTextBoxStartFolder="Start Menu folder:",1,0,20,90,200,21,%scriptfolder%
pTextLabeShortcutsTo="Add shortcuts to:",1,1,260,20,135,20,8,Normal
pCheckBoxStartMenu="Start Menu",1,3,260,50,200,20,True
pCheckBoxDesktop=Desktop,1,3,260,70,200,20,True
pCheckBoxQuickL=QuickLaunch,1,3,260,90,200,20,True
pCheckBoxRunRam="Run from ram (boot.wim)",1,3,20,141,183,18,False


 



#2 carloscape

carloscape

    Frequent Member

  • Advanced user
  • 108 posts
  •  
    Honduras

Posted 06 June 2013 - 06:07 PM

I think your problem might be related to where you are saving the exe files when compared to where you are asking the project to look for them when making the shortcut. Try changing 

 

%TargetDir%\%WorkDir%\programs\gdbnt\

 

 for 

 

%target_prog%\%ProgramFolder%

 

Your shortcut line also might have an error, so you should check it out carefully. 

 

As for plugins, there are several plugins for Getdataback. I have one for several Runtime apps, but there are other ones out there specifically for Getdataback.



#3 KeithK

KeithK
  • Members
  • 2 posts
  •  
    United States

Posted 07 June 2013 - 12:53 AM

Thanks, for the response.  I've looked for other scripts that already do this, but most don't fit my needs. My initial script works to create the folder and place all the correct files in it.  When I changed the file copy and makedir as you recommended, the folder was not created and the file weren't copied. 

 

My preferred script is the initial one since it is simple and straight forward.  All I need is to figure out why the shortcut is not being created.  I added a variable section and tried a slight modification of the add shortcut (below) and had the same problem. 

 

Add_Shortcut,StartMenu,.

Add_Shortcut,Desktop

 

[Variables]

%ProgramTitle%=gbnt

%ProgramEXE%=gbnt.exe

%ProgramFolder%=gbnt







Also tagged with one or more of these keywords: shortcuts, win7pese

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users