Jump to content

Problems with creating Shortcuts


Recommended Posts

I'm having problems with creating shortcuts(they don't wan't to create at all), I'm using a .cmd file that runs from RunOnceEx as the 2nd to last command and it is just not creating the shortcuts. The cmd file works fine when just double clicked.

Here is the .cmd file:

cmdow @ /HID

:Installing mIRC Shortcuts for All Users

shortcut /f:"%ALLUSERSPROFILE%\Desktop\mIRC.lnk" /a:c /t:"%ProgramFiles%\mIRC\mirc.exe"

shortcut /f:"%ALLUSERSPROFILE%\Start Menu\Programs\mIRC\mIRC.lnk" /a:c /t"%ProgramFiles%\mIRC\mirc.exe"

shortcut /f:"%ALLUSERSPROFILE%\Start Menu\Programs\mIRC\IRC Intro.lnk" /a:c /t"%ProgramFiles%\mIRC\ircintro.hlp"

shortcut /f:"%ALLUSERSPROFILE%\Start Menu\Programs\mIRC\mIRC Help.lnk" /a:c /t"%ProgramFiles%\mIRC\mirc.hlp"

shortcut /f:"%ALLUSERSPROFILE%\Start Menu\Programs\mIRC\ReadMe.lnk" /a:c /t"%ProgramFiles%\mIRC\readme.txt"

shortcut /f:"%ALLUSERSPROFILE%\Start Menu\Programs\mIRC\Versions.lnk" /a:c /t"%ProgramFiles%\mIRC\versions.txt"

Here is my RunOnceEX:

cmdow @ /HID

@echo off

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY%\001 /VE /D "Microsoft Office 2003" /f

REG ADD %KEY%\001 /V 1 /D "%SYSTEMDRIVE%\Install\Software\Applications\Office2003\setup.exe TRANSFORMS="Unattended.MST" /qb-" /f

REG ADD %KEY%\002 /VE /D "Mozilla Firefox" /f

REG ADD %KEY%\002 /V 1 /D "%SYSTEMDRIVE%\Install\Software\Browsers\firefox_1.506.exe -ms -ira" /f

REG ADD %KEY%\003 /VE /D "Mozilla Thunderbird" /f

REG ADD %KEY%\003 /V 1 /D "%SYSTEMDRIVE%\Install\Software\E-mail\thunderbird_1.07.exe -ms -ira" /f

REG ADD %KEY%\004 /VE /D "WinRAR" /f

REG ADD %KEY%\004 /V 1 /D "%SYSTEMDRIVE%\Install\Software\Applications\WinRAR\wrar330.exe /s" /f

REG ADD %KEY%\006 /VE /D "Visual Basic 6 Runtimes" /f

REG ADD %KEY%\006 /V 1 /D "%SYSTEMDRIVE%\Install\Software\Applications\VB\vbrun6.msi /Q" /f

REG ADD %KEY%\007 /VE /D "Daemon Tools" /f

RED ADD %KEY%\007 /V 1 /D "%SYSTEMDRIVE%\Install\Software\Applications\Daemon\Daemon.exe /qn /Reboot-Suppress" /f

REG ADD %KEY%\008 /VE /D "Shockwave" /f

REG ADD %KEY%\008 /V 1 /D "%SYSTEMDRIVE%\Install\Software\Plugins\swInstaller.exe" /f

REG ADD %KEY%\011 /VE /D "WinISO 5.3" /f

REG ADD %KEY%\011 /V 1 /D "%SYSTEMDRIVE%\Install\Software\Applications\WinISO\WINISO53.EXE /VERYSILENT /SP-" /f

REG ADD %KEY%\012 /VE /D "SpyBot S&D" /f

REG ADD %KEY%\012 /V 1 /D "%SYSTEMDRIVE%\Install\Software\Applications\Spybot\spybotsd14.exe /verysilent" /f

REG ADD %KEY%\013 /VE /D "VLC Video Lan" /f

REG ADD %KEY%\013 /V 1 /D "%SYSTEMDRIVE%\Install\Software\Applications\VideoLan\vlc-0.8.5-win32.exe /S" /f

REG ADD %KEY%\014 /VE /D "WinDVD 7" /f

REG ADD %KEY%\014 /V 1 /D "%SYSTEMDRIVE%\Install\Software\Applications\WinDVD7\Setup.exe /s /sms /f2"C:\WinDVD.log"" /f

REG ADD %KEY%\050 /VE /D "Importing Registry Tweaks" /f

REG ADD %KEY%\050 /V 1 /D "REGEDIT /S %SYSTEMDRIVE%\Install\Software\AgentTweaks.reg" /f

REG ADD %KEY%\051 /VE /D "Importing Program Keys" /f

REG ADD %KEY%\051 /V 1 /D "REGEDIT /s %SYSTEMDRIVE%\Install\Software\WinDVD.reg" /f

REG ADD %KEY%\051 /V 2 /D "REGEDIT /s %SYSTEMDRIVE%\Install\Software\mIRC.reg" /f

REG ADD %KEY%\052 /VE /D "Creating Shortcuts" /f

REG ADD %KEY%\052 /V 1 /D "%systemdrive%\install\shortcuts.cmd" /f

REG ADD %KEY%\055 /VE /D "Cleaning Up" /f

REG ADD %KEY%\055 /V 1 /D "%systemdrive%\install\cleanup.cmd" /f

REG ADD %KEY%\056 /VE /D "Rebooting" /f

REG ADD %KEY%\056 /V 1 /D "%systemdrive%\reboot.cmd" /f

EXIT

Link to comment
Share on other sites


This is what i have for one of my apps i know its %USERPROFILE% rather than %ALLUSERSPROFILE%

"cmd /C Shortcut.exe /f:\"%USERPROFILE%\Desktop\Homecall Broadband.lnk\" /a:c /t:\"%ProgramFiles%\thomson\SpeedTouch USB\stdialup.exe\" /W:\"%ProgramFiles%\thomson\SpeedTouch USB\"" /f

Link to comment
Share on other sites

I've, recently, decided to use $OEM$ folders for this purpose.

In your situation, I'd suggest creating these directories in your UACD:

$OEM$\$Docs\All Users\Start Menu\Programs\mIRC

$OEM$\$Docs\All Users\Desktop

You put whatever shortcuts there.

Actually, you copy shortcuts from your current system to those dirs of $OEM$.

One thing to take care of is to right-click each shortcut for Properties.

Then, you change C: to %SystemDrive% in the following fields:

Target: "%SystemDrive%\Program Files\mIRC\mirc.exe"

Start in: "%SystemDrive%\Program Files\mIRC"

This guarantees a shortcut functionality whatever your %SystemDrive% is.

You can, also, fill in the "Comment:" field if it's empty.

HTH

Link to comment
Share on other sites

I'm having problems with creating shortcuts(they don't wan't to create at all), I'm using a .cmd file that runs from RunOnceEx as the 2nd to last command and it is just not creating the shortcuts. The cmd file works fine when just double clicked.

Are you sure that Shortcut.exe is in the search path? Try specifying the complete path to the executable in your .CMD file.

Link to comment
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...