Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Create .exe file from shortcut?
New Posts  All Forums:Forum Nav:

Create .exe file from shortcut? - Page 3

post #21 of 27
Quote:
Originally Posted by _02 View Post
Eh, he can make an EXE or batch that simply executes with parameters in the local path, so that the location is irrelevant as long as this program and the one it calls are in the same directory.
Right, but that's my point exactly. He wants to be able to move the executable around and be able to run it from anywhere. (I assume possibly from multiple machines, too?)

The batch file passing parameters to the executable in the same path still won't let you move a single file around and run it from where you want. Thus, it's the exact same thing as a shortcut.
Intellect v2
(9 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i7-6700K Processor ASUS ROG MAXIMUS VIII HERO LGA1151 DDR4 M.2 SAT... EVGA GTX 1080 SC ACX 3.0 Crucial Ballistix Sport 32GB DDR4 2400 MT/s (PC... 
CoolingKeyboardPowerCase
Noctua NH-D15 Das Keyboard 4 Professional (Brown) Corsair AX860 Fractal Design Define R5 
Mouse
MIONIX NAOS 7000 
  hide details  
Reply
Intellect v2
(9 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i7-6700K Processor ASUS ROG MAXIMUS VIII HERO LGA1151 DDR4 M.2 SAT... EVGA GTX 1080 SC ACX 3.0 Crucial Ballistix Sport 32GB DDR4 2400 MT/s (PC... 
CoolingKeyboardPowerCase
Noctua NH-D15 Das Keyboard 4 Professional (Brown) Corsair AX860 Fractal Design Define R5 
Mouse
MIONIX NAOS 7000 
  hide details  
Reply
post #22 of 27
Only on OCN do we continue to discuss the question after the OP is satisfied. Most other places the question barely gets answered before the thread dies. Gotta love it here
Lappy
(9 items)
 
  
CPUMotherboardGraphicsRAM
P8700 Toshiba GM45 ICH9-M Intel 4 Series Samsung M4 
Hard DriveOptical DriveOSCase
Hitachi HTS723232L9A360 Matshita UJ880AS Windows 7 Pro 64 Toshiba A500-6621 
Mouse
Mionix Naos 5000 
  hide details  
Reply
Lappy
(9 items)
 
  
CPUMotherboardGraphicsRAM
P8700 Toshiba GM45 ICH9-M Intel 4 Series Samsung M4 
Hard DriveOptical DriveOSCase
Hitachi HTS723232L9A360 Matshita UJ880AS Windows 7 Pro 64 Toshiba A500-6621 
Mouse
Mionix Naos 5000 
  hide details  
Reply
post #23 of 27
Quote:
Originally Posted by Wiremaster View Post
Only on OCN do we continue to discuss the question after the OP is satisfied. Most other places the question barely gets answered before the thread dies. Gotta love it here
Hey, I'm just trying to help the OP . The batch file method that he is satisfied with isn't accomplishing what he wanted. I figured he tested it and ran it in the same folder as the original and didn't realize that when he goes to move the batch file out, it's not going to work anymore.
Intellect v2
(9 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i7-6700K Processor ASUS ROG MAXIMUS VIII HERO LGA1151 DDR4 M.2 SAT... EVGA GTX 1080 SC ACX 3.0 Crucial Ballistix Sport 32GB DDR4 2400 MT/s (PC... 
CoolingKeyboardPowerCase
Noctua NH-D15 Das Keyboard 4 Professional (Brown) Corsair AX860 Fractal Design Define R5 
Mouse
MIONIX NAOS 7000 
  hide details  
Reply
Intellect v2
(9 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i7-6700K Processor ASUS ROG MAXIMUS VIII HERO LGA1151 DDR4 M.2 SAT... EVGA GTX 1080 SC ACX 3.0 Crucial Ballistix Sport 32GB DDR4 2400 MT/s (PC... 
CoolingKeyboardPowerCase
Noctua NH-D15 Das Keyboard 4 Professional (Brown) Corsair AX860 Fractal Design Define R5 
Mouse
MIONIX NAOS 7000 
  hide details  
Reply
post #24 of 27
Quote:
Originally Posted by Plex View Post
Hey, I'm just trying to help the OP . The batch file method that he is satisfied with isn't accomplishing what he wanted. I figured he tested it and ran it in the same folder as the original and didn't realize that when he goes to move the batch file out, it's not going to work anymore.
If he sets up his batch file correctly, he'll be fine.

For example, the following would launch Program.exe no matter what directory or drive he places it in.
Code:
cd /d "C:\\Program Files\\Program Name\\"
start Program.exe
Here's the batch file I use to launch my Minecraft LAN server.
Code:
cd /d "Z:\\Minecraft Server"
java -Xmx1024m -Xmx1024m -jar minecraft_server.jar nogui
Lappy
(9 items)
 
  
CPUMotherboardGraphicsRAM
P8700 Toshiba GM45 ICH9-M Intel 4 Series Samsung M4 
Hard DriveOptical DriveOSCase
Hitachi HTS723232L9A360 Matshita UJ880AS Windows 7 Pro 64 Toshiba A500-6621 
Mouse
Mionix Naos 5000 
  hide details  
Reply
Lappy
(9 items)
 
  
CPUMotherboardGraphicsRAM
P8700 Toshiba GM45 ICH9-M Intel 4 Series Samsung M4 
Hard DriveOptical DriveOSCase
Hitachi HTS723232L9A360 Matshita UJ880AS Windows 7 Pro 64 Toshiba A500-6621 
Mouse
Mionix Naos 5000 
  hide details  
Reply
post #25 of 27
Quote:
Originally Posted by Wiremaster View Post
If he sets up his batch file correctly, he'll be fine.

For example, the following would launch Program.exe no matter what directory or drive he places it in.
Code:
cd /d "C:\\Program Files\\Program Name\\"
start Program.exe
Here's the batch file I use to launch my Minecraft LAN server.
Code:
cd /d "Z:\\Minecraft Server"
java -Xmx1024m -Xmx1024m -jar minecraft_server.jar nogui
Yes.. I know this. I was under the impression he wanted to move the original file around.

Otherwise, everything you just described is the same thing as a shortcut. You make one single Windows shortcut that points to "C:\\Program Files\\Program Name\\program.exe -a -b -c" and you can move that wherever you want to. Feel me?
Intellect v2
(9 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i7-6700K Processor ASUS ROG MAXIMUS VIII HERO LGA1151 DDR4 M.2 SAT... EVGA GTX 1080 SC ACX 3.0 Crucial Ballistix Sport 32GB DDR4 2400 MT/s (PC... 
CoolingKeyboardPowerCase
Noctua NH-D15 Das Keyboard 4 Professional (Brown) Corsair AX860 Fractal Design Define R5 
Mouse
MIONIX NAOS 7000 
  hide details  
Reply
Intellect v2
(9 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i7-6700K Processor ASUS ROG MAXIMUS VIII HERO LGA1151 DDR4 M.2 SAT... EVGA GTX 1080 SC ACX 3.0 Crucial Ballistix Sport 32GB DDR4 2400 MT/s (PC... 
CoolingKeyboardPowerCase
Noctua NH-D15 Das Keyboard 4 Professional (Brown) Corsair AX860 Fractal Design Define R5 
Mouse
MIONIX NAOS 7000 
  hide details  
Reply
post #26 of 27
I know it's been answered but:

srcds.bat:
.\\hldsupdatetool.exe -command update -game tf -dir .

Put that in the directory and run it, should work No need for conversions or anything, if there is a different version of the app just copy paste
It plays TF2
(18 items)
 
LG Nexus 5
(12 items)
 
Acer 5745PG
(6 items)
 
CPUMotherboardGraphicsRAM
4790k ASRock Z97 Extreme6 Asus GTX980 Strix 4GB Kingston HyperX Fury Black 2x8GB 
Hard DriveHard DriveHard DriveOptical Drive
OCZ Vector 128GB Seagate 2TB  Seagate 500GB 7200.12 Some LG that works properly 
CoolingOSMonitorKeyboard
Corsair H105 Windows 8 Pro 64bit Samsung B2330h MS Digital Media Keyboard 
PowerCaseMouseMouse Pad
CoolerMaster Silent Pro M600 Coolermaster CM690II Advanced Logitech G500s CyberSnipa Something 
AudioAudio
JVC RX700 Creative X-Fi Titanium 
CPUMotherboardGraphicsRAM
Quad-core 2.3 GHz Krait 400 LG Something + Qualcomm MSM8974 Snapdragon 800 Adreno 330 2 GB 
Hard DriveOptical DriveCoolingOS
32 GB internal storage 8MP AutoAwesomeHDRFace + 1MP SelfieMachine Air Android 4.4.2 
MonitorPowerCaseMouse
True HD IPS+ 1080 x 1920 pixels, 4.95 inches Non-removable Li-Po 2300 mAh battery LG Sexybox Capacitive touchscreen 
CPUGraphicsRAMHard Drive
i5 480m @ 2.66GHz GT420M 1GB 4GB DDR3 WD 750GB 
OSMonitor
Windows 7 Professional 64 bit 15" 1366x768 + two point touchscreen 
  hide details  
Reply
It plays TF2
(18 items)
 
LG Nexus 5
(12 items)
 
Acer 5745PG
(6 items)
 
CPUMotherboardGraphicsRAM
4790k ASRock Z97 Extreme6 Asus GTX980 Strix 4GB Kingston HyperX Fury Black 2x8GB 
Hard DriveHard DriveHard DriveOptical Drive
OCZ Vector 128GB Seagate 2TB  Seagate 500GB 7200.12 Some LG that works properly 
CoolingOSMonitorKeyboard
Corsair H105 Windows 8 Pro 64bit Samsung B2330h MS Digital Media Keyboard 
PowerCaseMouseMouse Pad
CoolerMaster Silent Pro M600 Coolermaster CM690II Advanced Logitech G500s CyberSnipa Something 
AudioAudio
JVC RX700 Creative X-Fi Titanium 
CPUMotherboardGraphicsRAM
Quad-core 2.3 GHz Krait 400 LG Something + Qualcomm MSM8974 Snapdragon 800 Adreno 330 2 GB 
Hard DriveOptical DriveCoolingOS
32 GB internal storage 8MP AutoAwesomeHDRFace + 1MP SelfieMachine Air Android 4.4.2 
MonitorPowerCaseMouse
True HD IPS+ 1080 x 1920 pixels, 4.95 inches Non-removable Li-Po 2300 mAh battery LG Sexybox Capacitive touchscreen 
CPUGraphicsRAMHard Drive
i5 480m @ 2.66GHz GT420M 1GB 4GB DDR3 WD 750GB 
OSMonitor
Windows 7 Professional 64 bit 15" 1366x768 + two point touchscreen 
  hide details  
Reply
post #27 of 27
Quote:
Originally Posted by Plex View Post
Yes.. I know this. I was under the impression he wanted to move the original file around.
Moving the file he's launching. Got it. Yeah, I don't know any way of doing that.
Lappy
(9 items)
 
  
CPUMotherboardGraphicsRAM
P8700 Toshiba GM45 ICH9-M Intel 4 Series Samsung M4 
Hard DriveOptical DriveOSCase
Hitachi HTS723232L9A360 Matshita UJ880AS Windows 7 Pro 64 Toshiba A500-6621 
Mouse
Mionix Naos 5000 
  hide details  
Reply
Lappy
(9 items)
 
  
CPUMotherboardGraphicsRAM
P8700 Toshiba GM45 ICH9-M Intel 4 Series Samsung M4 
Hard DriveOptical DriveOSCase
Hitachi HTS723232L9A360 Matshita UJ880AS Windows 7 Pro 64 Toshiba A500-6621 
Mouse
Mionix Naos 5000 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Create .exe file from shortcut?