Jump to content

Search the Community

Showing results for tags '@ProgramsDir'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. 236 This works perfect for desktop shortcuts $ink = "\cleaner.lnk" $cmd = "C:\AutoIt3\Code\00_Trials\Installer\Cleaner.exe" $icon = "C:\32.ico" ; & "\au3", FileCreateShortcut($cmd , @DesktopDir & $ink , @ScriptDir, "", "Tooltip description of the shortcut.", $icon, @SW_MINIMIZE) This works perfect for the Program Files Menu #include <FileConstants.au3> #include <MsgBoxConstants.au3> $cmd = "C:\AutoIt3\Code\00_Trials\Installer\Cleaner.exe" $icon = "C:\32.ico" $ink = "\cleaner.lnk" FileCreateShortcut($cmd , @ProgramsDir & $ink , @ScriptDir, "", "Tooltip description of the shortcut.", $icon, @SW_MINIMIZE) However this has me so confused and dazed I had to change DishNet to Sirius 60's/70's Motown to chill. My problem is I have confirmed variables for each section of the script but it does not put the variable in the correct place or it ignores it altogether, #include <FileConstants.au3> #include <MsgBoxConstants.au3> Global $ifullpath Global $iicoFile Global $iSoftTitle Global $iincFile Global $incthing ;------------------$cmd = "C:\00test_Installer\00bons1.exe" $cmd = $ifullpath ;------------------$icon = "C:\32.ico" $icon = $iicoFile ;----------------------------$ink = "\file.ini" $ink = $incthing ;------------------------- $iSoftTitle = \SoftTitle.ini $Tooltip = $iSoftTitle IniRead(@ScriptDir & "\SoftTitle.ini", "General", ".", $iSoftTitle) Local $iSoftTitle = IniRead(@ScriptDir & "\SoftTitle.ini", "General", ".", "") MsgBox(4096,"$iSoftTitle", $iSoftTitle) ; Retrieve the system environment variable called %PATH%. Local $sEnvVar = EnvGet("PATH") ; Assign the system environment variable called %PATH% with its current value as well as the script directory. ; When you assign an environment variable you do so minus the percentage signs (%). EnvSet("PATH", $sEnvVar & ";" & @ScriptDir) ; Refresh the OS environment for changes to take affect. EnvUpdate() IniRead(@ScriptDir & "\fullpath.ini", "General", ".", $ifullpath) Local $ifullpath = IniRead(@ScriptDir & "\fullpath.ini", "General", ".", "") MsgBox(4096,"$ifullpath", $ifullpath) Local $sEnvVar = EnvGet("PATH") ; Assign the system environment variable called %PATH% with its current value as well as the script directory. ; When you assign an environment variable you do so minus the percentage signs (%). EnvSet("PATH", $sEnvVar & ";" & @ScriptDir) ; Refresh the OS environment for changes to take affect. EnvUpdate() IniRead(@ScriptDir & "\icoFile.ini", "General", ".", $iicoFile) Local $iicoFile = IniRead(@ScriptDir & "\icoFile.ini", "General", ".", "") MsgBox(4096,"$iicoFile", $iicoFile) Local $sEnvVar = EnvGet("PATH") ; Assign the system environment variable called %PATH% with its current value as well as the script directory. ; When you assign an environment variable you do so minus the percentage signs (%). EnvSet("PATH", $sEnvVar & ";" & @ScriptDir) ; Refresh the OS environment for changes to take affect. EnvUpdate() IniRead(@ScriptDir & "\File.ini", "General", ".", $iincFile) Local $iincFile = IniRead(@ScriptDir & "\File.ini", "General", ".", "") MsgBox(4096,"$iincFile", $iincFile) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"\" & $iincFile &".ink" = $incthing $incthing=("\" & $iincFile &".ink") MsgBox(4096,"$incthing", $incthing) FileCreateShortcut($cmd , @ProgramsDir & $ink , @ScriptDir, "", $Tooltip, $icon, @SW_MINIMIZE) This does make a programfiles menu item The target is Computer and not the var $Cmd The start in is the correct directory It added a shortcut key! that I did not add It ignored the comment altogether and that is empty and the wrong icon. Are there different rules if you use a variable instead of a text string? Thanks for looking. Oh yes I almost forgot, I use this fancy piece of code I found in the forums one day that really saved me. I could not get things straight bouncing between things and put this in and all of a sudden the path I wanted was there, I do apologize as I do not remember who posted it Local $sEnvVar = EnvGet("PATH") ; Assign the system environment variable called %PATH% with its current value as well as the script directory. ; When you assign an environment variable you do so minus the percentage signs (%). EnvSet("PATH", $sEnvVar & ";" & @ScriptDir) ; Refresh the OS environment for changes to take affect. EnvUpdate()
×
×
  • Create New...