Sign in to follow this  
Followers 0
ss3vegeta

FileCreateShortcut - shortcut crashes application

3 posts in this topic

I can't seem to make a shortcut to save my life. After the script runs the shortcut is on the desktop, it has the RISK II icon, and when I click it the game starts and then crashes.

FileCreateShortcut(@ProgramFilesDir & "\RISK2\RISKII.EXE", @DesktopDir & "\RISKII.lnk")

Error:

Risk II has encountered a problem and needs to close. We are sorry for the inconvenience.

I can go to the game and click on the RISKII.EXE and the game runs fine. I can right click it and "Send To -> Desktop (create shortcut)" and that shortcut works with no problems. Am I doing something wrong with the FileCreateShortcut syntax?

Thanks,

ss3

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

You were absolutely correct. I just assumed since it wasn't required parameter that I didn't need it.

FileCreateShortcut(@ProgramFilesDir & "\RISK2\RISKII.EXE", @DesktopDir & "\RISK II.lnk", @ProgramFilesDir & "\RISK2")

I can't believe that I didn't even think of comparing the two shortcuts, if I had I would have seen this right away. I must be tired or something.

Thank you for throwing the cold water on me and waking me up. :)

ss3

Edited by ss3vegeta

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0