Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- this script is ran on the visual C++ 2008 Express Edition
- if you want to run on vs 2017, you have to change "Char" to TCHAR
- */
- #include <stdio.h>
- #include <Windows.h>
- #define BUFFERLEN 100
- int main()
- {
- char command[BUFFERLEN] = "%SystemRoot%\\notepad.exe";
- char Dst[BUFFERLEN] = {0,};
- printf("%s\n",command);
- int r = ExpandEnvironmentStringsA(command, Dst, BUFFERLEN);
- if(!r)
- printf("Failed\n");
- else
- printf("%s\n",Dst);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement