Jump to content











Photo
- - - - -

getting startmenu/desktop shortcut for file in system32 folder


Best Answer darren rose , 30 May 2014 - 02:12 PM

thanks homes32

Go to the full post


  • Please log in to reply
3 replies to this topic

#1 darren rose

darren rose

    Frequent Member

  • Advanced user
  • 374 posts
  • Location:Norwich, Norfolk
  •  
    United Kingdom

Posted 30 May 2014 - 01:48 PM

Hi

 

In a script I am playing with I am copying a file to the system32 folder of PE using:-

ExtractAllFiles,"%ScriptFile%","DISM","%target_sys%"

This works fine, but how can I then get a startmenu/desktop shortcut for it, everything I try using Add_Shortcut doesn't seem to work - it only works if my exe is in Programs dir, but then my exe doesn't work as it looks for files in system32 folder

 

Any thoughts please?



#2 darren rose

darren rose

    Frequent Member

  • Advanced user
  • 374 posts
  • Location:Norwich, Norfolk
  •  
    United Kingdom

Posted 30 May 2014 - 02:07 PM

update: after trying lots of things, think I finally got it working

 

Please comment if I am not doing this in correct way:-

Add_Shortcut,StartMenu,Imaging,"%systemroot%\system32\%programEXE%"


#3 homes32

homes32

    Gold Member

  • .script developer
  • 1021 posts
  • Location:Minnesota
  •  
    United States

Posted 30 May 2014 - 02:08 PM

you can look at my ShutdownPE script (which is included in most projects) and see how I do this. :)

 

Edit: Yep. you got it!

 

A hint for anyone else stumbling upon this topic %systemroot% is a Windows environment variable that always points to the Windows directory NOT a winbuilder/script variable.


  • darren rose likes this

#4 darren rose

darren rose

    Frequent Member

  • Advanced user
  • 374 posts
  • Location:Norwich, Norfolk
  •  
    United Kingdom

Posted 30 May 2014 - 02:12 PM   Best Answer

thanks homes32






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users