Jump to content
Sign in to follow this  
ss3vegeta

FileCreateShortcut - shortcut crashes application

Recommended Posts

ss3vegeta

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
Jos

Did you compare the information in the shortcuts?

Probably you need to add the WorkingDir parameter.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
ss3vegeta

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.