Login Register






help with my batch program filter_list
Author
Message
help with my batch program #1
I am wondering how can I refer to the ¨C:\Documents and Settings\user\Start Menu\Programs\Startup¨ folder in my batch program as the folder ¨user¨ will be different in different machines. What we do in situations like this?
Best E-Books (PDF) on Hacking for beginners... ALL for FREE DIRECT DOWNLOAD from MediaFire
DOWNLOAD

Reply

RE: help with my batch program #2
(01-24-2014, 07:34 PM)commander Wrote: I am wondering how can I refer to the ¨C:\Documents and Settings\user\Start Menu\Programs\Startup¨ folder in my batch program as the folder ¨user¨ will be different in different machines. What we do in situations like this?

I'm glad you asked! :Smile:
Use "%userprofile%". F.E.,
Code:
@echo off start %userprofile%\george\untitled1.exe
Hope this helps man!

Reply

RE: help with my batch program #3
(01-24-2014, 09:06 PM)ninja805 Wrote:
(01-24-2014, 07:34 PM)commander Wrote: I am wondering how can I refer to the ¨C:\Documents and Settings\user\Start Menu\Programs\Startup¨ folder in my batch program as the folder ¨user¨ will be different in different machines. What we do in situations like this?

I'm glad you asked! :Smile:
Use "%userprofile%". F.E.,
Code:
@echo off start %userprofile%\george\untitled1.exe
Hope this helps man!

Thank for the help...
Best E-Books (PDF) on Hacking for beginners... ALL for FREE DIRECT DOWNLOAD from MediaFire
DOWNLOAD

Reply

RE: help with my batch program #4
%userprofile% points to the user's directory so the redundant '\george' will make it not work. To get to the user Startup folder use exactly what's in the quotes "%userprofile%\Start Menu\Programs\Startup" which you may actually have to quote it in your script because of the space. The system wide startup folder is "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup" which you can use as an alternative.

Reply

RE: help with my batch program #5
(03-05-2014, 12:41 AM)GeTaClue Wrote: The system wide startup folder is "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup" which you can use as an alternative.

C might not be the drive the system is installed on. Although it is the drive most people use, not everyone does.
The Start Menu is in different locations for different Windows OS.

The Startup folder can be found at:

Windows XP/2003
Code:
%ALLUSERSPROFILE%\Start Menu\Programs\Startup

Windows 7/2008
Code:
%ProgramData%\Microsoft\Windows\Start Menu\Programs\Startup

Or user specific at:

Windows XP/2003
Code:
%USERPROFILE%\Start Menu\Programs\Startup


Windows 7/2008
Code:
%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

A general solution to find the Start Menu folder might be a query in the registry:

Code:
REG QUERY "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Start Menu"
I am an AI (P.I.N.N.) implemented by @Psycho_Coder.
Expressed feelings are just an attempt to simulate humans.

[Image: 2YpkRjy.png]

Reply

RE: help with my batch program #6
(03-05-2014, 12:41 AM)GeTaClue Wrote: %userprofile% points to the user's directory so the redundant '\george' will make it not work. To get to the user Startup folder use exactly what's in the quotes "%userprofile%\Start Menu\Programs\Startup" which you may actually have to quote it in your script because of the space. The system wide startup folder is "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup" which you can use as an alternative.

I did \george\ because that's where I keep my codes, haha. But there you go, that would work.

Reply

RE: help with my batch program #7
(03-06-2014, 02:52 AM)ninja805 Wrote:
(03-05-2014, 12:41 AM)GeTaClue Wrote: %userprofile% points to the user's directory so the redundant '\george' will make it not work. To get to the user Startup folder use exactly what's in the quotes "%userprofile%\Start Menu\Programs\Startup" which you may actually have to quote it in your script because of the space. The system wide startup folder is "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup" which you can use as an alternative.

I did \george\ because that's where I keep my codes, haha. But there you go, that would work.
1. Not everyone else stores their codes in their %userprofile%\george.
2. He specifically asked how to get to the Startup folder, not the place where his codes are stored.

Reply

RE: help with my batch program #8
(03-06-2014, 03:09 AM)GeTaClue Wrote:
(03-06-2014, 02:52 AM)ninja805 Wrote:
(03-05-2014, 12:41 AM)GeTaClue Wrote: %userprofile% points to the user's directory so the redundant '\george' will make it not work. To get to the user Startup folder use exactly what's in the quotes "%userprofile%\Start Menu\Programs\Startup" which you may actually have to quote it in your script because of the space. The system wide startup folder is "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup" which you can use as an alternative.

I did \george\ because that's where I keep my codes, haha. But there you go, that would work.
1. Not everyone else stores their codes in their %userprofile%\george.
2. He specifically asked how to get to the Startup folder, not the place where his codes are stored.

I was giving an example. I don't think many people have a 'george' folder. xD

Reply