PDA

View Full Version : Problem running a .lnk (CeRunAppAtTime)


PaNa-S
1st October 2008, 08:40 PM
Hi im triying to run a shortcut with this c# code:

string appPath = System.IO.Path.GetDirectoryName(System.Reflection. Assembly.GetExecutingAssembly().GetName().CodeBase );
string appLnkName = txtNumero.Text.Substring(0, 4) + fecha[0] + fecha[1] + hora[0] + hora[1] + ".lnk"; // 6790203245.lnk (for example)

SHCreateShortcut(appPath + "\\" + appLnkName, "\"" + appPath + "\\cPerdidasNotif.exe\" " + op.CC + " " + txtNumero.Text);

CeRunAppAtTime(appPath + "\\" + appLnkName, ref timeToLaunch);


The ShCreateShotcut, create the shortcuts nice!!! and the shortcut is running if i click on it manually but when CeRunAppAtTime tries to run it it shows an error message "Unable to execute \Almacenamiento intero\5465456.lnk". If i change the lnk for the exe it runs well.

Any help with this? :)

PaNa-S
2nd October 2008, 03:04 PM
Anyone? :(